Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.12 KB

File metadata and controls

36 lines (24 loc) · 1.12 KB

Server

Backend for shareloop. See Docker setup to run the full stack without a local Python env.

Requirements

Setup

uv sync
uv sync --extra dev   # for linting / type checking

Running

mise run server:dev

The API is documented in ../api/shareloop.openapi.yaml. Regenerate the Pydantic models with mise run server:api:gen.

Database

Schema is defined in src/db/models.py (SQLAlchemy ORM). Migrations run automatically at startup via Alembic.

Action Command
Apply pending migrations mise run server:db:migrate
New migration from model changes mise run server:db:migration:new -- -m "description"
Empty migration (manual SQL) mise run server:db:migration:create -- -m "description"
Stamp DB at current revision mise run server:db:stamp

Workflow: edit src/db/models.pymise run server:db:migration:new -- -m "..." → review → mise run server:db:migrate → commit.