This project is responsible for the backend services of the Astro-BEAM-AUTh application. It manages the following tasks:
- Handling API requests and responses.
- Managing user authentication and authorization.
- Interfacing with the database for data storage and retrieval.
- Managing telescope observations and scheduling.
To run the backend, execute the following command:
uv run backendConfigure backend authentication through environment variables (see .env.example).
Required values:
SUPABASE_URL: Supabase project URL (https://<project-ref>.supabase.co)SUPABASE_AUDIENCE: expected JWT audience (defaultauthenticated)
Auth policy values:
DEBUG_ALLOW_GUEST_HISTORY: temporary debug-only guest history flag; keepFalsein production
Database lifecycle is managed from this project using Alembic migrations.
Initialize the database and apply all migrations:
uv run backend-db initApply pending migrations:
uv run backend-db upgradeCreate a new migration from model changes:
uv run backend-db revision -m "describe change" --autogenerateEach created revision also generates SQL artifacts in migrations/versions/sql:
<revision_id>_upgrade.sql<revision_id>_downgrade.sql
If you want to skip SQL artifact generation for a specific revision:
uv run backend-db revision -m "describe change" --autogenerate --no-sqlBy default, revision IDs are generated as YYYYMMDD_NNNN.
For example, the first revision on 2026-05-05 is 20260505_0001.
You can still override manually:
uv run backend-db revision -m "describe change" --autogenerate --rev-id 20260505_0009Inspect migration state:
uv run backend-db current
uv run backend-db historyTo install the development dependencies, run:
uv sync --devContributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
Please read our Contributing Guidelines for more details.