The Ruby on Rails (RoR) Budget App is a basic mobile budget app for managing your personal budget. It includes a PostgreSQL database connection, user authentication, CRUD operations, user authorization rules, and testing. It's a complete app.
- Set up a Ruby on Rails project.
- Set up linters using Stylelint and Rubocop
- Connect the Rails project to a PostgreSQL database.
- Define and set up the Data Model using Active Record migration. Implement table associations and data processing methods in the data model.
- Include controllers, and views for displaying: expense categories and transactions, a list of all expense categories, creation of a new category, creation of a transaction.
- Follow the design guidelines from a specific mobile app designer.
- Implement user authentication by means of the Devise gem.
- Implement authorization rules by means of the CanCanCan gem.
To get a local copy up and running, follow these steps.
In order to run this project you need:
Prerequisites: Ruby, Ruby Development Kit (for Windows), Ruby Gems packaging system, and PostgreSQL database server. Run the following commands...
$ gem install rails
cd my-folder
git clone https://github.com/jcmunav63/rails-budget-app.git
This project requires the following dependencies: the Ruby interpreter, the Gem package manager, the Ruby on Rails web framework, a PostgreSQL database server, thr RSpec gem for unit testing and the Capybara gem for integration tests, the Devise gem for user authentication, and the CanCanCan gem for user authorization rules. Additionally, the project requires two linters checkers: RuboCop (Ruby) and Stylelint (CSS styles).
bundle install
To run the project, navigate to the project directory and execute the following command:
Start the Ruby on Rails web server (Puma server) typing the following command...
rails s , or the complete command,
rails server
- Install the Rubocop and Stylelint linters.
Install the Rubocop linters checker using the following steps...
- First add the following code to the Gem file:
gem 'rubocop', '>= 1.0', '< 2.0'
- Second run the command to install dependicies in your project:
bundle install
- Remember to copy the .rubocop.yml file to your root directory.
gem 'rubocop', '>= 1.0', '< 2.0'
Install Stylelint linters checker using the following command...
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
-
Remember to copy the .stylelintrc.json file to the root directory.
-
Copy the linters.yml file inside of path .github/workflows
To run LINTERS, run the following command:
Run the following command for Ruby code...
rubocop
Run the following command for CSS code...
npx stylelint "**/*.{css,scss}"
- Implement unit tests using RSpec.
- Implement integration tests with RSpec & Capybara.
This application is deployed on Render. Visit the following link... https://rails-budget-app-ls62.onrender.com/
You can visit my presentation video at,,, Demo video...
👤 Juan Carlos Muñoz
- GitHub: @jcmunav63
- Twitter: @jcmunav63
- LinkedIn: @juan-carlos-muñoz
- Add functionalities for deleting categories and expenses.
- Add other options, like managing the assigned budget by period (week, month).
- Add payment options.
Contributions, issues, and feature requests are welcome!
If you like this project please give me a star on Github. Thanks in advance.
I would like to acknowledge Gregoire Vella for the original idea of this mobile app design (for iOS). You can review his project at: Behance
I would also like to thank all my colleagues, who inspire me to do my best everyday.
Did you create this project from scratch?
- Yes, it is a complete Ruby on Rails project for creating a web Ruby on Rails Budget App, with connection to an external PostgreSQL database, CRUD operations, data validation, user authentication, and testing.
This project is MIT licensed.