No description
  • C# 99.8%
  • Dockerfile 0.2%
Find a file
TokeDit e131dc84db fix: reopen GET /api/users to any authenticated user
Locking the whole UsersController to Admin broke driver order loading:
ChaufforView.vue fetches /api/users (for delivered-by names) alongside
orders/items in one Promise.all, so a driver's 403 there failed the
whole fetch. Reads stay open to any authenticated user; create/update/
delete stay Admin-only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134xoPzpcGeKoUxogYVdhyB
2026-08-24 11:20:03 +02:00
OpgaveApi fix: reopen GET /api/users to any authenticated user 2026-08-24 11:20:03 +02:00
CLAUDE.md same as last commit 2026-08-24 11:04:37 +02:00
docker-compose.yml Switch backend to EF Core + Postgres, untrack bin/obj 2026-08-24 08:21:50 +02:00
Dockerfile added alot of stuff for the demo 2026-06-11 02:30:34 +02:00
dockerignore added alot of stuff for the demo 2026-06-11 02:30:34 +02:00
LICENSE Initial commit 2026-06-03 16:34:47 +00:00
README.md commited changes i cant remember making LOL 2026-07-07 13:38:51 +02:00

opgave-tracker

Backend REST API for Vig Festival's internal task and material ordering system. C#/.NET 10, JWT auth, in-memory storage. No database — all data resets on restart.

Prerequisites

Local dev: .NET 10 SDK

Docker: Docker + Docker Compose v2

Running locally

cd OpgaveApi
dotnet run

API available at http://localhost:5082.

Swagger/Scalar docs at http://localhost:5082/scalar/v1 (dev mode only).

Running with Docker Compose

The compose file expects an external Docker network named homelab_homelab. Create it once if it doesn't exist:

docker network create homelab_homelab

Then start the stack:

docker compose up -d

Backend runs on port 8080 inside the container. Map it as needed in your reverse proxy.

Configuration

JWT settings are read from environment variables in production. Before deploying, set these in your environment or docker-compose.override.yml:

Jwt__Secret=<your-secret-min-30-chars>
Jwt__Issuer=<your-issuer>
Jwt__Audience=<your-audience>

Security: Do not use the default secret from appsettings.json in production. Change it before exposing the API publicly.

Authentication

All endpoints except /api/auth/login and /api/auth/register require a Bearer token.

Register:

POST /api/auth/register
Content-Type: application/json

{ "username": "...", "password": "..." }

Login:

POST /api/auth/login
Content-Type: application/json

{ "username": "...", "password": "..." }

Returns a JWT. Pass it as Authorization: Bearer <token> on subsequent requests.

Endpoints

Resource Base path
Auth /api/auth
Users /api/users
Orders /api/orders
Order items /api/orderitems
Items /api/items
Locations /api/locations
Delivery photos /api/deliveryphotos
Fuckup photos /api/fuckupphotos

Full interactive docs at /scalar/v1 when running in development.

Photo uploads

Uploaded files are stored under /app/uploads inside the container, mounted as a Docker volume (uploads). They persist across container restarts but are local to the host.

Notes

  • Storage is in-memory. Restarting the API wipes all data.
  • CORS is set to allow all origins. Lock this down if the API is publicly accessible.
  • Frontend repo: opgave-tracker-client