# Fil-A-Management **English** | [Deutsch](README.de.md) A small web app for a group of 3D-printing friends: everyone keeps their **own filament stock and printers**, the group shares **one catalogue and one planning list for the next joint order**. The user interface is in German. Python 3.12 · Django 5.2 LTS · server-side templates · SQLite · Gunicorn · WhiteNoise. No SPA, no external fonts or scripts, no database server. ![Orders](docs/screenshots/orders-desktop.png) ## Features - Accounts with username/password; admin creates and deactivates users - Private stock and printers per person, optionally shared with members - Cascading selection: manufacturer → material → subtype → colour → spool type (works without JavaScript) - Joint order list per person with delivery status; handing over books the quantity into the person's stock; order history - Empty spools, refills, "spool used up" with optional re-order - Shared model library (STL, 3MF, ZIP up to 50 MiB) - One-time starter catalogues for Bambu Lab, SUNLU, eSUN, JAYO, Anycubic, Geeetech and generic filament - Consistent SQLite online backup command ## Requirements - Docker (Unraid or Docker Compose) with network access to Git, PyPI and Alpine packages - No image build: the stock image `python:3.12-alpine` runs `start.sh`, which fetches this repository at a pinned revision and installs hash-pinned dependencies ## Installation **Docker Compose** ```sh git clone Fil-A-Management cd Fil-A-Management cp .env.example .env # set GIT_REPO_URL to this repository sudo install -d -o 0 -g 0 -m 755 appdata/app sudo install -d -o 99 -g 100 -m 700 appdata/app/runtime appdata/data sudo install -d -o 0 -g 0 -m 700 appdata/secrets sudo install -o 0 -g 0 -m 644 start.sh appdata/app/start.sh sudo touch appdata/secrets/gitea_token # empty for a public repository docker compose up -d ``` The app listens on . **Unraid:** see [docs/unraid.md](docs/unraid.md) (German) for the container fields. Create the first admin account at the interactive prompt: ```sh docker compose exec --user 99:100 app /app/runtime/venv/bin/python /app/runtime/app/manage.py createsuperuser ``` ## Configuration Everything is set by container environment; see [`.env.example`](.env.example). Most important: `GIT_REPO_URL`, `GIT_REVISION` (pin a commit for reproducible runs), `DJANGO_ALLOWED_HOSTS`, `DJANGO_CSRF_TRUSTED_ORIGINS`, `DJANGO_COOKIE_SECURE`, `DJANGO_TRUST_PROXY`, `SEED_CATALOG`. For a private repository use a read-only token file or a read-only SSH deploy key. Full table: [docs/DETAILS.md](docs/DETAILS.md#konfiguration). ## Security Do not expose it unprotected to the internet. Put TLS and login rate limiting in a reverse proxy; the app has no brute-force limiter of its own. Every start runs the code of the configured repository and revision, so only use trusted sources. Back up with `manage.py backup_sqlite` and keep `/data/secret.key` with the backup. ## Development ```sh python3 -m venv .venv && . .venv/bin/activate python -m pip install --require-hashes -r requirements.txt python -m pip install -r requirements-dev.txt python manage.py test filament.tests --settings=config.test_settings python -m unittest tests.test_http tests.test_bootstrap tests.test_deployment -v ruff check . && ruff format --check . ``` Local dev server, backups, restore, updates and catalogue sources: [docs/DETAILS.md](docs/DETAILS.md) (German). ## License MIT, see [LICENSE](LICENSE). Manufacturer names belong to their owners.