A modern, full-stack expense tracking web application built with React + TypeScript and Node.js + SQLite.
- β Secure Authentication - JWT-based login/registration system
- π Interactive Dashboard - Real-time statistics and data visualization
- οΏ½ Multi-Currency Support - 22 currencies matching all supported languages
- π Beautiful Charts - Monthly trends and category breakdowns
- π¨ Icon Customization - 100+ icons to choose from for each expense
- π Smart Filtering - Search and filter by date, category, and more
- π± Fully Responsive - Works seamlessly on desktop, tablet, and mobile
- π¨βπ©βπ§βπ¦ Family Support - Multiple user accounts for family members
- βοΈ Remote Hosting Ready - Easy deployment to any cloud platform
- Node.js 18+ installed
- npm or yarn
- Clone the repository
git clone <your-repo-url>
cd expenses- Install backend dependencies
cd server
npm install- Install frontend dependencies
cd ..
npm install- Start the backend server (Terminal 1)
cd server
npm startServer runs on http://localhost:3001
- Start the frontend (Terminal 2)
npm run devApplication runs on http://localhost:5173
- Open your browser
Navigate to
http://localhost:5173
- Email:
demo@expenses.com - Password:
demo123
- βοΈ React 18 - UI library
- π TypeScript - Type safety
- β‘ Vite - Build tool
- π¨ Vanilla CSS - Styling
- π Recharts - Data visualization
- π― Lucide React - Icon library
- π£οΈ React Router - Navigation
- π Express - Web framework
- ποΈ SQLite3 - Database
- π JWT - Authentication
- π bcryptjs - Password hashing
- π CORS - Cross-origin support
expenses/
βββ server/ # Backend API
β βββ server.js # Express server
β βββ database.js # Database setup
β βββ expenses.db # SQLite database
βββ src/ # Frontend source
β βββ components/ # React components
β βββ pages/ # Page components
β βββ context/ # React context
β βββ services/ # API services
β βββ types/ # TypeScript types
βββ public/ # Static assets
βββ index.html # HTML template
- 4 Statistics Cards: Account Balance, Monthly Expenses, Total Investment, Goal Tracker
- Monthly Expenses Chart: 6-month bar chart showing spending trends
- Category Breakdown: Donut chart with interactive legend
- Recent Expenses: Table showing last 5 transactions
- Bill & Subscription Tracker: Recurring payment monitoring
- Add expenses with amount, category, sub-category, description, icon, date, and payment mode
- Edit existing expenses
- Delete expenses
- Search and filter functionality
- 6 predefined categories with custom colors
- π₯¬ Food & Grocery
- π Investment
- ποΈ Shopping
βοΈ Travelling- π¦ Miscellaneous
- π³ Bill & Subscription
- Passwords hashed with bcryptjs (10 rounds)
- JWT tokens for stateless authentication
- Protected API routes
- Input validation on both frontend and backend
- CORS configuration for production
- Demo Account Protection: Data deletion and password changes are disabled for the demo account (
demo@expenses.com) to preserve data integrity for public testing.
We recommend deploying the backend to Vercel with a Supabase database (Free Tier).
-
Database (Supabase):
- Create a free project at supabase.com.
- Get your connection string (Transaction Pooler, port 6543).
- Example:
postgresql://postgres:[PASSWORD]@...:6543/postgres?pgbouncer=true
-
Backend (Vercel):
- Create a new Vercel project.
- Set Root Directory to
server. - Add Environment Variable:
DATABASE_URL= (Your Supabase connection string). - Add Environment Variable:
JWT_SECRET= (Any random secret string). - Deploy! (Get your new Backend URL, e.g.,
https://my-backend.vercel.app).
- Frontend (Vercel):
- Create a separate Vercel project (or use the main one with Root Directory
.). - Add Environment Variable:
VITE_API_BASE_URL=https://<YOUR-BACKEND-URL>/api - Deploy!
- Build command:
npm run build
- Create a separate Vercel project (or use the main one with Root Directory
Register
POST /api/auth/register
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123",
"name": "John Doe"
}Login
POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123"
}Get All Expenses
GET /api/expenses?startDate=2025-01-01&endDate=2025-12-31&category=Shopping
Authorization: Bearer <token>Create Expense
POST /api/expenses
Authorization: Bearer <token>
Content-Type: application/json
{
"amount": 50.50,
"category": "Food & Grocery",
"sub_category": "Restaurant",
"description": "Dinner",
"icon": "UtensilsCrossed",
"date": "2025-06-15",
"mode": "Card"
}Update Expense
PUT /api/expenses/:id
Authorization: Bearer <token>
Content-Type: application/json
{
"amount": 60.00,
...
}Delete Expense
DELETE /api/expenses/:id
Authorization: Bearer <token>Get Statistics
GET /api/dashboard/stats?period=month
Authorization: Bearer <token>Periods: recent, month, year
Frontend:
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
Backend:
npm start- Start servernpm run dev- Start with auto-reload (if configured)
Create .env file in server/ directory:
PORT=3001
JWT_SECRET=your-super-secret-key-change-in-production
NODE_ENV=developmentThis project is licensed under the MIT License - see the LICENSE file for details.
Created with β€οΈ for managing personal and family expenses.
- Design inspiration from modern fintech applications
- Icons by Lucide
- Charts by Recharts
- Font by Google Fonts (Inter)
Happy Expense Tracking! π°π