https://github.com/edd-ie/pockets-b
Api for financial tracking and budgeting web application
https://github.com/edd-ie/pockets-b
api finance finance-tracker rails
Last synced: 7 months ago
JSON representation
Api for financial tracking and budgeting web application
- Host: GitHub
- URL: https://github.com/edd-ie/pockets-b
- Owner: edd-ie
- License: bsd-3-clause
- Created: 2023-07-04T06:34:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-10T10:49:55.000Z (about 2 years ago)
- Last Synced: 2024-08-23T20:16:54.148Z (about 1 year ago)
- Topics: api, finance, finance-tracker, rails
- Language: Ruby
- Homepage: https://pockets.onrender.com/
- Size: 153 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# [POCKETS(backend)](https://ai-hub-1.vercel.app/)
The API to [Pockets](https://pocketswatch.vercel.app/)
## Table of Contents
1. [Getting started](#Getting-started)
2. [Usage](#Usage)
3. [Relationships](#relations)
3. [Models](#Methods)
- [Users](#user)
- [Cards](#card)
- [Sim](#sim)
- [Saving](#saving)
- [Card savings](#save_cards)
- [Sim savings](#save_sims)
4. [Routes](#routes)
6. [Contributors](#contributors)
7. [Licenses](#license)
8. [Resources](#Sources)The project runs on rails and postgesql
### 1. Website
You can access the site on [pockets-backend](https://pockets.onrender.com/)
### 2. Cloning
**Clone** the project files to your local repository:
- HTTPS => `https://github.com/edd-ie/pockets-b.git`
- SSH => `git@github.com:edd-ie/pockets-b.git`
- Git CLI => `gh repo clone edd-ie/pockets-b`Open the terminal and install all dependencies using.
```
bundle install
```After installation run this command to start the rails server
```
rails s
```Your default browser will be launched and the homepage will be rendered
## Relationships
### One-to-Many
Users has many:
- Cards
- Sims
- SavingsCard has many:
- Transactions
- Save contributionsSim has many:
- Transactions
- Save contributionsCard has many:
- Card contributions
- sim contributions### Many-to-Many
User has many:
- Card transactions through cards
- Sim transactions through sims
- Sim contributions through savings
- Card contributions through savingsSavings has many:
- Cards through cards savings
- Sims through sim savingsCard has many:
- Savings through card savingsSim has many:
- Savings through Sim savings## Models
This handles the logic for the data sourcing from the data
- User - User logic- Card - card Logic
- Sim - sim Logic
- Saving - savings logic
- SaveCard - Card savings logic
- SaveSim - Sim saving logic
## Routes
The routes the have full http requests functionality(GET, POST, DELETE, PATCH, PUT)
```
/users
/savings
/cards
/sims
/save_cards
/save_sims
/sessions
```### Custom routes
For added functionality some custom routes were created to help get specific data from database
```
patch "/changePass", to: "users#changePass"get "/simCat/:id", to: "users#simCat"
get "/cardCat/:id", to: "users#cardCat"post '/addSaveCard/:id', to: "savings#addCardSave"
post '/addSaveSim/:id', to: "savings#addSimSave"
get "/topSim/:id", to: "users#topSim"
get "/topCard/:id", to: "users#topCard"get "/userSims/:id", to: "users#userSim"
get "/userCards/:id", to: "users#userCard"get "/simUsage/:id", to: "users#simUsage"
get "/cardUsage/:id", to: "users#cardUsage"get '/uSimBal/:id', to: "users#simBal"
get '/uCardBal/:id', to: "users#cardBal"get '/userSaves/:id', to: "users#userSavings"
post "/login", to: "sessions#create"
post "/signup", to: "users#create"
get "/me", to: "users#show"
delete "/logout", to: "sessions#destroy"
```## Contributors
This project was a team effort from the following individuals :
- [Edd.ie](https://github.com/edd-ie)
- [Glory](https://github.com/Nkathaglow)
- [Austin](https://github.com/Naulikha)## Licenses
The project is licensed under the [BSD 3-Clause "New" or "Revised" License](https://github.com/highlightjs/highlight.js/blob/main/LICENSE), thus redistribution and use in source and binary forms are permitted provided that the conditions are met
## Resources
WebPage -> [pockets backend](https://pockets.onrender.com/)Database hosting-> [Postgres](https://dashboard.render.com/)