Monorepo for UpGrade — personal AI-powered learning platform for anyone who is learning stuff.
Stack (Aug 2026 — latest stable verified):
- Frontend: Flutter 3.47.1 • Dart 3.13.1 • Material 3 (empty template) —
mobile/- Backend: FastAPI 0.141.1 • Pydantic 2.13.4 • Python 3.13 via uv 0.12.5 —
backend/
Initialized 2026-08-24 — no features yet, only project scaffolding.
UpGrade/
├── mobile/ # Flutter app — com.upgrade / upgrade
│ ├── lib/
│ │ ├── main.dart # Hello World! (empty template)
│ │ ├── app/ # composition root — router, theme, app.dart
│ │ ├── core/ # shared kernel — config, theme, widgets, utils
│ │ │ ├── config/app_config.dart
│ │ │ └── theme/app_theme.dart
│ │ ├── features/ # vertical slices — data/domain/presentation
│ │ │ └── learning/{data,domain,presentation}
│ │ └── l10n/ # localizations (gen-l10n, in-source)
│ ├── android/ ios/ web/ windows/ macos/ linux/
│ ├── pubspec.yaml # sdk: ^3.13.1, flutter_lints ^6.0.0
│ └── analysis_options.yaml
│
├── backend/ # FastAPI app — uv flat layout (no src/)
│ ├── app/
│ │ ├── main.py # lifespan + CORSMiddleware + / + /health
│ │ ├── core/config.py # BaseSettings (pydantic-settings)
│ │ ├── api/routers/health.py
│ │ ├── db/database.py # Postgres / Neon wiring
│ │ ├── db/redis.py # Redis client & health checks (redis.asyncio)
│ │ ├── models/ schemas/ services/
│ │ ├── tools/ # LLM tool schemas & execution boundary
│ │ ├── workers/ # arq background task workers
│ │ └── api/deps.py
│ ├── tests/test_health.py, test_redis.py
│ ├── pyproject.toml # requires-python >=3.13, ruff, mypy, pytest
│ ├── uv.lock
│ ├── .python-version # 3.13
│ └── .env.example
│
├── .github/workflows/ci.yml # GitHub Actions CI for backend and mobile
└── README.md
- Flutter:
C:\Users\bari2\dev\flutteradded to User PATH. Verify:flutter --version→ 3.47.1 / Dart 3.13.1. JDK 17+, Android SDK if building APK. - Backend:
uv0.12.5 + Python 3.13.14 (py -3.13). No manual venv —uvmanages.venv+uv.lock. - Editor: VS Code + Flutter/Dart + Python extensions.
cd C:\Users\bari2\Desktop\UpGrade\backend
# install (creates .venv)
uv sync
# dev with auto-reload (docs at http://127.0.0.1:8000/docs)
uv run fastapi dev app/main.py
# or
uv run uvicorn app.main:app --reload --host 127.0.0.1 --port 8000
# worker (arq background feed generator)
Worker: uv run arq app.workers.feed.WorkerSettings
# prod
uv run fastapi run app/main.py
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000
# quality
uv run ruff check . --fix; uv run ruff format .
uv run mypy app
uv run pytest -vHealth check: GET /health → {"status":"ok"}. Root: GET / → {"message":"Welcome to UpGrade API","env":"development"}
Env: copy .env.example → .env, edit pydantic-settings values in app/core/config.py.
cd C:\Users\bari2\Desktop\UpGrade\mobile
flutter pub get
flutter analyze # No issues found!
flutter test
flutter run # pick device; or flutter run -d windows / -d chrome
flutter build apk # android
flutter build windowsThe app currently shows Hello World! (empty template). Clean-architecture folders are ready for flutter_riverpod / riverpod_generator / go_router / dio when you start features.
- Flutter 3.47.1 requires
minSdkVersion 24, Gradle 8.7, AGP 8.6, Java 17; Impeller now default on desktop;flutter_localizationsunbundled. - FastAPI
app.on_eventis deprecated since 0.93 — this project useslifespan(asynccontextmanager). CORS viaCORSMiddleware; env viapydantic-settingsSettingsConfigDict(env_file=".env"). uvis the standard package manager —pip/poetrynot used. Lockfileuv.lockis committed; CI usesuv sync --frozen.
- Database URL: Configured in
backend/.envviaDATABASE_URL. - Neon Console: Create project / branch on neon.tech, grab connection string (
postgresql://neondb_owner:...@ep-...aws.neon.tech/neondb?sslmode=require). - Connection Wiring: Managed in
app/db/database.pyandapp/core/config.py.
- Redis URL: Configured in
backend/.envviaREDIS_URL(default:redis://localhost:6379/0for local, or Upstash / Managed Redis URL for cloud). - Used for: arq background task queue (JIT feed generation), JWT refresh token revocation store, and Open Chat rate limiting (50 msg/hr).
- Async Client: Managed via
app/db/redis.py(redis.asynciowith connection pooling, health checks, and lifespan teardown).
.github/workflows/ci.ymlruns on push and PR tomain.- Backend:
uv sync --frozen,ruff check .,ruff format --check .,mypy app,pytest -v. - Mobile:
flutter analyze.
- Auth: better-auth / JWT in
backend/app/api/routers/auth.py+mobile/lib/features/auth/ - AI learning: OpenAI / Workers AI client in
backend/app/services/ai.py, streaming endpoints - State:
flutter pub add flutter_riverpod riverpod_annotation go_router dio json_serializable build_runner - DB: SQLModel 0.0.39 + asyncpg + alembic (
alembicdir placeholder exists)
Private — not published.