{"id":20617851,"url":"https://github.com/joozef315/fintracker-api","last_synced_at":"2026-04-13T15:33:16.496Z","repository":{"id":247458613,"uuid":"825855169","full_name":"JooZef315/FinTracker-API","owner":"JooZef315","description":"A GraphQL API for  personal finance tracking built  with NestJS, and Drizzle.  It allows users to manage their income, expenses, and budgets efficiently.","archived":false,"fork":false,"pushed_at":"2024-07-23T18:20:59.000Z","size":493,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T04:46:21.377Z","etag":null,"topics":["drizzle-orm","graphql","nestjs","nodejs","passportjs","sqlite","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JooZef315.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-08T16:22:42.000Z","updated_at":"2024-07-23T18:24:47.000Z","dependencies_parsed_at":"2024-07-23T21:18:51.599Z","dependency_job_id":null,"html_url":"https://github.com/JooZef315/FinTracker-API","commit_stats":null,"previous_names":["joozef315/fintracker-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JooZef315%2FFinTracker-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JooZef315%2FFinTracker-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JooZef315%2FFinTracker-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JooZef315%2FFinTracker-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JooZef315","download_url":"https://codeload.github.com/JooZef315/FinTracker-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242277397,"owners_count":20101531,"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":["drizzle-orm","graphql","nestjs","nodejs","passportjs","sqlite","typescript"],"created_at":"2024-11-16T12:06:16.385Z","updated_at":"2026-04-13T15:33:11.468Z","avatar_url":"https://github.com/JooZef315.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fin Tracker\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo-small.svg\" width=\"200\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456\n[circleci-url]: https://circleci.com/gh/nestjs/nest\n\n  \u003cp align=\"center\"\u003eNest is a progressive \u003ca href=\"http://nodejs.org\" target=\"_blank\"\u003eNode.js\u003c/a\u003e framework for building efficient and scalable server-side applications.\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n\n## Description\n\nWelcome to Fin Tracker! This is a personal finance tracking application designed to help you manage your income, expenses, and budgets effectively. With Fin Tracker, you can easily keep track of your financial activities, generate detailed reports, and stay on top of your budget goals.\n\n## Features\n\n- **User Authentication**: Secure user authentication using JWT and Passport.js.\n- **Manage Accounts**: Edit or delete your user account.\n- **Add Transactions**: Add income and expense transactions with specific types, amounts, and dates.\n- **Budget Management**: Create multiple budgets, each with a type, status, limit, and date range.\n- **Automatic Budget Assignment**: Expenses are automatically assigned to the relevant budget based on type and date.\n- **Generate Reports**: Generate detailed financial reports including current balance, total income, total spending, spending per category, budgets per status, and expenses per month.\n\n## Technologies Used\n\n- **NestJS**: A progressive Node.js framework for building efficient, reliable, and scalable server-side applications.\n- **GraphQL**: A query language for your API, and a server-side runtime for executing queries.\n- **SQLite**: A lightweight, disk-based database. with **Turso**, A distributed SQLite database\n- **Drizzle ORM**: A lightweight TypeScript ORM for SQL databases.\n- **JWT \u0026 Passport.js**: For secure user authentication.\n- **Moment.js**: Simplifies date formatting and manipulation.\n\n## Configuration\n\nCreate a .env file in the root of your project with the following variables:\n\n```bash\nPORT = 3001\nTURSO_DATABASE_URL=\nTURSO_AUTH_TOKEN=\nACCESS_TOKEN_SECRET=\n```\n\n## Installation\n\n1. **Clone the Repository**\n   ```bash\n   git clone https://github.com/JooZef315/FinTracker-API\n   cd FinTracker-API\n   ```\n2. **Install Dependencies**\n\n   ```bash\n    npm install\n    # or\n    yarn install\n   ```\n\n3. **Run Database Migrations**\n\n   ```bash\n    npm run db:push\n   ```\n\n4. **Run the app**\n\n   ```bash\n   # development\n   $ npm run start\n\n   # watch mode\n   $ npm run start:dev\n\n   # production mode\n   $ npm run start:prod\n   ```\n\n5. **Access the GraphQL Playground**\n\n   Open your browser and navigate to http://localhost:3001/graphql to explore the API using the GraphQL Playground.\n\n## API Documentation\n\n### GraphQL Schema\n\n1. **User**\n\n```graphQl\ninput CreateUserInput {\n  name: String!\n  email: String!\n  password: String!\n  bio: String\n  balance: Float!\n}\n\ninput EditUserInput {\n  name: String\n  email: String\n  password: String\n  bio: String\n}\n\ntype User {\n  id: ID!\n  name: String!\n  email: String!\n  bio: String\n  balance: Float!\n}\n\ntype Query {\n  user: User!\n}\n\ntype Mutation {\n  createUser(newUser: CreateUserInput!): User!\n  editUser(userData: EditUserInput!): User!\n  deleteUser: String!\n}\n```\n\n2. **transactions**\n\n```graphQl\nscalar Date\n\nenum IncomeCategory {\n  SALARY\n  SAVINGS\n  INVESTMENT\n  GIFTS\n  OTHER\n}\n\nenum ExpenseCategory {\n  FOOD\n  RENT\n  UTILITIES\n  ENTERTAINMENT\n  TRANSPORTATION\n  HEALTHCARE\n  EDUCATION\n  OTHER\n}\n\ninput AddIncomeInput {\n  amount: Float!\n  source: IncomeCategory!\n}\n\ninput AddExpenseInput {\n  amount: Float!\n  category: ExpenseCategory!\n  budgetId: String\n}\n\ntype Income {\n  id: ID!\n  userId: String!\n  amount: Float!\n  source: IncomeCategory!\n  balanceAfter: Float!\n  createdAt: Date!\n}\n\ntype Expense {\n  id: ID!\n  userId: String!\n  amount: Float!\n  category: ExpenseCategory!\n  budgetId: String\n  balanceAfter: Float!\n  createdAt: Date!\n}\n\ntype Query {\n  income(\n    page: Int\n    source: IncomeCategory\n    before: Date\n    after: Date\n  ): [Income!]!\n  expense(\n    page: Int\n    category: ExpenseCategory\n    before: Date\n    after: Date\n  ): [Expense!]!\n}\n\ntype Mutation {\n  addIncome(newIncome: AddIncomeInput!): Income!\n  addExpense(newExpense: AddExpenseInput!): Expense!\n}\n```\n\n3. **Budgets**\n\n```graphQl\nscalar Date\n\nenum BudgetStatus {\n  DRAFT\n  IN_LIMIT\n  EXCEEDED\n  ARCHIVED\n}\n\ninput CreateBudgetInput {\n  limit: Float!\n  budgetCategory: ExpenseCategory!\n  description: String\n  startDate: Date\n  endDate: Date\n}\n\ninput EditBudgetInput {\n  limit: Float\n  description: String\n  startDate: Date\n  endDate: Date\n}\n\ntype Budget {\n  id: ID!\n  userId: String!\n  budgetCategory: ExpenseCategory!\n  description: String!\n  limit: Float!\n  overLimit: Float!\n  status: BudgetStatus!\n  startDate: Date!\n  endDate: Date!\n  expenses: [Expense!]!\n}\n\ntype Query {\n  budget(budgetId: String!): Budget!\n  budgets(category: ExpenseCategory, status: BudgetStatus): [Budget!]!\n}\n\ntype Mutation {\n  createBudget(newBudget: CreateBudgetInput!): Budget!\n  editBudget(budgetId: String!, budgetData: EditBudgetInput!): Budget!\n  deleteBudget(budgetId: String!): String!\n  archiveBudget(budgetId: String!): String!\n}\n```\n\n4. **Reports**\n\n```graphQl\ntype BudgetsPerstatus {\n  status: BudgetStatus!\n  Number_Of_budgets: Int!\n}\n\ntype SpendingPerCategory {\n  category: ExpenseCategory!\n  amount: Float!\n}\n\ntype ExpensesPerMonth {\n  month: String!\n  amount: Float!\n}\n\ntype Report {\n  userId: String!\n  name: String!\n  Current_Balance: Float!\n  Total_Income: Float!\n  Total_Spending: Float!\n  Spending_Per_Category: [SpendingPerCategory!]!\n  budgets_Per_status: [BudgetsPerstatus!]!\n  expenses_Per_Month: [ExpensesPerMonth!]!\n}\n\ntype Query {\n  report: Report!\n}\n```\n\n5. **Auth**\n\n```graphQl\ninput LoginInput {\n  email: String!\n  password: String!\n}\ntype Token {\n  accessToken: String!\n}\n\ntype Mutation {\n  login(data: LoginInput): Token!\n}\n```\n\n## Conclusion\n\nFin Tracker is your all-in-one solution for managing your personal finances efficiently. With powerful features and a user-friendly interface, it helps you stay on top of your financial goals. Happy tracking!\n\n## License\n\nThis project is licensed under the [MIT licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoozef315%2Ffintracker-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoozef315%2Ffintracker-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoozef315%2Ffintracker-api/lists"}