SmartBox¶
Self-hosted system paczkomatów¶
Pełna dokumentacja platformy: backend NestJS, panel operatora Next.js, kiosk Flutter na Windows desktop, własna infrastruktura w Docker Compose za Traefikiem. Zero managed cloud, zero zewnętrznego CI, zero rejestru — wszystko na jednej maszynie wirtualnej.
Skróty po projekcie¶
-
Backend
NestJS 10 + Prisma + Postgres + RabbitMQ + Redis. Pełna lista endpointów, model danych, audit, workery.
-
Panel operatora
Next.js 15 App Router · server components · glass-morphism ·
next-intlPL/EN · server-paginated tabele. -
Kiosk
Flutter Windows desktop · Modbus TCP · offline cache · OTA przez PowerShell agent.
-
Infrastruktura
Docker Compose · Traefik 3.5 · Postgres 16 · Keycloak 26 · Gitea 1.22 · Portainer · Dozzle.
Etapy projektu¶
| Etap | Zakres | Status |
|---|---|---|
| 0 | Infrastruktura (Traefik, Postgres, Redis, RabbitMQ, Keycloak, Gitea, Portainer, Dozzle) | |
| 1 | Backend core — users, machines, shipments, lockers, audit, dual auth (JWT + machine API key) | |
| 2 | Panel operatora — login, dashboard, shipments, machines, users, audit, profile | |
| 3 | Kiosk UI + OTA pipeline — Flutter Windows desktop + PowerShell OTA agent + panel-side upload | |
| 4 | Workery (auto-OFFLINE / auto-EXPIRED), hardware abstraction, deposit flow, offline mode, mobile-parity API | |
| 5 | Hardware Modbus + locker lifecycle hardening | |
| 6 | ErgoFlow integration — sync, JIT user/Keycloak/RFID provisioning | |
| 7 | Multi-machine sync, smart assignment, document/key-rental flows | |
| 8 | Hardening — Prometheus + Grafana, OIDC code-flow, real notifications, Gitea Actions CI/CD |
Dla kogo jest ta dokumentacja¶
Operatorzy
Sprawdź panel operatora — pełna mapa stron, role, flow nadawania i odbierania paczek.
Developerzy backendowi
Backend reference ma każdy endpoint, model Prisma i konwencję audytu. Live Swagger dostępny pod api.smartbox.ergoflow.app/docs.
Devops / SRE
Infrastruktura opisuje stos Compose, Traefik, certy Let's Encrypt i ścieżkę deploy tar | ssh. Kiosk runbook w infra/scripts/windows-kiosk/RUNTIME.md.
Integratorzy ErgoFlow
Etap 6 tłumaczy quirki upstreamu (clientTime, records envelope, double-encoded grupy), lifecycle firstSeenAt/deactivatedAt i model JIT-provisioningu.
Linki produkcyjne¶
- Panel — smartbox.ergoflow.app
- Backend Swagger — api.smartbox.ergoflow.app/docs
- Keycloak — auth.smartbox.ergoflow.app
- Gitea — git.smartbox.ergoflow.app