This is a full-stack expense tracker application built with Node.js for the backend and Angular for the frontend. It allows users to sign up, log in, add, edit, delete, and filter expenses by date and category.
- Features
- Technologies Used
- Prerequisites
- Installation
- Running the Application
- API Endpoints
- Usage
- License
- User authentication with JWT
- Landing page
- Add, edit, delete, and view expenses
- Filter expenses by date range and category
- Total expenses calculation for the all-time and filtered expenses like this past week, last month, last 3 months, last 6 months and custom date range.
- Forgot and reset password functionality
- Responsive design using Tailwind CSS
- Backend: Node.js, Express.js, MongoDB, Mongoose, JWT, Nodemailer
- Frontend: Angular, Tailwind CSS
- Authentication: JSON Web Tokens (JWT)
- Node.js (v14.x or later)
- Angular CLI (v18.x or later)
- MongoDB (local or remote instance)
-
Clone the repository:
git clone https://github.com/manthanank/expense-tracker-app.git cd expense-tracker-app/backend
-
Install dependencies:
npm install
-
Create a
.env
file in thebackend
directory with the following content:PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret EMAIL_USER=your-email@gmail.com EMAIL_PASS=your-email-password
-
Start the backend server:
npm start
-
Navigate to the frontend directory:
cd expense-tracker-app
-
Install dependencies:
npm install
-
Start the frontend server:
ng serve
- The backend server will run on
http://localhost:5000
. - The frontend server will run on
http://localhost:4200
.
- POST /api/auth/signup: Create a new user
- POST /api/auth/login: Authenticate a user and get a token
- POST /api/auth/forgot-password: Send password reset email
- POST /api/auth/reset-password/:token: Reset user password
- GET /api/expenses: Get all expenses for the logged-in user
- GET /api/expenses/:id: Get an expense by ID
- POST /api/expenses: Add a new expense
- PUT /api/expenses/:id: Update an existing expense
- DELETE /api/expenses/:id: Delete an expense
- Sign Up: Create a new account by navigating to the sign-up page.
- Log In: Log in with your credentials to access the expense tracker.
- Forgot Password: If you forget your password, use the forgot password link to reset it.
- Reset Password: Follow the instructions in the reset password email to set a new password.
- Add Expense: Use the form to add a new expense.
- View Expenses: View a list of all your expenses. Use the filter options to filter by date range and category.
- Edit Expense: Click on an expense to edit its details.
- Delete Expense: Click the delete button to remove an expense.
This project is licensed under the MIT License. See the LICENSE file for details.