# Bar Rota Small self-hosted rota application for a non-profit bar/club. ## What it does - One **Night** assignment for every calendar day. - Independent rotating **Saturday Lunch** and **Sunday Lunch** schedules. - Admins can override any generated assignment. - Members can request that another person (or anyone available) takes an assignment. - Optional manager approval before a change becomes final. - Optional email and phone on each user; username is used for login. - SMTP email notifications and a notification log. - Daily reminder command suitable for cron. - SQLite by default, packaged for Docker. ## Quick start with Docker ```bash cp .env.example .env # Edit SECRET_KEY and INITIAL_ADMIN_PASSWORD before first start. docker compose up -d --build ``` Open `http://localhost:8000` and sign in with the values in `.env`. **Important:** the initial admin is only created when the database has no users. Changing `INITIAL_ADMIN_PASSWORD` later does not reset that account; reset it from the People screen. ## Local development ```bash python -m venv .venv . .venv/bin/activate pip install -r requirements-dev.txt cp .env.example .env python -m app.cli init-db uvicorn app.main:app --reload ``` Demo data: ```bash python -m app.cli seed-demo ``` Demo member password: `demo-password`. ## Email Set `SMTP_HOST`, `SMTP_PORT`, `SMTP_USERNAME`, `SMTP_PASSWORD`, `SMTP_FROM` and `SMTP_STARTTLS` in `.env`. If SMTP is not configured, email attempts are safely recorded as `skipped` in **Email log**. To send reminders from cron: ```bash python -m app.cli send-reminders ``` Example cron entry at 09:00 every day: ```cron 0 9 * * * cd /path/to/bar-rota && docker compose exec -T bar-rota python -m app.cli send-reminders ``` ## Tests ```bash pytest -q ``` ## Project documentation - `AGENTS.md` — instructions and guardrails for coding agents/LLMs. - `docs/DOMAIN.md` — scheduling rules and terminology. - `docs/ARCHITECTURE.md` — implementation overview. - `docs/ROADMAP.md` — intentionally deferred work.