Skip to content

algorithnicmind/track_expenses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Personal Finance Manager πŸ’°

A modern, full-stack personal finance management application built with React and Node.js. Track your income and expenses, visualize spending patterns, and gain insights into your financial health.

React Node.js MongoDB License

✨ Features

Core Features

  • πŸ“Š Dashboard - Overview of your finances with summary cards and charts
  • πŸ’Έ Expense Tracking - Add, edit, and delete income/expense entries
  • πŸ“ˆ Analytics - Visual insights with interactive charts (Recharts)
  • 🏷️ Categories - Organize transactions by customizable categories
  • πŸ” Search & Filter - Find transactions quickly with advanced filters

User Experience

  • πŸŒ“ Dark Mode - Beautiful light and dark themes
  • πŸ“± Responsive Design - Works on desktop, tablet, and mobile
  • ⚑ Fast & Smooth - Optimized for performance
  • πŸ”” Toast Notifications - Real-time feedback on actions

Security

  • πŸ” JWT Authentication - Secure token-based auth
  • πŸ›‘οΈ Password Hashing - Bcrypt encryption
  • 🚫 Rate Limiting - Protection against brute force
  • βœ… Input Validation - Server-side data validation

πŸ—οΈ Project Structure

project4/
β”œβ”€β”€ docs/                          # Documentation
β”‚   β”œβ”€β”€ ARCHITECTURE.md
β”‚   β”œβ”€β”€ FEATURE_STATUS.md
β”‚   β”œβ”€β”€ ROADMAP.md
β”‚   └── TASK_TRACKER.md
β”‚
β”œβ”€β”€ p4-finance-backend/            # Node.js/Express Backend
β”‚   β”œβ”€β”€ controllers/               # Route handlers
β”‚   β”‚   β”œβ”€β”€ authController.js
β”‚   β”‚   β”œβ”€β”€ expenseController.js
β”‚   β”‚   └── userController.js
β”‚   β”œβ”€β”€ middleware/                # Custom middleware
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”œβ”€β”€ errorHandler.js
β”‚   β”‚   └── validators.js
β”‚   β”œβ”€β”€ models/                    # Mongoose models
β”‚   β”‚   β”œβ”€β”€ Expense.js
β”‚   β”‚   └── User.js
β”‚   β”œβ”€β”€ routes/                    # API routes
β”‚   β”‚   β”œβ”€β”€ authRoutes.js
β”‚   β”‚   β”œβ”€β”€ expenseRoutes.js
β”‚   β”‚   └── userRoutes.js
β”‚   β”œβ”€β”€ server.js                  # Entry point
β”‚   β”œβ”€β”€ package.json
β”‚   └── .env.example
β”‚
β”œβ”€β”€ p4-finance-frontend/           # React Frontend
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   β”œβ”€β”€ manifest.json
β”‚   β”‚   └── robots.txt
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/            # Reusable components
β”‚   β”‚   β”‚   β”œβ”€β”€ ExpenseModal.js
β”‚   β”‚   β”‚   └── ConfirmModal.js
β”‚   β”‚   β”œβ”€β”€ context/               # React Context
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthContext.js
β”‚   β”‚   β”‚   └── ThemeContext.js
β”‚   β”‚   β”œβ”€β”€ layouts/               # Page layouts
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthLayout.js
β”‚   β”‚   β”‚   └── DashboardLayout.js
β”‚   β”‚   β”œβ”€β”€ pages/                 # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ Landing.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Signup.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Expenses.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Analytics.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Profile.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Settings.js
β”‚   β”‚   β”‚   └── NotFound.js
β”‚   β”‚   β”œβ”€β”€ services/              # API services
β”‚   β”‚   β”‚   └── api.js
β”‚   β”‚   β”œβ”€β”€ styles/                # Global styles
β”‚   β”‚   β”‚   └── index.css
β”‚   β”‚   β”œβ”€β”€ App.js
β”‚   β”‚   └── index.js
β”‚   β”œβ”€β”€ package.json
β”‚   └── .env.example
β”‚
└── .gitignore

πŸš€ Getting Started

Prerequisites

  • Node.js 18.0.0 or higher
  • npm or yarn
  • MongoDB (local or Atlas)

Backend Setup

  1. Navigate to the backend directory:

    cd p4-finance-backend
  2. Install dependencies:

    npm install
  3. Create .env file from example:

    cp .env.example .env
  4. Configure your environment variables:

    PORT=5000
    NODE_ENV=development
    MONGO_URI=mongodb://localhost:27017/p4-finance
    JWT_SECRET=your-super-secret-jwt-key-here
    JWT_EXPIRE=7d
    CORS_ORIGIN=http://localhost:3000
  5. Start the server:

    # Development
    npm run dev
    
    # Production
    npm start

Frontend Setup

  1. Navigate to the frontend directory:

    cd p4-finance-frontend
  2. Install dependencies:

    npm install
  3. Create .env file:

    cp .env.example .env
  4. Configure environment variables:

    REACT_APP_API_URL=http://localhost:5000/api
    REACT_APP_NAME=Personal Finance Manager
  5. Start the development server:

    npm start
  6. Open http://localhost:3000 in your browser.

πŸ“š API Documentation

Authentication

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login Login user
GET /api/auth/me Get current user
POST /api/auth/logout Logout user

Expenses

Method Endpoint Description
GET /api/expenses Get all expenses (with filters)
POST /api/expenses Create expense
GET /api/expenses/:id Get single expense
PUT /api/expenses/:id Update expense
DELETE /api/expenses/:id Delete expense
GET /api/expenses/summary Get expense summary
GET /api/expenses/trends Get monthly trends
GET /api/expenses/recent Get recent transactions

Users

Method Endpoint Description
GET /api/users/profile Get user profile
PUT /api/users/profile Update profile
PUT /api/users/change-password Change password
DELETE /api/users/account Delete account

πŸ› οΈ Tech Stack

Frontend

  • React 18 - UI Library
  • React Router v6 - Routing
  • Axios - HTTP Client
  • Recharts - Charts & Graphs
  • React Toastify - Notifications
  • React Icons - Icon Library

Backend

  • Node.js - Runtime
  • Express.js - Web Framework
  • MongoDB - Database
  • Mongoose - ODM
  • JWT - Authentication
  • Bcrypt - Password Hashing

Security

  • Helmet - Security Headers
  • express-rate-limit - Rate Limiting
  • express-validator - Input Validation
  • express-mongo-sanitize - NoSQL Injection Protection

🎨 Design System

The app uses a custom CSS design system with:

  • CSS Custom Properties (variables)
  • Dark mode support
  • Responsive breakpoints
  • Modular component styles
  • Premium glassmorphism effects
  • Smooth animations

πŸ“ License

This project is licensed under the MIT License.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Made with ❀️ by [Ankit]

About

A modern, full-stack personal finance management application built with React and Node.js. Track your income and expenses, visualize spending patterns, and gain insights into your financial health.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors