/rails-budget-app

A Ruby on Rails Budget App for managing your personal budget. It uses Ruby on Rails, PostgreSQL, CRUD operations, authentication, authorization, and testing.

Primary LanguageRubyMIT LicenseMIT

Rails Budget App

main-logo

Ruby on Rails Budget App

📗 Table of Contents

📖 About project - Ruby on Rails Budget App

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.

🛠 Built With

Tech Stack

Key Features

  • 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.

(back to top)

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

Install Ruby

Set Up Rails

Prerequisites: Ruby, Ruby Development Kit (for Windows), Ruby Gems packaging system, and PostgreSQL database server. Run the following commands...

$ gem install rails

Setup

  cd my-folder
  git clone https://github.com/jcmunav63/rails-budget-app.git

Install

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

Usage

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

Run tests

  • 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.

(back to top)

Deployment

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...

(back to top)

👥 Authors

👤 Juan Carlos Muñoz

(back to top)

🔭 Future Features

  • Add functionalities for deleting categories and expenses.
  • Add other options, like managing the assigned budget by period (week, month).
  • Add payment options.

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

(back to top)

⭐️ Show your support

If you like this project please give me a star on Github. Thanks in advance.

(back to top)

🙏 Acknowledgments

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.

(back to top)

❓ FAQ

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.

(back to top)

📝 License

This project is MIT licensed.

(back to top)