This file is a practical runbook for AI coding agents working in this repository.
Ignite is a Flask starter app with:
- Auth (email/password + Google OAuth)
- Team/membership model
- Billing hooks (Stripe)
- Basic REST API
- Admin/dashboard UI
Primary package: appname/
cd /Users/sumukh/code/Ignite
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
# Seed local sqlite DB with starter users
APPNAME_ENV=dev ./manage.py resetdb
# Run app
FLASK_APP=manage flask --debug runOpen: http://localhost:5000
Seeded dev logins after resetdb:
[email protected]/test[email protected]/admin
# Lint
make lint
# Full tracked test suite (recommended)
make agent-test
# Full test discovery (also runs untracked local tests, if any)
APPNAME_ENV=test ./manage.py test --coverage
# Or raw pytest
APPNAME_ENV=test pytest --cov-report=term-missing --cov=appname tests/
# Quick DB reset + seed (dev only)
APPNAME_ENV=dev ./manage.py resetdbmanage.py: CLI entrypoint (server,resetdb,test, etc.)wsgi.py: production WSGI app objectappname/__init__.py: app factory, extension setup, blueprint registrationappname/settings.py:DevConfig,TestConfig,ProdConfigappname/controllers/: web routesappname/controllers/dashboard/: logged-in dashboard routesappname/controllers/oauth/google.py: Google OAuth flowappname/controllers/webhooks/stripe.py: Stripe webhook handlerappname/api/: API blueprints/resources (/api/v1/...)appname/models/: SQLAlchemy modelsappname/templates/: Jinja templatestests/: pytest suitedocumentation/: deployment/integration notes
Minimum local env:
APPNAME_ENV=devfor local appAPPNAME_ENV=testfor testsFLASK_APP=manageFLASK_DEBUG=1for local debug run (or useflask --debug run)
Optional integrations (see .env.local.sample):
- Google OAuth:
GOOGLE_CONSUMER_KEY,GOOGLE_CONSUMER_SECRET - Stripe:
STRIPE_SECRET_KEY,STRIPE_PUBLISHABLE_KEY,STRIPE_WEBHOOK_KEY - Storage:
STORAGE_PROVIDER,STORAGE_KEY,STORAGE_SECRET
Load example local secrets:
cp .env.local.sample .env.local
source .env.local- Read
README.mdand this file before changing code. - Prefer focused edits in existing modules over broad refactors.
- After code changes:
- Run targeted tests for touched area.
- Run
make agent-testbefore final handoff when feasible.
- If models/migrations behavior is touched, run a local DB reset (
APPNAME_ENV=dev ./manage.py resetdb) and sanity-check login/dashboard flows. - Do not commit secrets or
.env.local.
- Auth/login/signup:
appname/controllers/auth.py,appname/forms/login.py, auth templates - Dashboard pages:
appname/controllers/dashboard/*.py+appname/templates/dashboard/* - Team logic:
appname/models/teams/*andappname/controllers/dashboard/team.py - API behavior:
appname/api/*.py - Billing/webhooks:
appname/controllers/webhooks/stripe.py,appname/billing_plans.py,appname/services/stripe.py
- Tests rely on
APPNAME_ENV=test; forgetting it can cause wrong config usage. - Test fixture data (
tests/conftest.py) uses different seed passwords than devresetdb. appname/api/auth expectsapi_keyin query string.- In dev/test, some async behavior is intentionally synchronous (
RQ_ASYNC=Falsein settings).
- Main docs:
README.md - OAuth notes:
documentation/oauth.md - Stripe notes:
documentation/stripe.md - Deployment example:
documentation/dokku.md