A REST API for managing personal finances with income and expense tracking.
- Clone the repository:
git clone https://github.com/anuuragg/finora_api.git
cd finora-api
- Install dependencies:
npm install
- Create
.env
file:
PORT=8888
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
- Start the server:
npm run dev
├── controllers/
│ ├── authController.js
│ ├── userController.js
│ ├── incomeController.js
│ ├── incomeSrcController.js
│ ├── expenseController.js
│ └── subCatController.js
├── routes/
│ ├── auth.js
│ ├── user.js
│ ├── income.js
│ ├── expenses.js
│ └── sub_cat.js
├── middlewares/
│ └── verifyToken.js
├── lib/
│ └── dbConnect.js
│ └── customError.js
├── .env
├── server.js
└── package.json
POST /signup
- Register userPOST /login
- Login user
GET /get-user
- Get user profilePUT /update-user/:id
- Update userDELETE /delete-user/:id
- Delete user
GET /get-all-sub-cat
- Get all subcategoriesGET /get-sub-cat/:id
- Get specific subcategoryPOST /create-sub-cat
- Create subcategoryDELETE /delete-sub-cat/:id
- Delete subcategory
Income Sources:
GET /get-all-income-src
- Get all income sourcesGET /get-income-src/:id
- Get specific income sourcePOST /add-income-src
- Add income sourcePUT /update-income-src/:id
- Update income sourceDELETE /delete-income-src/:id
- Delete income source
Income Records:
GET /get-all-income
- Get all income recordsGET /get-income/:id
- Get specific income recordPOST /add-income
- Add new income logPUT /update-income/:id
- Update incomeDELETE /delete-income/:id
- Delete income
POST /create-expense
- Create expenseGET /get-expense/:id
- Get specific expenseGET /get-all-expenses
- Get all expensesPUT /update-expense/:id
- udpdate specific expenseDELETE /delete-expense/:id
- Delete expense
GET /get-records
- Get total balanceGET /get-specific-record
- Get total balance for a specified date