A modern, full-stack expense tracking application built with Next.js, React, TypeScript, and MongoDB. BudgetBuddy helps you manage your finances with an intuitive interface, beautiful visualizations, and powerful tracking features.
- User Registration - Create a new account with email, password, and personal details
- User Login - Secure JWT-based authentication
- Protected Routes - Middleware-protected dashboard and expense pages
- Session Management - Auto-logout with token expiration
- Expense Overview - Real-time summary of total spending and budget
- Visual Charts - Pie chart for expense breakdown by category and Line chart for daily spending trends
- Budget Tracking - Set and monitor monthly budget with visual progress indicator
- Quick Stats - View total spent, remaining budget, and highest spending category
- Add Expenses - Create new expense entries with title, amount, category, and date
- View Expenses - Browse all expenses in a clean, organized table
- Edit Expenses - Modify existing expense details inline
- Delete Expenses - Remove unwanted expense records
- Category Filter - Filter expenses by category
- Search - Find expenses by title
- Sorting - Sort by date or amount
- Dark Theme - Modern glassmorphic design
- Responsive Design - Works on desktop and mobile
- Animated Backgrounds - Beautiful blob animations
- Smooth Interactions - Hover effects and transitions
- Framework: Next.js 16.0.7 (React 19.2.1)
- Language: TypeScript 5
- Styling: Tailwind CSS 4
- Charts: Chart.js 4.5.1 with react-chartjs-2 5.3.1
- State Management: React Hooks & Context API
- Runtime: Node.js
- Framework: Next.js API Routes
- Authentication: JWT (JSON Web Tokens) 9.0.2
- Password Security: bcryptjs 2.4.3
- Database: MongoDB 7.0.0
- ODM: Mongoose 8.20.0
- Node.js (v18 or higher)
- npm or yarn
- MongoDB Atlas account (or local MongoDB)
- Clone the repository
git clone https://github.com/angelabera/BudgetBuddy.git
cd BudgetBuddy- Install dependencies
npm install- Set up environment variables
# Copy the example environment file
cp .env.example .env.local
# Edit .env.local with your actual values
# Required variables:
# MONGO_URI - Your MongoDB connection string
# JWT_SECRET - A secure random string for JWT tokens- Run the development server
npm run dev- Open in browser
Navigate to
http://localhost:3000
When deploying to platforms like Vercel, Netlify, or Railway, set these environment variables in your deployment platform's dashboard:
MONGO_URI- Your MongoDB Atlas connection stringJWT_SECRET- A secure, random string (at least 32 characters)
- Vercel (Recommended): Connect your GitHub repo and deploy automatically
- Netlify: Drag & drop or connect via Git
- Railway: Connect GitHub repo for seamless deployment
- Heroku: Use the Heroku CLI or Git deployment
npm run build # Build for production
npm run start # Start production server- Sign Up - Create a new account on the register page
- Login - Enter your credentials to access the dashboard
- View Dashboard - See your expense summary and charts
- Add Expense - Click "Add Expense" button to track spending
- Manage Expenses - View, edit, or delete expenses
- Set Budget - Update your monthly budget
- Logout - End your session
- Email: [email protected]
- Password: demo123
/- Dashboard/login- Authentication/register- Account creation/expenses- Expense management/add-expense- New expense form
POST /api/auth/register- RegistrationPOST /api/auth/login- LoginGET /api/expenses- Fetch expensesPOST /api/expenses- Create expensePUT /api/expenses- Update expenseDELETE /api/expenses- Delete expense
β
JWT Authentication with secure token management
β
Password hashing with bcryptjs
β
Protected routes with middleware
β
HTTP-Only cookies for session storage
β
Server-side validation
β
Environment variables for sensitive data
β
TypeScript for type safety
β
Input sanitization and validation
- Glassmorphic UI - Semi-transparent cards with backdrop blur
- Gradient Accents - Beautiful gradient buttons
- Dark Mode - Easy on the eyes
- Smooth Animations - Beautiful transitions
- Clean Data - Emoji-stripped categories
- Pie Chart - Expense distribution by category
- Line Chart - Daily spending trends
- Color Coded - Easy identification
- β Security Enhancements: Environment variables properly secured with .env.example template
- β Type Safety: Added TypeScript type definitions for all dependencies
- β Dependency Updates: Updated to latest stable versions of Next.js, React, and MongoDB
- β Authentication middleware with protected routes
- β Emoji stripping from category names for cleaner data
- β Enhanced UI: 2-column layout for register page and improved dashboard
- β Functional logout with proper session management
- β Deployment Ready: Configured for easy deployment to Vercel, Netlify, etc.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLintBudgetBuddy/
βββ app/ # Next.js app directory
β βββ api/ # API routes
β βββ components/ # Reusable components
β βββ context/ # React context providers
β βββ ... # Page components
βββ lib/ # Utility functions and database
βββ models/ # Mongoose models
βββ public/ # Static assets
βββ ... # Config files
Angela Bera
- GitHub: @angelabera
- LinkedIn: Angela Bera
Made with π by Angela Bera
Happy budgeting! πΈ