Money Tracker App is a simple web application that helps you track your income and expenses. It allows users to add, update, delete, and view their financial records. This project is built using Node.js, Express, and MongoDB, with Mongoose as the ODM.
- Add, update, delete, and view income records
- Add, update, delete, and view expense records
- Calculate total income and expenses
- Simple and intuitive user interface
- Node.js
- Express
- MongoDB
- Mongoose
- HTML, CSS, and JavaScript for the frontend
-
Clone the repository:
git clone https://github.com/Sweety-Vigneshg/money-tracker-app.git cd money-tracker-app
-
Install dependencies:
npm install
-
Set up MongoDB:
Make sure you have MongoDB installed and running on your local machine or have access to a remote MongoDB instance.
-
Configure MongoDB connection:
In
index.js
, update the MongoDB connection string if necessary:mongoose.connect('mongodb://localhost:27017/money_tracker', { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true, useFindAndModify: false });
-
Run the application:
npm start
The server should now be running on
http://localhost:3000
.
- index.js: Main entry point of the application.
- routes/: Contains the route definitions for expenses and incomes.
- models/: Contains the Mongoose models for Expense and Income.
- controllers/: Contains the controller logic for handling requests related to expenses and incomes.
GET /expenses
: Get all expenses.POST /expenses
: Create a new expense.GET /expenses/:id
: Get a specific expense by ID.PUT /expenses/:id
: Update a specific expense by ID.DELETE /expenses/:id
: Delete a specific expense by ID.GET /expenses/total
: Get the total amount of expenses.
GET /incomes
: Get all incomes.POST /incomes
: Create a new income.GET /incomes/:id
: Get a specific income by ID.PUT /incomes/:id
: Update a specific income by ID.DELETE /incomes/:id
: Delete a specific income by ID.GET /incomes/total
: Get the total amount of incomes.
A simple HTML page public/expenses.html
is provided to showcase the expenses. You can extend this with more pages and styles as needed.
Contributions are welcome! Please feel free to submit a pull request or open an issue.
This project is licensed under the MIT License.