Metadata-Version: 2.3
Name: rabbitdb
Version: 1.8.0
Summary: Rabbit management system for db.binky.casa
Requires-Dist: fastapi[standard]>=0.115
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: psycopg2-binary>=2.9
Requires-Dist: bcrypt>=4.0
Requires-Dist: itsdangerous>=2.2
Requires-Dist: openpyxl>=3.1
Requires-Dist: python-multipart>=0.0.12
Requires-Dist: segno>=1.6
Requires-Dist: uvicorn>=0.50.2
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# RabbitDB

A rabbit rescue management system for [db.binky.casa](https://db.binky.casa). Tracks rabbits, hutches, adoptions, and staff — built for day-to-day operations at a small rescue.

## Features

- **Rabbits** — track status (Resident, Fostering, Rehomed, Passed), gender, date of birth, neutered status, parentage, and hutch assignment
- **Hutches** — manage hutch letters and floors, mark each floor boundary as a ramp or a divider to split or join living spaces, track cleaning and playtime schedules, see occupancy at a glance
- **Adoptions** — record adoption events and link them to rabbits
- **Employees** — store staff records with hourly rates and employment dates
- **Timesheets** — log hours worked per employee with automatic earnings calculation
- **Payouts** — record payments made to staff and track amounts owed
- **Activity Log** — audit trail of all changes across the system

## Access Roles

| Role | Access |
|------|--------|
| `viewer` | Read-only access to rabbits and hutches |
| `staff` | Can edit rabbits and hutches, log own timesheets, view own employee record |
| `admin` | Full access including adoptions, employees, payouts, and user management |

## Stack

- [FastAPI](https://fastapi.tiangolo.com/) — backend framework
- [SQLAlchemy 2.0](https://www.sqlalchemy.org/) — ORM
- [PostgreSQL](https://www.postgresql.org/) — database
- [Jinja2](https://jinja.palletsprojects.com/) — server-side templates
- [HTMX](https://htmx.org/) — dynamic UI without a JS framework
- [Catppuccin Mocha](https://github.com/catppuccin/catppuccin) — colour theme

## Running locally

Requires [uv](https://docs.astral.sh/uv/) and a running PostgreSQL instance.

```bash
cp .env.example .env
# edit .env with your DATABASE_URL and SECRET_KEY
uv run fastapi dev app/main.py
```

Or with Docker/Podman:

```bash
podman-compose up
```

## First run

A fresh database has no user accounts, so there is nothing to sign in with. The
login page will say so; create the first user from the command line:

```bash
uv run rabbitdb --create-user
```

Inside a container:

```bash
podman exec -it <container> rabbitdb --create-user
```

It prompts for a username, a role (`admin`, `staff` or `viewer`) and a password.
The password is only ever prompted for, never passed as an argument, so it stays
out of your shell history and the process list. Use the same command any time you
need to add another account without going through the web UI.

---

> Created with [Claude Code](https://claude.ai/code)
