Prerequisites
Before starting, ensure you have:- Docker and Docker Compose installed on your machine
- A Google Cloud project with Gmail API enabled (for Gmail integration)
- An xAI API key (for transaction extraction)
- A Supabase account (optional for production; local stack works out of the box)
No local installation of Bun or Supabase CLI is required. Everything runs inside Docker containers.
Installation
Configure frontend environment
Edit
packages/frontend/.env:The
SUPABASE_ANON_KEY above is the default key for local Supabase. Don’t change it for local development.Start the application
Run the application using Docker Compose:This starts:
- Frontend with hot reload at
http://localhost:3000 - Supabase local stack (PostgreSQL, Auth, Edge Functions, Studio)
Access the application
Once running, open your browser to:
- App: http://localhost:3000
- Supabase Studio: http://127.0.0.1:54323
The local database is automatically seeded with a test account:
- Email:
[email protected] - Password:
password123 - 132 demo transactions included
Connecting Your Gmail Account
After logging in, connect your Gmail to start tracking real transactions:Navigate to Settings
Click on the Settings icon in the sidebar or press
Cmd/Ctrl + K and search for “Settings”.Connect Gmail Account
Click the “Connect Gmail Account” button. This will redirect you to Google’s OAuth consent screen.
Authorize access
Grant Money Tracker read-only access to your Gmail. The app will never modify or delete your emails.
Wait for initial import
After authorization, Money Tracker automatically starts importing the last 3 months of emails. This process runs in the background and may take a few minutes depending on your email volume.You’ll see a progress indicator showing how many emails have been processed.
The initial import processes 30 emails at a time with 10 concurrent AI extractions per batch. Processed emails are tracked in the database, so you can safely stop and resume the import.
Processing Your First Transaction
To test the AI extraction manually:Wait for AI extraction
The document is sent to xAI Grok for analysis. Within a few seconds, the transaction details are extracted and displayed.
Database Commands
Reset the database
Apply all migrations and reseed the database:Apply pending migrations
Generate TypeScript types
Generate types from the database schema:Seed Data
The local database includes test data for development:| File | Description |
|---|---|
001_auth_test_user.sql | Creates test account [email protected] / password123 |
002_transactions_test_user.sql | Inserts 132 demo transactions |
005_internal_functions_secret_local.sql | Sets up local Vault secret |
Stopping the Application
To stop all services:Troubleshooting
Frontend fails to load
- Verify
packages/frontend/.envexists and contains validSUPABASE_URLandSUPABASE_ANON_KEY - Check frontend logs:
docker compose logs -f frontend - Ensure Supabase is running:
docker compose ps
Gmail OAuth fails
- Verify your Google Cloud project has the Gmail API enabled
- Check that
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET, andOAUTH_REDIRECT_URImatch your Google Cloud Console settings - Ensure the redirect URI is added to the authorized redirect URIs in Google Cloud Console
AI extraction fails
- Verify your
XAI_API_KEYis valid and has credits - Check Edge Function logs:
docker compose logs -f supabase-cli - Test the API key with a simple curl request to xAI
Docker issues on macOS/Linux
- Always include
PROJECT_ROOT=$(pwd)when running Docker Compose commands - This ensures host and container paths match for nested Docker mounts
- Use service names (e.g.,
frontend,supabase-cli) withdocker compose exec, not container names
Database connection errors
- Ensure Supabase services are healthy:
docker compose ps - Check if port 54321 is available:
lsof -i :54321 - Restart the Supabase stack:
docker compose restart supabase-cli
Advanced Usage
Access Supabase CLI container
Enter the container for manual commands:Stream logs
Watch real-time logs:Next Steps
Architecture
Understand how Money Tracker works
Core Features
Explore all features of Money Tracker