Giter VIP home page Giter VIP logo

madhavautomates / budget-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from evans22j/budget-app

0.0 0.0 0.0 1.62 MB

Budgy-Budget is a mobile web application where you can manage your budget. You have a list of transactions associated with a category so that you can see how much money you spent and on what. Built with Ruby on Rails, PostgreSQL.

License: MIT License

JavaScript 1.15% Ruby 67.02% CSS 7.11% HTML 24.72%

budget-app's Introduction

Budget-App

Description

The Ruby on Rails capstone project (remember what they are?) is about building a mobile web application where you can manage your budget: you have a list of transactions associated with a category, so that you can see how much money you spent and on what.

  • I created a Ruby on Rails application that allows the user to:

    • register and log in, so that the data is private to them.
    • introduce new transactions associated with a category.
    • see the money spent on each category.

Screenshots ๐Ÿ“ธ

Categories

Category-Details 

Learning objectives

  • Use ruby gems as software packages system.
  • Install Ruby on Rails framework.
  • Understand Rails RESTful design and router.
  • Use controllers to handle requests and render empty views.
  • Use params from browser request in a safe way.
  • Use preprocessed html file with embedded Ruby code.
  • Use layouts and templates for shared content.
  • Use database migration files to maintain database schema.
  • Use validations for models.
  • Secure app from n+1 problems.
  • Understand what ORM is.
  • Write SQL queries with ActiveRecord.
  • Set up associations between models.
  • uild a webapp that requires the user to log in.
  • Use devise gem for authentication.
  • Limit access to webapp resources based on authorization rules.
  • Analyze in writing why you have made a coding choice using one structure over another.

Live Demo ๐Ÿ”—

Live Demo Link

Loom Video ๐Ÿ”—

Loom Video Link

Getting Started

To get a local copy for this project and running follow these simple example steps.

Prerequisites

  • You need to have git installed in your machine.
  • Install a recent version of Postgres.
  • Already install Rails

Setup

Setting Up PostgreSQL

  • 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 blog-app -s

Creating the Budgy-Budget application

  • To create project with PostgreSQL database
$   rails new Rails-capstone-Budgy-Budget --database=postgresql  #or
$   rails new Rails-capstone-Budgy-Budget -d postgresql

$   cd Rails-capstone-Budget-app # Move into the application directory

Clone this repository

$ git clone https://github.com/evans22j/Budget-App.git
$ cd Budget-App

Create the database

$   rails db:create   # or
$   rake db:create

Install linter and

  • Rubocop gem
$  bundle init
$  bundle install
  • Stylelint package
$  npm init -y
$  npm install
$  npm install --save-dev [email protected] [email protected] [email protected] [email protected]
  • Run linter
$  rubocop .
$  npx stylelint "**/*.{css,scss}" 
  • In auto-correct mode, RuboCop will try to automatically fix offenses:
$  rubocop -A # or
$  rubocop --auto-correct-all
$  npx stylelint "**/*.{css,scss}" --fix 

Starting up the Web Server

$   rails s # or
$   rails server # or
$   rails server -p3001
  • To restart the server
$  sudo service postgresql restart 
$  rails db:reset #to clean the database                                                                    

Listing Existing Routes

  • You can now visit http://localhost:3000 to view your new website!

You can also execute the rails routes command in your terminal to produce the same output.

Generate rspec

  • At the first you need to include those lines in your Gemfile
  gem 'rails-controller-testing'
  gem 'rspec-rails'

Install RSpec

$  rails generate rspec:install
  • This should generate some files that you will need to run your tests and should give us a Controller and a View

  • Then run:

$  rspec spec     # to test if your tests are passed

Generate MVC with scaffold

  $  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

Generate Schema

  • 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  
  • To check available routes
  $   rails routes  

Run Capybara

$  bundle exec rspec ./spec/features/

Run spec

$  bundle exec rspec ./spec/models/

Built With ๐Ÿ› ๏ธ

This project is build with:

  • Ruby
  • Ruby on Rails

Authors

๐Ÿ‘ค Evans Sitibekiso

๐Ÿค Contributor

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgments

๐Ÿ“ License

This project is MIT licensed.

budget-app's People

Contributors

evans22j avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.