Mabills tracker enables you to monitor how much of your budget has been spent over time, to see how much is remaining and course-correct when necessary.
-
User starting point:
- register and log in.
- introduce new transactions associated with a category.
- see the money spent on each category regarding transaction.
Home Page | Category Page | Category details |
---|---|---|
Sign in form | Sign up form | Transaction Details |
---|---|---|
To get a local copy for this project and running follow these simple example steps.
- You need to have git installed in your machine.
- Install a recent version of Postgres.
- Install the latest version of Ruby
- Already install Rails
- The postgres installation doesn't setup a user for you, so you'll need to follow these steps to create a user with permission to create databases
$ sudo -u postgres createuser budget-app -s
- To create project with PostgreSQL database
$ rails new Mabills-tracker --database=postgresql #or
$ rails new Mabills-tracker -d postgresql
$ cd Mabills-tracker # Move into the application directory
$ git clone https://github.com/joskalenda/budget-app.git
$ cd budget-app
$ rails db:create # or
$ rake db:create
- Rubocop gem
$ bundle init
$ bundle install
- Stylelint package
$ npm init -y
$ npm install
$ npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
- Run linter and autocorrect linters
$ rubocop -A # or
$ rubocop --auto-correct-all
$ npx stylelint "**/*.{css,scss}" --fix
$ rails s # or
$ rails server # or
- To restart the server
$ sudo service postgresql restart
$ rails db:reset #to clean the database
- You can now visit
http://localhost:3000/routes
to view your new website!
You can also execute the rails routes
command in your terminal to produce the same output.
- At the first you need to include those lines in your Gemfile
gem 'rails-controller-testing'
gem 'rspec-rails'
$ rails generate rspec:install
- Then run:
$ rspec spec # to test if your tests are passed
$ rails g scaffold category name user:belongs_to
$ rails g scaffold records name amount:decimal user:belongs_to
$ rails g scaffold category_records user:belongs_to
$ rails g scaffold category_records category:belongs_to record:belongs_to
- To push the Migration into the database
$ rails db:migrate
- We use the seeds.rb file to records in the database
- To drop, create a table and to migrate and send the seed into the database:
$ rails db:drop db:create db:migrate db:seed
$ bundle exec rspec ./spec/features/
$ bundle exec rspec ./spec/models/
This project is build with:
👤 Jos Kalenda
- GitHub: @Joskalenda
- Twitter @JosKalenda
- LinkedIn @JosKalenda
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Credit to Gregoire Vella on Behance, the author of the original creative common license
This project is MIT licensed.