No description
  • Python 82.7%
  • HTML 16%
  • Dockerfile 0.7%
  • Shell 0.4%
  • Mako 0.2%
Find a file
2026-06-29 00:07:16 +00:00
_rust_source_spec wip 2026-05-19 18:03:21 +02:00
docs wip 2026-05-19 18:03:21 +02:00
inventree chore(deps): update all dependencies 2026-06-27 00:04:02 +00:00
migrations wip 2026-05-19 18:03:21 +02:00
spec wip 2026-05-19 18:03:21 +02:00
taste-skill wip 2026-05-19 18:03:21 +02:00
tests wip 2026-05-19 18:03:21 +02:00
verleihnix wip 2026-05-19 18:03:21 +02:00
.dockerignore wip 2026-05-19 18:03:21 +02:00
.env.dev wip 2026-05-18 15:01:20 +02:00
.env.dev.pg wip 2026-05-18 15:01:20 +02:00
.env.pg wip 2026-05-18 15:01:20 +02:00
.env.prod wip 2026-05-18 15:01:20 +02:00
.env.prod.pg wip 2026-05-18 15:01:20 +02:00
.gitignore wip 2026-05-19 18:03:21 +02:00
.pre-commit-config.yaml wip 2026-05-16 18:13:04 +02:00
.prettierignore wip 2026-05-16 00:22:00 +02:00
AGENTS.md wip 2026-05-19 18:03:21 +02:00
alembic.ini wip 2026-05-16 00:22:00 +02:00
babel.cfg wip 2026-05-16 00:22:00 +02:00
dev.db wip 2026-05-19 18:03:21 +02:00
docker-compose.dev.pg.yml chore(deps): update all dependencies 2026-06-29 00:07:13 +00:00
docker-compose.dev.yml chore(deps): update all dependencies 2026-06-29 00:07:13 +00:00
docker-compose.pg.yml chore(deps): update all dependencies 2026-06-29 00:07:13 +00:00
docker-compose.yml chore(deps): update all dependencies 2026-06-29 00:07:13 +00:00
Dockerfile chore(deps): update all dependencies 2026-06-29 00:07:13 +00:00
entrypoint.sh wip 2026-05-17 09:37:08 +02:00
handover.md wip 2026-05-19 18:03:21 +02:00
mise.toml wip 2026-05-16 18:13:04 +02:00
pyproject.toml wip 2026-05-19 18:03:21 +02:00
README.md fmt 2026-05-17 09:38:06 +02:00
renovate.json5 chore(deps): add renovate.json5 2026-05-20 00:04:41 +00:00
uv.lock wip 2026-05-19 18:03:21 +02:00

Verleihnix

Community tool-lending platform. Neighbours share tools, track loans, earn points.

Features

  • Tool management — list, search, photo uploads, categories
  • Loan lifecycle — request, approve, extend, return, overdue tracking
  • Holds & appointments — queue for popular items, schedule handovers
  • Points & gamification — earn/spend points for lending activity, configurable point values
  • Feedback & ratings — borrower/lender reviews with photos
  • Admin panel — SQLAdmin at /admin with CRUD for all models, bulk actions, runtime settings
  • Internationalisation — German (de) with Babel, locale switcher
  • Email verification — token-based account activation
  • Geolocation — address-based search, location privacy controls
  • OpenTelemetry — optional tracing integration
  • Background tasks — Huey worker for emails and scheduled jobs

Quick Start (Development)

Without Docker

Requires mise (installs Python 3.14 + uv automatically):

mise install
uv sync
cp .env.dev .env          # or use .env.dev directly
uv run alembic upgrade head
uv run verleihnix create-admin --username admin --email admin@local --password admin
uv run verleihnix          # starts the dev server on :8000

With Docker

docker compose -f docker-compose.dev.yml up --build

This gives you:

Service URL
App (hot-reload) http://localhost:8000
Admin panel http://localhost:8000/admin
Mailpit (catch-all email UI) http://localhost:8025

Source is bind-mounted — edits reload instantly.

Production

1. Configure

cp .env.example .env
# Edit .env — at minimum set SECRET_KEY, ADMIN_SECRET_KEY, BASE_URL, SMTP credentials

2. Run

docker compose up -d --build

This starts the app and a Huey worker for background tasks (emails, etc).

3. Migrate & seed admin

docker compose exec app uv run alembic upgrade head
docker compose exec app uv run verleihnix create-admin --username admin

Architecture

docker-compose.yml
├── app       — FastAPI served by uvicorn (:8000)
├── worker    — Huey consumer for background tasks
└── volumes   — uploads/ and data/ (SQLite DB + Huey state)

SQLite is the default database. For multi-worker production deployments, switch DATABASE_URL to PostgreSQL (PostGIS support is auto-detected).

Running Tests

uv sync                  # includes dev dependencies
uv run pytest            # 147 tests

Project Layout

verleihnix/              Application code
├── models/              SQLAlchemy domain models (15 entities)
├── routes/              FastAPI route modules
├── templates/           Jinja2 + HTMX templates
├── translations/        Babel i18n (de)
├── admin.py             SQLAdmin setup
├── admin_auth.py        Admin authentication backend
├── admin_views.py       Admin model views & bulk actions
├── cli.py               CLI commands (create-admin)
├── config.py            Pydantic settings (env-driven)
├── instance_settings.py Runtime configuration service
├── main.py              App factory
├── tasks.py             Huey background tasks
└── tracing.py           OpenTelemetry integration
migrations/              Alembic migrations
tests/                   Pytest suite (147 tests)
spec/                    Design specs & pseudocode

Admin Panel

Available at /admin for users with role=ADMIN. Features:

  • CRUD for all models (users, tools, loans, feedback, fines, points, invitations)
  • Bulk deactivate users (admin-safe), force-close overdue loans
  • Runtime instance settings (invite_only, federation_scope, maintenance_mode)
  • Separate session with 1-hour expiry
uv run verleihnix create-admin --username admin

Environment Variables

All settings are prefixed with VERLEIHNIX_. See .env.example for the full list.