An AI-powered mobile web app for tracking expenses through voice commands with real-time transcription and automatic categorization.
- 🎙️ Voice Recording: Real-time audio capture and transcription using OpenAI Whisper
- 🪣 Smart Categorization: Automatic expense categorization using GPT-3.5-turbo
- 📊 ive Dashboard: Interactive charts and analytics with D3.js
- 📲 Mobile-First: Responsive design for mobile web browsers
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes (serverless functions)
- Database: MongoDB Atlas
- AI Services: OpenAI Whisper API, GPT-3.5-turbo
- Charts: D3.js
- Deployment: Vercel
git clone https://github.com/courtashdale/Scrooge
cd scrooge_2
npm installCopy .env.local.example to .env.local and fill in your credentials:
cp .env.local.example .env.localRequired environment variables:
MONGODB_URI: Your MongoDB Atlas connection stringOPENAI_API_KEY: Your OpenAI API key
- Create a MongoDB Atlas account
- Create a new cluster
- Create a database named
scrooge - Create a collection named
expenses - Copy the connection string to your
.env.local
- Get an OpenAI API key from https://platform.openai.com/
- Add it to your
.env.localfile
npm run devVisit http://localhost:3000 to see the app.
- Push your code to GitHub
- Connect your GitHub repo to Vercel
- Add environment variables in Vercel dashboard:
MONGODB_URIOPENAI_API_KEY
- Deploy!
- Record Expense: Click the record button and say something like "I spent $12.50 on coffee"
- View Today's Total: See your total expenses for today on the main screen
- Recent Transactions: Toggle to view, edit, or delete your 10 most recent transactions
- Dashboard: View interactive charts and filter by date ranges
- Categories: Expenses are automatically categorized (grocery, entertainment, transportation, etc.)
GET /api/transactions- Fetch transactions with optional date filteringPOST /api/transactions- Create new transactionPUT /api/transactions/[id]- Update transactionDELETE /api/transactions/[id]- Delete transactionPOST /api/transcribe- Transcribe audio to textPOST /api/categorize- Categorize expense item
{
_id: ObjectId,
item: String, // "Coffee"
cost: Number, // 12.50
date: Date, // 2024-01-01T10:30:00Z
is_grocery: Boolean, // false
is_entertainment: Boolean, // false
is_transportation: Boolean, // false
is_food_drink: Boolean, // true
is_shopping: Boolean, // false
is_utilities: Boolean, // false
is_healthcare: Boolean, // false
is_education: Boolean, // false
is_other: Boolean // false
}