A full-stack personal finance tracking application built with MongoDB, Express.js, React, and Node.js.
- User authentication (register/login)
- Track income and expenses
- Categorize transactions
- Set and monitor budgets
- Financial reports and analytics
- Secure and private data storage
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database (MongoDB Atlas)
- Mongoose - ODM for MongoDB
- JWT - Authentication
- bcryptjs - Password hashing
- React - UI library
- React Router - Navigation
- Tailwind CSS - Styling
- shadcn/ui - UI components
- Lucide React - Icons
- Node.js (v14 or higher)
- MongoDB Atlas account
- npm or yarn
-
Clone the repository ```bash git clone cd tracksy ```
-
Install Backend Dependencies ```bash cd server npm install ```
-
Install Frontend Dependencies ```bash cd ../client npm install ```
-
Configure Environment Variables
Create a .env file in the server directory:
```env
MONGODB_URI=mongodb://atlas-sql-6900f19ac558922b8432b469-aabfet.a.query.mongodb.net/myVirtualDatabase?ssl=true&authSource=admin
JWT_SECRET=your-secret-key-here
PORT=5000
NODE_ENV=development
```
Create a .env file in the client directory:
```env
REACT_APP_API_URL=http://localhost:5000/api
```
-
Start the Backend Server ```bash cd server npm run dev ``` The server will run on http://localhost:5000
-
Start the Frontend (in a new terminal) ```bash cd client npm start ``` The app will run on http://localhost:3000
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
GET /api/transactions- Get all transactionsPOST /api/transactions- Create transactionPUT /api/transactions/:id- Update transactionDELETE /api/transactions/:id- Delete transactionGET /api/transactions/stats- Get transaction statistics
GET /api/categories- Get all categoriesPOST /api/categories- Create categoryPUT /api/categories/:id- Update categoryDELETE /api/categories/:id- Delete category
GET /api/budgets- Get all budgetsPOST /api/budgets- Create budgetPUT /api/budgets/:id- Update budgetDELETE /api/budgets/:id- Delete budget
PUT /api/users/profile- Update user profilePUT /api/users/password- Update password
- name, email, password (hashed)
- currency preference
- timestamps
- user reference
- type (income/expense)
- amount, category, description
- date, timestamps
- user reference
- name, type (income/expense)
- color, icon
- timestamps
- user reference
- category reference
- amount, period (monthly/yearly)
- month, year
- timestamps
- Password hashing with bcryptjs
- JWT token authentication
- Protected API routes
- User data isolation
- Input validation
- Set environment variables
- Deploy from GitHub or CLI
- Ensure MongoDB Atlas IP whitelist includes deployment server
- Build the React app:
npm run build - Deploy the
buildfolder - Set
REACT_APP_API_URLto your backend URL
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.