FastAPI backend for the RSM Studio scientific publishing platform. Provides a REST API for users, manuscripts, authentication, and real-time collaboration.
- Python 3.13+
- FastAPI + Uvicorn
- SQLAlchemy (async) + Alembic migrations
- PostgreSQL — primary database
- PyJWT — authentication
- pycrdt + websockets — Y.js collaboration client
uv sync
alembic upgrade head
uvicorn main:app --reloadAPI docs available at http://localhost:8000/docs.
uv run pytest -n8 # SQLite locally (fast)
uv run pytest tests/integration/ -v # integration tests
./simulate-ci -- uv run pytest -n8 # PostgreSQL (CI fidelity)Tests use SQLite locally and PostgreSQL in CI automatically — no config needed for local dev.
# Deploy from the project root (build needs both backend/ and styles/)
fly deploy --config backend/fly.toml --ignorefile backend/.dockerignoreDatabase hosted on Supabase, managed via Alembic.
| Script | Description |
|---|---|
scripts/init_db.py |
Create all tables |
scripts/add_mock_data.py |
Seed database with mock users and files |
scripts/add_example_data.py |
Load example RSM documents |
scripts/sync_columns.py |
Sync columns between Postgres databases |