A full-stack personal finance application built with Node.js, React, and MySQL to track daily expenses and generate comprehensive weekly and monthly reports.
https://www.loom.com/share/050ac7013ac9433ea6e16686620fa1e9
- 🔐 User Authentication - Secure JWT-based authentication with bcrypt password hashing
- 💰 Expense Tracking - Add, edit, delete, and categorize expenses
- 📊 Reports & Analytics - Weekly and monthly reports with interactive charts
- 📈 Data Visualization - Pie charts for category breakdown, bar charts for daily trends
- 🎨 Modern UI - Dark theme with vibrant gradients and smooth animations
- 📱 Responsive Design - Works seamlessly on desktop and mobile devices
- 🔍 Advanced Filtering - Filter expenses by date range and category
- 👥 Multi-User Support - Each user has isolated expense data
- Node.js & Express - Server framework
- MySQL - Database
- JWT - Authentication
- bcrypt - Password hashing
- express-validator - Input validation
- React (Vite) - UI framework
- React Router - Navigation
- Chart.js & react-chartjs-2 - Data visualization
- Axios - HTTP client
- date-fns - Date utilities
- Node.js (v14 or higher)
- MySQL (v5.7 or higher)
- npm or yarn
git clone <repository-url>
cd mymoney# Install backend dependencies
npm install
# Create .env file (copy from .env.example)
cp .env.example .env
# Edit .env and configure your MySQL credentials
# DB_HOST=localhost
# DB_USER=root
# DB_PASSWORD=your_password
# DB_NAME=mymoney_db
# JWT_SECRET=your_secret_key# Run the database setup script
npm run setup-dbThis will:
- Create the
mymoney_dbdatabase - Create tables:
users,expenses,categories - Insert default expense categories
# Navigate to client directory
cd client
# Install frontend dependencies
npm install# From the root directory
npm start
# Or for development with auto-reload
npm run devBackend will run on http://localhost:5000
# From the client directory
cd client
npm run devFrontend will run on http://localhost:5173
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/profile- Get user profile (protected)
GET /api/expenses- Get all expenses (with optional filters)GET /api/expenses/:id- Get single expensePOST /api/expenses- Create new expensePUT /api/expenses/:id- Update expenseDELETE /api/expenses/:id- Delete expense
GET /api/reports/weekly- Get weekly reportGET /api/reports/monthly- Get monthly report (with month/year params)GET /api/reports/summary- Get overall summary
GET /api/categories- Get all categoriesPOST /api/categories- Create new category
The app comes with 10 pre-configured categories:
- 🍔 Food & Dining
- 🚗 Transportation
- 🛍️ Shopping
- 🎬 Entertainment
- 💡 Bills & Utilities
- 🏥 Healthcare
- 📚 Education
✈️ Travel- 🛒 Groceries
- 📌 Other
- Register/Login - Create an account or login with existing credentials
- Add Expenses - Click "Add Expense" to record your transactions
- View Dashboard - See your spending summary and recent expenses
- Manage Expenses - Edit or delete expenses from the Expenses page
- Generate Reports - View weekly and monthly reports with charts
- Filter Data - Use date range and category filters to analyze specific periods
mymoney/
├── config/
│ ├── database.js # MySQL connection
│ ├── schema.sql # Database schema
│ └── setup-db.js # Database setup script
├── middleware/
│ └── auth.js # JWT authentication middleware
├── routes/
│ ├── auth.js # Authentication routes
│ ├── expenses.js # Expense CRUD routes
│ ├── reports.js # Report generation routes
│ └── categories.js # Category routes
├── client/
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── context/ # React context (Auth)
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ └── index.css # Global styles
│ └── package.json
├── server.js # Express server
├── package.json
└── .env # Environment variables
- Passwords hashed with bcrypt (10 salt rounds)
- JWT tokens for stateless authentication
- Protected API routes with middleware
- User-scoped data access (users can only see their own expenses)
- Input validation on all forms
- SQL injection prevention with parameterized queries
Feel free to submit issues and enhancement requests!
ISC
Built with ❤️ for better personal finance management