-
Full-stack expense tracker (backend + frontend) for tracking income/expense, charts, and basic auth.
-
Repo layout:
backend/— Node/Express API and DB modelsfrontend/expense-tracker/— Vite + React frontend (Tailwind, Recharts, react-icons)
-
Purpose: Helps users manage personal finances, analyze spending trends, and maintain records efficiently.
-
Target Users: Individuals or small businesses who want a simple and visual way to track expenses and income.
- Open two terminals.
npm install- Check scripts in
package.jsonthen run the appropriate script:npm run dev(if present) ornpm start / node server.js
- Ensure
.envcontains required variables (seebackend/README.md). - Tip: Test backend APIs first using Postman or curl to verify they are working before connecting the frontend.
-
npm install -
npm run dev -
Open the URL shown by Vite (usually
http://localhost:5173) -
Tip: Ensure the backend server is running and CORS is configured correctly for local development.
-
Quick check: Open the browser console (F12 → Console) to see if any runtime errors appear when loading the frontend.
- Browser console — runtime errors stop rendering components.
- Dev server output (both terminals) — check for import errors, missing modules, or port conflicts.
- Network tab — verify API calls succeed (status 200) and data is returned correctly.
- Check
package.jsonscripts — ensure you are running the correct dev scripts for frontend and backend.
- Backend README:
./backend/README.md - Frontend README:
./frontend/expense-tracker/README.md
- Express API with controllers for auth, dashboard, income, expense.
- Mongoose models stored in
models/. - File uploads stored in
uploads/(local). Seemiddleware/uploadMiddleware.js. - Security: Uses JWT authentication to protect routes and ensure only authenticated users can access their own data.
- Scalability: Modular route structure allows adding new features easily (e.g., reports, analytics, or additional resources).
- Node.js (16+)
- MongoDB (local or cloud)
- Optional: Postman for testing APIs
Provide these values in backend/.env (names below are typical — confirm in server.js / config/db.js):
MONGO_URIorDB_URI— MongoDB connection stringJWT_SECRET— secret for signing tokensPORT— server port (optional)- Any cloud/upload credentials if used
Tip: Keep your .env file private and do not push it to GitHub.
cd c:\Users\praja\OneDrive\Desktop\FincAI\backend
npm install
npm run dev # or npm start / node server.js