Expense-Tracker

Live Demo: https://mahendrachowdary-007.github.io/Expense-Tracker/

GitHub repo: https://github.com/MahendraChowdary-007/Expense-Tracker

Expense Tracker

A full-stack expense tracking application built with Node.js, Express, MongoDB, and React.

Features

Tech Stack

Backend

Frontend

Project Structure

expense_tracker/
├── backend/
│   ├── src/
│   │   ├── config/
│   │   │   └── db.js
│   │   ├── controllers/
│   │   │   ├── auth.controller.js
│   │   │   └── expense.controller.js
│   │   ├── middleware/
│   │   │   └── auth.middleware.js
│   │   ├── models/
│   │   │   ├── user.model.js
│   │   │   └── expense.model.js
│   │   ├── routes/
│   │   │   ├── auth.routes.js
│   │   │   └── expense.routes.js
│   │   ├── utils/
│   │   │   └── generateToken.js
│   │   └── server.js
│   └── package.json
├── frontend/
│   ├── public/
│   │   └── index.html
│   ├── src/
│   │   ├── App.js
│   │   └── index.js
│   └── package.json
└── README.md

Setup Instructions

Prerequisites

Backend Setup

  1. Navigate to the backend directory:
    cd backend
    
  2. Install dependencies:
    npm install
    
  3. Create a .env file in the backend directory with:
    PORT=5000
    MONGO_URI=mongodb://localhost:27017/expense_tracker
    JWT_SECRET=your_secret_key
    
  4. Start the backend server:
    npm run dev
    

Frontend Setup

  1. Navigate to the frontend directory:
    cd frontend
    
  2. Install dependencies:
    npm install
    
  3. Start the React app:
    npm start
    

The frontend will run on http://localhost:3000 and the backend on http://localhost:5000.

API Endpoints

Authentication

Expenses

Usage

  1. Register or login through the frontend.
  2. Add expenses via API (currently no UI for adding).
  3. View expenses in the frontend after logging in.

Author

M.Mahendra Chowdary