Guide for developing QuietPage locally with various workflow options.
- Python 3.14+ with
uvpackage manager - Node.js 18+ with npm
- Redis (optional, for full development mode)
- Git
# Clone and enter repository
git clone <repository-url>
cd QuietPage
# Copy environment file and configure
cp .env.example .env
# Edit .env: set SECRET_KEY and FERNET_KEY_PRIMARY
# Install all dependencies
make install-dev
# Run migrations and create superuser
make setup
# Start development
make devAccess the app at http://localhost:5173
Choose the approach that fits your current needs:
Best for daily development, frontend/API work, and feature development.
make devServices: Django (8000) + Vite (5173) + SQLite + in-memory cache
- Fast startup, no external dependencies
- Cannot test async tasks (backups, reminders, cleanup)
Best for testing Celery tasks, background jobs, and production-like behavior.
make dev-fullServices: Redis + Django + Vite + Celery worker + Celery beat
- Complete feature set with Redis-backed cache and task queue
- Requires Redis installed locally
Verify Celery is working:
make celery-statusBest for production-like environment with PostgreSQL.
docker-compose upServices: PostgreSQL 16 + Redis 7 + Django (Gunicorn) + Celery
- Closest to production, isolated from local system
- Slower startup, requires Docker Desktop
| Service | URL | Purpose |
|---|---|---|
| Django API | http://localhost:8000 | Backend REST API |
| Vite Frontend | http://localhost:5173 | React SPA with hot reload |
| Vite Proxy | http://localhost:5173/api | Proxies to Django |
| Redis | localhost:6379 | Cache & Celery broker (full mode) |
Note: Always access the app through http://localhost:5173 during development. Vite proxies /api requests to Django automatically.
make migrate # Apply migrations
make makemigrations # Create new migrations
make shell # Open Django shell
make superuser # Create superuserBackend:
make test # Run all tests
uv run pytest apps/journal/tests/test_models.py -v # Specific file
uv run pytest -k "test_streak" -v # By name
uv run pytest -m unit # By markerFrontend:
cd frontend
npm run test # Watch mode
npm run test:run # Single run (CI)uv run black . # Format Python
uv run flake8 # Lint Python
cd frontend && npm run lint # Lint frontendmake messages # Generate .po files
make compilemessages # Compile .mo filesmake celery-worker # Start worker
make celery-beat # Start scheduler
make celery-status # Check active tasksIf you prefer separate terminals instead of honcho:
Simple mode:
# Terminal 1
make run
# Terminal 2
cd frontend && npm run devFull mode: Add redis-server, make celery-worker, and make celery-beat in separate terminals.
Key variables in .env:
SECRET_KEY=<your-secret-key>
DEBUG=True
DJANGO_SETTINGS_MODULE=config.settings.development
FERNET_KEY_PRIMARY=<your-fernet-key>
REDIS_URL=redis://localhost:6379 # Optional, for full modeGenerate keys:
# SECRET_KEY
uv run python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
# FERNET_KEY_PRIMARY
uv run python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"lsof -ti:8000 | xargs kill -9 # Kill process on port 8000
lsof -ti:5173 | xargs kill -9 # Kill process on port 5173brew install redis # Install Redis (macOS)
redis-server # Start Redis
redis-cli ping # Verify (should return PONG)Or use make dev which does not require Redis.
- Ensure Django is running on port 8000
- Check terminal for Django errors
- Verify Vite proxy config in
frontend/vite.config.ts
- Redis is running:
redis-cli ping - Celery worker is running:
make celery-status - Celery beat is running (check terminal output)
rm db.sqlite3 # Reset database (development only)
make migrate
make superusermake install-dev # Reinstall all dependencies
uv run python --versionSwitch freely between modes - just Ctrl+C and run the new command:
docker-compose down && make dev # Docker to local
make dev-full # Simple to full
make dev # Full to simpleDatabase (db.sqlite3) is shared across local modes, so data persists.
- Use
make devfor daily work (fast, covers 90% of needs) - Use
make dev-fullwhen testing background jobs - Use Docker for final testing before production
- Both Django and Vite auto-reload on file changes
Recommended VSCode extensions: Python, ESLint, Prettier, Django Template
| Mode | Startup | RAM |
|---|---|---|
Simple (make dev) |
~3-5s | ~500MB |
Full (make dev-full) |
~5-8s | ~800MB |
| Docker | ~10-30s | ~1.5GB |
make help- List all commandsCLAUDE.md- Project guidelinesdocs/SECURITY_CHECKLIST.md- Security best practices
- Review design system in
styles.md - Explore API at http://localhost:8000/api/
- Run tests:
make test - Create a journal entry
- Try both themes (Midnight/Paper)