{"id":26288706,"url":"https://github.com/edd-ie/pockets-b","last_synced_at":"2026-05-22T05:05:33.606Z","repository":{"id":178538891,"uuid":"662000764","full_name":"edd-ie/pockets-b","owner":"edd-ie","description":"Api for financial tracking and budgeting web application","archived":false,"fork":false,"pushed_at":"2023-07-10T10:49:55.000Z","size":157,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-23T20:16:54.148Z","etag":null,"topics":["api","finance","finance-tracker","rails"],"latest_commit_sha":null,"homepage":"https://pockets.onrender.com/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edd-ie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-04T06:34:50.000Z","updated_at":"2023-07-10T11:25:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5c6a44d-8863-4f06-b8f7-66fda5bb2127","html_url":"https://github.com/edd-ie/pockets-b","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":0.1063829787234043,"last_synced_commit":"6e3b66eeeeb347753297d36de45aa619c5b56966"},"previous_names":["edd-ie/pockets-b"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edd-ie%2Fpockets-b","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edd-ie%2Fpockets-b/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edd-ie%2Fpockets-b/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edd-ie%2Fpockets-b/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edd-ie","download_url":"https://codeload.github.com/edd-ie/pockets-b/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243652691,"owners_count":20325611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","finance","finance-tracker","rails"],"created_at":"2025-03-14T22:14:35.080Z","updated_at":"2026-05-22T05:05:33.565Z","avatar_url":"https://github.com/edd-ie.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [POCKETS(backend)](https://ai-hub-1.vercel.app/)\n\nThe API to [Pockets](https://pocketswatch.vercel.app/)\n\n## Table of Contents\n\n1. [Getting started](#Getting-started)\n2. [Usage](#Usage)\n3. [Relationships](#relations)\n3. [Models](#Methods)\n   - [Users](#user)\n   - [Cards](#card)\n   - [Sim](#sim)\n   - [Saving](#saving)\n   - [Card savings](#save_cards)\n   - [Sim savings](#save_sims)\n4. [Routes](#routes)\n6. [Contributors](#contributors)\n7. [Licenses](#license)\n8. [Resources](#Sources)\n\n## \u003ca id=\"Getting-started\"\u003eGetting started\u003c/a\u003e\n\nThe project runs on rails and postgesql\n\n### 1. Website\n\nYou can access the site on [pockets-backend](https://pockets.onrender.com/)\n\n### 2. Cloning\n\n**Clone** the project files to your local repository:\n\n- HTTPS =\u003e `https://github.com/edd-ie/pockets-b.git`\n- SSH =\u003e `git@github.com:edd-ie/pockets-b.git`\n- Git CLI =\u003e `gh repo clone edd-ie/pockets-b`\n\nOpen the terminal and install all dependencies using.\n\n```\nbundle install\n```\n\nAfter installation run this command to start the rails server\n\n```\nrails s\n```\n\nYour default browser will be launched and the homepage will be rendered\n\n## \u003ca id=\"relations\"\u003eRelationships\u003c/a\u003e\n![Alt text](database.drawio.png)\n\n### One-to-Many\nUsers has many:\n - Cards\n - Sims\n - Savings\n\nCard has many:\n  - Transactions\n  - Save contributions\n\nSim has many:\n  - Transactions\n  - Save contributions\n\nCard has many:\n  - Card contributions\n  - sim contributions\n\n### Many-to-Many\nUser has many:\n  - Card transactions through cards\n  - Sim transactions through sims\n  - Sim contributions through savings\n  - Card contributions through savings\n\nSavings has many:\n  - Cards through cards savings\n  - Sims through sim savings\n\nCard has many:\n  - Savings through card savings\n\nSim has many:\n  - Savings through Sim savings\n\n## \u003ca id=\"Methods\"\u003eModels\u003c/a\u003e\n\nThis handles the logic for the data sourcing from the data\n - User - User logic\n\n - Card - card Logic\n\n - Sim - sim Logic\n\n - Saving - savings logic\n\n - SaveCard - Card savings logic\n\n - SaveSim -  Sim saving logic\n\n## \u003ca id=\"routes\"\u003eRoutes\u003c/a\u003e\nThe routes the have full http requests functionality(GET, POST, DELETE, PATCH, PUT)\n```\n/users\n/savings\n/cards\n/sims\n/save_cards\n/save_sims\n/sessions\n```\n\n### Custom routes\nFor added functionality some custom routes were created to help get specific data from database\n```\n  patch \"/changePass\", to: \"users#changePass\"\n\n  get \"/simCat/:id\", to: \"users#simCat\"\n  get \"/cardCat/:id\", to: \"users#cardCat\"\n\n  post '/addSaveCard/:id', to: \"savings#addCardSave\"\n  post '/addSaveSim/:id', to: \"savings#addSimSave\"\n  \n  get \"/topSim/:id\", to: \"users#topSim\"\n  get \"/topCard/:id\", to: \"users#topCard\"\n\n  get \"/userSims/:id\", to: \"users#userSim\"\n  get \"/userCards/:id\", to: \"users#userCard\"\n\n  get \"/simUsage/:id\", to: \"users#simUsage\"\n  get \"/cardUsage/:id\", to: \"users#cardUsage\"\n\n  get '/uSimBal/:id', to: \"users#simBal\"\n  get '/uCardBal/:id', to: \"users#cardBal\"\n\n  get '/userSaves/:id', to: \"users#userSavings\"\n\n  post \"/login\", to: \"sessions#create\"\n  post \"/signup\", to: \"users#create\"\n  get \"/me\", to: \"users#show\"\n  delete \"/logout\", to: \"sessions#destroy\"\n```\n\n\n## \u003ca id=\"contributors\"\u003eContributors\u003c/a\u003e\n\nThis project was a team effort from the following individuals :\n\n- [Edd.ie](https://github.com/edd-ie)\n- [Glory](https://github.com/Nkathaglow)\n- [Austin](https://github.com/Naulikha)\n\n## \u003ca id=\"license\"\u003eLicenses\u003c/a\u003e\n\nThe 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\n\n## \u003ca id=\"sources\"\u003eResources\u003c/a\u003e\nWebPage -\u003e [pockets backend](https://pockets.onrender.com/)\n\nDatabase hosting-\u003e [Postgres](https://dashboard.render.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedd-ie%2Fpockets-b","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedd-ie%2Fpockets-b","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedd-ie%2Fpockets-b/lists"}