A full-stack finance tracking application built with Next.js, Express.js, and MongoDB. Users can register, login, and manage their personal finances including transactions, budgets, categories, and financial goals.
- User Authentication: Register and login with JWT tokens
- Dashboard: Real-time financial overview with monthly stats
- Transactions: Add, view, and delete income/expense transactions
- Categories: Organize transactions with custom categories
- Budgets: Set and track spending limits
- Financial Goals: Set and monitor progress towards financial milestones
- Responsive Design: Works on desktop and mobile devices
- Next.js 14 (React)
- TypeScript
- Tailwind CSS
- Lucide React Icons
- React Hook Form
- React Hot Toast
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT Authentication
- bcryptjs for password hashing
- Node.js (v16 or higher)
- MongoDB (local or MongoDB Atlas)
- npm or yarn
-
Clone the repository
git clone <repository-url> cd Finance_Project
-
Install backend dependencies
cd server npm install -
Install frontend dependencies
cd ../client npm install -
Set up environment variables
Create a
config.envfile in theserverdirectory:DATABASE_URL=mongodb://localhost:27017/finance_tracker JWT_SECRET=your_jwt_secret_key_here PORT=5000
-
Start the backend server
cd server npm start -
Start the frontend development server
cd client npm run dev -
Open your browser
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Register a new account at http://localhost:3000/register
- Login with your credentials
- Add categories for organizing your transactions
- Create transactions to track income and expenses
- Set budgets to monitor spending
- Create financial goals to track progress
- View your dashboard for an overview of your finances
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user profilePUT /api/auth/me- Update user profile
GET /api/transactions- Get all transactionsPOST /api/transactions- Create new transactionDELETE /api/transactions/:id- Delete transaction
GET /api/categories- Get all categoriesPOST /api/categories- Create new categoryDELETE /api/categories/:id- Delete category
GET /api/budgets- Get all budgetsPOST /api/budgets- Create new budget
GET /api/goals- Get all goalsPOST /api/goals- Create new goalPUT /api/goals/:id- Update goalDELETE /api/goals/:id- Delete goal
GET /api/dashboard- Get dashboard statistics
Finance_Project/
├── client/ # Next.js frontend
│ ├── src/
│ │ ├── app/ # App router pages
│ │ ├── components/ # React components
│ │ └── lib/ # API utilities
│ └── package.json
├── server/ # Express.js backend
│ ├── models/ # MongoDB models
│ ├── config/ # Database configuration
│ ├── index.js # Main server file
│ └── package.json
└── README.md
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.