Quick Start
Get acodeaday running locally in under 10 minutes.
Prerequisites
Before you begin, ensure you have:
- Docker & Docker Compose (everything runs in containers)
- Supabase account (free tier is fine) for authentication and database
For local development without Docker:
- Node.js 22+ (for frontend)
- Python 3.12+ with uv (for backend)
Option 1: Docker Compose (Recommended)
The easiest way to run acodeaday - everything in one command.
1. Clone the Repository
git clone https://github.com/engineeringwithtemi/acodeaday.git
cd acodeaday2. Configure Environment
cp .env.example .envEdit .env with your Supabase credentials:
# Database (from Supabase dashboard > Settings > Database > Connection string > URI)
# IMPORTANT: Use the "Transaction pooler" connection (port 6543), NOT direct connection (port 5432)
DATABASE_URL=postgresql+asyncpg://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres
# Supabase (from Supabase dashboard > Settings > API)
SUPABASE_URL=https://[PROJECT_ID].supabase.co
SUPABASE_KEY=[YOUR_ANON_KEY]
# Service role key - enables auto-confirm for default user (recommended)
SUPABASE_SERVICE_ROLE_KEY=[YOUR_SERVICE_ROLE_KEY]
# AI features (optional - for AI tutor)
OPENAI_API_KEY=sk-...
# or
GOOGLE_API_KEY=...Supabase Cloud Connection
When using Supabase Cloud, you must use the Transaction pooler connection string (port 6543), not the direct connection (port 5432).
To get the correct connection string:
- Go to Supabase Dashboard → Settings → Database
- Under Connection string, select URI
- Choose Transaction pooler (port 6543)
- Copy the connection string and replace
postgresql://withpostgresql+asyncpg://
The pooler connection is required because:
- It handles connection pooling for serverless/async applications
- It works better with asyncpg (the async PostgreSQL driver)
- Direct connections may hit connection limits or timeout issues
Using Local Supabase?
If you're running Supabase locally (supabase start) instead of Supabase Cloud, use host.docker.internal instead of localhost:
DATABASE_URL=postgresql+asyncpg://postgres:postgres@host.docker.internal:54322/postgres
SUPABASE_URL=http://host.docker.internal:54321This is because Docker containers can't reach localhost on your machine. See Self-Hosting Guide for details.
3. Start Everything
docker compose up -dThis starts:
- Judge0 (code execution) on port 2358
- Backend (FastAPI) on port 8000
- Frontend (React) on port 3000
Wait about 60 seconds for all services to initialize, then:
# Check all services are healthy
docker compose ps
# Verify Judge0 is ready
curl http://localhost:2358/about4. Create Your Account & Start Coding!
- Open
http://localhost:3000in your browser - Click "Sign Up" to create an account via Supabase Auth
- Check your email for the confirmation link
- After confirming, log in with your credentials
- You'll see your daily problems - start solving!
Option 2: Self-Host with Pre-built Images
Deploy on your own server without building from source.
1. Download Production Compose File
curl -O https://raw.githubusercontent.com/engineeringwithtemi/acodeaday/main/docker-compose.prod.yml2. Configure Environment
Edit docker-compose.prod.yml and update the CHANGE_ME values:
DATABASE_URL- Your Supabase PostgreSQL connection string (use pooler URL with port 6543)SUPABASE_URL- Your Supabase project URLSUPABASE_KEY- Your Supabase anon keySUPABASE_SERVICE_ROLE_KEY- Your Supabase service role key (for auto-confirming users)VITE_API_URL- Where users access the backend (e.g.,http://localhost:8000)
3. Start All Services
docker compose -f docker-compose.prod.yml up -dThe backend automatically runs migrations and seeds the database on startup.
4. Access the App
Open http://localhost:3000 in your browser.
Pre-built Images
This uses images from GitHub Container Registry:
ghcr.io/engineeringwithtemi/acodeaday-backend:latestghcr.io/engineeringwithtemi/acodeaday-frontend:latest
No building required!
See Self-Hosting Guide for more deployment options.
Option 3: Local Development
For development with hot-reload, run services locally.
1. Clone and Setup
git clone https://github.com/engineeringwithtemi/acodeaday.git
cd acodeaday2. Start Judge0 (Docker required)
# Start only Judge0 services
docker compose up -d judge0-server judge0-workers judge0-db judge0-redisWait 30 seconds, then verify:
curl http://localhost:2358/about3. Configure Environment
cp .env.example .env
# Edit .env with your Supabase credentials4. Backend Setup
cd backend
uv sync
uv run alembic upgrade head
uv run python scripts/seed_problems.py seed
uv run uvicorn app.main:app --reloadBackend available at http://localhost:8000
5. Frontend Setup
cd frontend
npm install
npm run devFrontend available at http://localhost:5173
6. Create Account & Start Coding!
- Open
http://localhost:5173 - Click "Sign Up" and enter your email/password
- Check email for confirmation (or check Supabase dashboard if using local dev)
- Log in and start solving problems!
Authentication
acodeaday uses Supabase Auth for user management:
- Sign Up: Create account with email/password
- Email Confirmation: Required before first login (check spam folder)
- Password Reset: Available via "Forgot Password" link
Supabase Local Development
For local Supabase setup, see Database Setup. Users are auto-confirmed in local mode.
Using the AI Tutor
Once logged in, you can get AI assistance while solving problems:
- Open any problem
- Click the "Chat" button in the editor panel
- Choose your mode:
- Socratic: AI asks guiding questions (recommended for learning)
- Direct: AI gives straightforward explanations
- Ask questions like "What pattern should I use?" or "Why is my solution failing?"
API Keys Required
AI features require at least one API key configured:
OPENAI_API_KEYfor GPT modelsGOOGLE_API_KEYfor Gemini modelsANTHROPIC_API_KEYfor Claude models
What's Next?
- Prerequisites - Detailed environment setup
- Adding Problems - Create custom problems
- Spaced Repetition - Understand the algorithm
- API Reference - Build integrations
Troubleshooting
Services not starting
# Check container status
docker compose ps
# View logs for specific service
docker compose logs backend
docker compose logs judge0-serverCan't create account / "Invalid credentials"
- Check Supabase project is active
- Verify
SUPABASE_URLandSUPABASE_KEYin.env - Check email for confirmation link (including spam)
- In Supabase dashboard, check Authentication > Users
Judge0 not responding
# Restart Judge0 services
docker compose restart judge0-server judge0-workers
# Check logs
docker compose logs judge0-serverDatabase connection failed
- Verify
DATABASE_URLusespostgresql+asyncpg://(notpostgresql://) - Check Supabase project is running
- Ensure your IP is allowed (Supabase > Settings > Database)
Frontend can't reach backend
- Ensure backend is running on
http://localhost:8000 - Verify
VITE_API_URLinfrontend/.env - Check browser console for CORS errors
Need More Help?
See detailed guides: