Web-based manga translation QA tool using LLMs and vector embeddings.
backend/— FastAPI (Python 3.12)frontend/— React + Vite + TypeScript + Tailwind CSS- Monorepo, no shared packages
cd backend
source .venv/bin/activate
uvicorn app.main:app --reloadcd frontend
npm run devbackend/.env.example— all backend env varsfrontend/.env.example— all frontend env vars- IMPORTANT: When adding a new config/env var to either backend or frontend, always update the corresponding
.env.examplefile with the new variable name and a sensible placeholder value.
- Async SQLAlchemy + asyncpg (all DB operations are async)
- Use
logging.getLogger(__name__)for logging — centralized config inapp/logging_config.py - All DB tables use UUID primary keys
- Pydantic models for request/response schemas in
app/schemas/ - SQLAlchemy models in
app/models/ - Routes in
app/routers/ - Config via pydantic-settings in
app/config.py— all settings come from env vars - Database: Supabase PostgreSQL + pgvector
- Migrations: Alembic (async) in
backend/alembic/ - DB connection uses Session Pooler (pgbouncer) — requires
statement_cache_size=0in connect_args
cd backend
# Generate a new migration after changing models
.venv/bin/alembic revision --autogenerate -m "describe change"
# Apply migrations
.venv/bin/alembic upgrade head
# Check current migration state
.venv/bin/alembic current
# Rollback one migration
.venv/bin/alembic downgrade -1- Vite + React + TypeScript
- Tailwind CSS for styling
- Axios API client in
src/api/client.ts - Pages in
src/pages/, components insrc/components/ - React Router for routing
- Embeddings stored in pgvector (not local ChromaDB) for deployment simplicity
- OpenRouter API for both LLM and embeddings (free tier)
- Job queue for async QA analysis (not synchronous)
- Input format: structured JSON upload