Vier-Crate-Workspace mit:
- Domain: Account, Car, Tour, Delivery, DeliveryItem, DeliveryNote, Customer,
Article, Warehouse, ScanState, AuditAction — alle mit serde + feature-gated
utoipa::ToSchema.
- Application: Ports (TourRepository, DeliveryRepository, ScanRepository,
DeliveryNoteRepository, CarRepository, AuthService) und Use Cases.
- Infrastructure: Postgres-Adapter via sqlx (PgTourRepository etc.) +
Keycloak-AuthService mit JWKS-Cache + OIDC-Discovery.
- API: Axum 0.8, utoipa-OpenAPI + Swagger-UI, JWT-Bearer-Middleware,
AuthenticatedUser-Extractor.
Endpoints:
- GET /me/tours/today, /tours/{id}, /accounts/{pn}, /me/cars, /health
- POST /sync/tour, /scans (bulk + idempotent via clientScanId),
/deliveries/{id}/{hold,resume,cancel,complete,notes}, /me/cars
- PUT /tours/{id}/delivery-order, /deliveries/{id}/assigned-car, /me/cars/{id}
- PATCH /me/cars/{id}
Datenmodell:
- 6 Migrationen (accounts, tours/deliveries/items + Stammdaten,
scan_audit mit clientScanId-UNIQUE, state_reason refactor,
delivery_notes, cars + FKs nachziehen).
- Business-stabile Beleg-Keys (belegart_id, belegnummer) für ERP-Sync.
- Append-only scan_audit + embedded scan_state als doppelte Wahrheit.
Dev-Setup:
- docker-compose mit Postgres 17 + Keycloak 26
- Keycloak-Realm 'holzleitner' mit Public-Client (PKCE), Testfahrer
(PN 1001) + Audience-/Personalnummer-Mapper
33 lines
823 B
TOML
33 lines
823 B
TOML
[package]
|
|
name = "holzleitner-api"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
|
|
[[bin]]
|
|
name = "holzleitner-server"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
holzleitner-domain = { workspace = true, features = ["openapi"] }
|
|
holzleitner-application = { workspace = true, features = ["openapi"] }
|
|
holzleitner-infrastructure.workspace = true
|
|
utoipa.workspace = true
|
|
utoipa-swagger-ui.workspace = true
|
|
axum.workspace = true
|
|
tokio.workspace = true
|
|
tower.workspace = true
|
|
tower-http.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
uuid.workspace = true
|
|
chrono.workspace = true
|
|
thiserror.workspace = true
|
|
anyhow.workspace = true
|
|
envy.workspace = true
|
|
dotenvy.workspace = true
|
|
sqlx.workspace = true
|