Gringotts is a personal expense tracker built using Ruby, Ruby on Rails and React. This repository stores the code for the Backend for the project. The Frontend code base can be found over here.
The problem this project tries to solve is that of building a personal application for managing one's expenses. The technical goals of this project was to learn best practices and implement production grade Rails and React application which can be consumed with locally or deployed on a PaaS such as Heroku or AWS.
The project is heavily inspired by You Need A Budget and Walnut but has a pro privacy stance i.e. you are in direct control of your data.
The expense management follows the age old paradigm of the Envelope Budgeting System where you create outflow buckets. Categorical expense are made using these buckets.
For example, you might have three spending buckets such as Recreation, Groceries and Self Development. At the start of the cycle, you may credit funds from another bucket, say Salary, and consume/debit funds from these buckets in the form of Expenses eg. Yoga Class (Self Dev bucket), Watching a play (Recreation), Eggs and Ham (Groceries).
You can create Internal Transfer between these buckets as well, for example, I might have two buckets, Salary and Cash. I can do an internal from Salary to Cash to replenish my cash reservers.
Future scope includes using some light weight ML modeling such as K Means or Multiple Regression to provide preemptive insights of expenses and visualizations using Pandas/Bokeh/Seaborn
In case of any questions, queries or suggestions please reach out to @abhn or @darth-dodo.
Cheers!
- Make sure you have a Postgres version greater than 9.6
- Clone the repo
- Use RVM to install and set ruby to version 2.6.0
- Run
bundle install
- Create development postgres db using the command
createdb gringotts_dev
as mentioned in thedatabase.yml
- Run
rake db:migrate
to create all the database objects in your local db - Run
rake db:seed
to create the a couple of users- Admin User
- Username: admin@gringotts.com
- Password:
get_rich_or_die_codin
- Demo User
- Username: demo@gringotts.com,
- Password:
demo-user-for-sandbox
- Admin User
- Run the local server using the command
rails s
- Hop on to the site and go to
<your-localhost-with-port>/admin
- Use the above credentials to log into the admin panel
- Have fun tinkering around!
- TBD
- The Backend sandbox can be accessed using Active Admin at https://gringotts-backend.herokuapp.com/admin
- The high level Dashboard can be viewed over here using Active Admin interface
- Deeper Data Analytics and SQL exploration can be done over a Metabase instance deployed on Heroku at https://gringotts-demo-metabase.herokuapp.com/ using the following credentials. Takes a while to load the Heroku app. Please reload the tab if required
- Username: demo@gringotts.com
- Password:
demo-user-for-sandbox123
- A sample dashboard can be viewed over here
- [WIP] The sandbox app is hosted at https://gringotts.netlify.com
- While working on anything, we tend to come across educational resources which help us in getting better and understanding a problem as well as it's solution on a deeper level
- The Educational Resources file is a place we have listed down the resources we referred to while working on this project for giving a deeper context and through learning to the reader if required.
- Move it from being a tracker to a manager
- The ideal end state of this project is an automated system which extracts majority of your expense related information using your digital footprint (Bank Statements, SMSes, Emails)
- Using this information help you extract some insights such projected expenses, top spending categories or tags or push you towards goal based savings
- In order to achieve these goals, once we have a stable, simple and straightforward Web App which just takes in expenses and stored them, we will move to some basic visualizations and dashboards where the user can infer insights from the metrics and stats
- APIfying
- Lame API documentation
- PaperTrail
- Polymorphic demo:
- Swagger/Slate/Postman integration
- Active Admin setup
- Airbrake/Sentry
- Heroku add ons
- Database backup (Autobus)
- Scheduler (Heroku Scheduler)
- Database browser (Trevor)
- Scheduling using Sidekiq
- Data Analytics and SQL Exploration using sister Metabase App
- RSpec
- RSpec setup
- FactoryBot Setup
- Shoulda Matcher Setup
- Model Specs
- Auth Specs
- Service Specs
- Controller Specs
- Check out factory pattern for test cases recommended by Dj
- YAML based config
- OAuth with Google and Github
- Integration with Netflix's Fast JSON API and response refactoring
- Code Refactor pair programming with @abhn
- Query Optimization with @abhn
- CSV downloads
- Filters (based on FE)