The Expense Tracker is a full-stack web application designed to help users track their expenses and manage their finances efficiently. It features both a frontend for the user interface and a backend to manage the business logic and database.
- Track Expenses: Add, edit, and delete expenses.
- View Reports: Generate reports on spending habits.
- User Authentication: Secure login and account management.
- Responsive Design: Works well on both mobile and desktop devices.
The project is divided into two main components:
- Backend: Handles the server-side logic, including routing, database interactions, and API management.
- Frontend: Manages the user interface and client-side functionality.
The backend is built using Node.js with Express as the framework. It interacts with the database to manage expenses, user authentication, and other necessary operations.
Key files and folders:
app.js
: The main application logic.index.js
: Entry point for the backend server.controllers/
: Contains logic for managing routes like expenses and users.models/
: Defines the database schema.routes/
: Defines the API endpoints.db/
: Handles database connections and queries.
Dependencies:
To install backend dependencies, navigate to the backend
folder and run:
npm install
To start the backend server, run:
npm start
cd ../frontend
npm install
npm start
Prerequisites:
- Node.js and npm should be installed.
- MongoDB should be set up for the backend to interact with.
Clone the repository: git clone
cd Expense-Tracker-main
Backend setup:
cd backend
npm install
npm start
Frontend setup:
cd ../frontend
npm install
npm start
Once both the frontend and backend servers are running, access the app at: http://localhost:3000