A modern, AI-powered expense tracking web application built with Next.js 15, featuring intelligent categorization, real-time analytics, and personalized financial insights.
- Smart Categorization: AI automatically suggests expense categories based on descriptions
- Financial Insights: Personalized recommendations and spending pattern analysis
- Interactive AI Chat: Get detailed explanations and advice for any insight
- Expense Tracking: Add, edit, and delete expenses with ease
- Real-time Charts: Beautiful visualizations using Chart.js
- Statistics Dashboard: Comprehensive spending analytics
- Expense History: Complete transaction history with search and filter
- Light & Dark Mode: Seamless theme switching with smooth transitions
- Fully Responsive: Optimized for all screen sizes
- Beautiful Animations: Smooth interactions and hover effects
- Gradient Designs: Modern card layouts with backdrop blur effects
- Multiple Login Options: Google, GitHub, Facebook, or email/password
- Secure Sessions: Managed by Clerk authentication
- User Profiles: Personalized dashboards with user information
- Next.js 15 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Chart.js - Beautiful charts and visualizations
- Neon - Serverless PostgreSQL database
- Prisma - Type-safe database ORM
- Server Actions - Direct server functions in Next.js
- OpenRouter - Free AI API access without credit cards
- Clerk - Complete authentication solution
- OpenAI Compatible API - For intelligent expense categorization
- Vercel - Serverless deployment platform
- Node.js 18+
- npm, yarn, or pnpm
-
Clone the repository
git clone https://github.com/Anujkumar108/next-expense-tracker-ai.git cd next-expense-tracker-ai -
Install dependencies
npm install # or yarn install # or pnpm install
-
Set up environment variables Create a
.envfile in the root directory:# Database DATABASE_URL="your-neon-database-url" # Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="your-clerk-publishable-key" CLERK_SECRET_KEY="your-clerk-secret-key" NEXT_PUBLIC_CLERK_SIGN_IN_URL="/sign-in" NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL="/" NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL="/" # OpenRouter AI OPENROUTER_API_KEY="your-openrouter-api-key" # App URL NEXT_PUBLIC_APP_URL="http://localhost:3000"
-
Set up the database
npx prisma generate npx prisma db push
-
Run the development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser Navigate to http://localhost:3000
The application uses a simple yet effective database schema:
- User: Stores user information from Clerk
- Record: Stores expense transactions with categories and amounts
View the complete database diagram: Eraser Diagram
- Enter description, date, and amount
- Click the β¨ button for AI category suggestions
- Manual category selection from predefined options
- Real-time spending pattern analysis
- Categorized insights: warnings, tips, success, info
- Interactive expandable AI explanations
- Confidence scores for each insight
- Interactive Chart.js charts
- Daily, weekly, and monthly views
- Color-coded spending categories
- Responsive design for all devices
- Complete transaction history
- Search and filter capabilities
- One-click expense deletion
- Real-time updates across all components
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on every push to main branch
- Neon Database - Serverless PostgreSQL
- Clerk Authentication - User management
- GitHub Repository - Source code
- Database Diagram - Visual schema
- Next.js Documentation - Framework docs
- Tailwind CSS - Styling framework
- Vercel Platform - Deployment platform
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
If you find this project helpful, please give it a β on GitHub!
Built with β€οΈ by Anuj kumar
Demonstrating modern full-stack development with AI integration, completely free to build and deploy.