π Hackathon Project: Built during the Cursor Tallinn Hackathon using Cursor IDE and AI-powered development tools.
A modern, conversational finance tracking application built with Next.js 15, TypeScript, and Google Gemini AI. Track your expenses and income through natural language conversations, upload receipts, import CSV files, and get AI-powered insights about your financial health.
- π€ Conversational UI: Chat naturally to track transactions ("I bought coffee for $5")
- πΈ Receipt OCR: Upload receipts and extract transaction data automatically
- π CSV Import: Import bank statements and categorize them automatically
- π Smart Analytics: AI-powered spending insights and financial health analysis
- π Dark/Light Mode: Beautiful UI with theme switching
- π± Mobile Responsive: Works seamlessly on all devices
- β‘ Real-time Updates: Instant transaction updates and live chat
- Node.js 18+ and pnpm
- Google Gemini API key (Get one here)
-
Clone and install dependencies:
git clone git@github.com:Ahmed-aleryani/coinmind.git cd coinmind pnpm install -
Set up environment variables:
cp .env.example .env.local
Edit
.env.localand add your Gemini API key:GEMINI_API_KEY=your_actual_api_key_here DATABASE_URL=./data/finance.db
-
Start the development server:
pnpm dev
-
Open http://localhost:3000 to see the application.
Just type naturally in the chat:
- "I bought lunch for $12 at McDonald's"
- "Got paid $2000 salary today"
- "Spent $50 on gas at Shell"
- "Received $100 cash gift"
Ask questions about your finances:
- "How much did I spend this month?"
- "What's my biggest expense category?"
- "Show me my food expenses"
- "Am I saving money this month?"
- Click the camera icon to upload receipt images
- AI will extract transaction details automatically
- Review and confirm the parsed information
- Use the import feature to upload bank statements
- Auto-detect column mappings (date, description, amount)
- Bulk import and categorize transactions
- Frontend: Next.js 15, React, TypeScript, Tailwind CSS
- UI Components: shadcn/ui, Radix UI, Lucide Icons
- AI Integration: Google Gemini API (Vision + Text)
- Database: SQLite with better-sqlite3
- Styling: Tailwind CSS with custom design system
- Charts: Recharts for data visualization
- Development: Built with Cursor IDE and AI-powered development
src/
βββ app/ # Next.js app router
β βββ api/ # API routes
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Homepage
βββ components/ # React components
β βββ chat/ # Chat interface
β βββ layout/ # Layout components
β βββ providers/ # Context providers
β βββ ui/ # UI components
βββ lib/ # Utilities and business logic
β βββ api/ # AI integration
β βββ db/ # Database schema
β βββ types/ # TypeScript types
β βββ utils/ # Helper functions
βββ data/ # SQLite database files
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm type-check- Run TypeScript checks
The app uses SQLite with two main tables:
transactions- Financial transactions with AI-generated categorieschat_messages- Conversation history with context
Sample data is automatically inserted on first run for demo purposes.
POST /api/chat- Main chat endpoint with intent detectionGET/POST /api/transactions- CRUD operations for transactionsGET/PUT/DELETE /api/transactions/[id]- Individual transaction operations
The app uses a custom design system with CSS variables. Modify colors in globals.css:
:root {
--primary: oklch(0.205 0 0);
--secondary: oklch(0.97 0 0);
/* ... other colors */
}Customize AI behavior by modifying prompts in src/lib/api/gemini.ts:
- Transaction parsing prompts
- Receipt OCR prompts
- Category suggestions
- Query response templates
| Variable | Description | Required |
|---|---|---|
GEMINI_API_KEY |
Google Gemini API key | Yes |
DATABASE_URL |
SQLite database path | No (defaults to ./data/finance.db) |
NODE_ENV |
Environment mode | No (auto-detected) |
NEXT_PUBLIC_APP_URL |
Public app URL | No (defaults to localhost) |
- Database Migration: Migrate from local SQLite to remote database (MongoDB or Supabase)
- Multi-currency support
- Bank account integration (Plaid)
- Budget setting and tracking
- Investment portfolio tracking
- Export reports (PDF, Excel)
- Recurring transaction detection
- Advanced analytics dashboard
- Multi-user support
- Mobile app (React Native)
- 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
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the LICENSE file for details.
This means you are free to:
- Use the software for any purpose
- Study how the software works
- Share copies of the software
- Modify the software and share your modifications
Important: Any derivative works or modifications must also be released under the GPL-3.0 license, ensuring that improvements benefit the entire community.
If you encounter any issues:
- Check that your Gemini API key is configured correctly
- Ensure the
data/directory exists and is writable - Check the console for any error messages
- Review the troubleshooting guide
For bugs and feature requests, please open an issue on GitHub.
For detailed troubleshooting steps, see the Troubleshooting Guide.
Built with β€οΈ using Next.js, Google Gemini AI, and Cursor IDE during the Cursor Tallinn Hackathon