How jackthomasanderson/glou-server works
Glou is a self-hosted collection manager for wine, spirits, sparkling wine, and cigars. Users register, then add and manage shared inventory through manual entry, CSV import, or label scanning; they can organize cellars and collections, record tastings, and use analytics, maturity alerts, consumption planning, and wishlist budgets. The web app communicates with an Express API whose routers own request handling and delegate selected work to services backed by PostgreSQL. The README documents further capabilities whose implementation paths are present but whose internal wiring was not sampled; those branches are shown without guessed call chains.
Main entry points: api.ts API client · prisma.ts PostgreSQL · app.ts Feature routers · auth.router.ts Authentication routes
Components 26
Web experience
- Web application
web/app/layout.tsx - Authentication UI
web/components/auth/LoginForm.tsx - Inventory UI
web/components/inventory/InventoryDashboard.tsx - Intake choices
web/components/onboarding/steps/IngestionChoiceStep.tsx - Offline sync
web/lib/offline/syncEngine.ts - Collection features
web/components/cellars/CellarDashboard.tsx - Analytics views
web/components/analytics/AnalyticsDashboard.tsx - Tasting and pairing
web/components/tastings/PairingExplorer.tsx - API client
web/lib/api.ts
API and domain
- Authentication routes
api/src/routes/auth.router.ts - Inventory routes
api/src/routes/inventory.router.ts - Feature routers
api/src/app.ts - Inventory domain
api/src/services/inventory.service.ts - Identity and sessions
api/src/services/auth.service.ts - Scan and import
api/src/routes/scan.router.ts - Product search
api/src/routes/search.router.ts - Domain services
api/src/services/analytics.service.ts - Maturity alerts
api/src/services/alert.service.ts - Authentication middleware
api/src/middleware/auth.middleware.ts
Administration and data
- Admin routes
api/src/routes/admin.router.ts - Backup service
api/src/services/backup.service.ts - Audit logging
api/src/services/audit.service.ts
Persistence and offline
- PostgreSQL
api/src/lib/prisma.ts - Offline cache
web/lib/offline/db.ts
Other components
- Collector
- Vision service
Connections 31
- Collector → Web application: uses
README.md - Web application → Authentication UI: offers sign-in
- Web application → Inventory UI: manages assets
- Intake choices → Scan and import: chooses scan
web/components/onboarding/steps/IngestionChoiceStep.tsx - Inventory UI → API client: requests data
- Authentication UI → API client: submits credentials
- API client → Authentication routes: calls API
- API client → Inventory routes: calls API
- Authentication routes → Identity and sessions: delegates
api/src/routes/auth.router.ts - Authentication routes → Authentication middleware: uses
api/src/routes/auth.router.ts - Identity and sessions → PostgreSQL: reads and writes
api/src/services/auth.service.ts - Identity and sessions → Audit logging: records events
api/src/services/auth.service.ts - Inventory routes → Authentication middleware: protects routes
- Inventory routes → Inventory domain: delegates
- Inventory domain → PostgreSQL: reads and writes
api/src/services/inventory.service.ts - Inventory domain → Maturity alerts: triggers alerts
api/src/services/inventory.service.ts - Feature routers → Authentication routes: mounts routes
api/src/app.ts - Feature routers → Inventory routes: mounts routes
api/src/app.ts - Feature routers → Admin routes: mounts routes
api/src/app.ts - Feature routers → Product search: mounts routes
api/src/app.ts - Collection features → API client: requests features
- Analytics views → API client: requests insights
- Tasting and pairing → API client: requests tastings
- Offline sync → Offline cache: queues mutations
web/lib/offline/syncEngine.ts - Offline sync → API client: syncs changes
- Scan and import → Vision service: requests recognition
- Admin routes → Backup service: delegates backups
api/src/routes/admin.router.ts - Admin routes → PostgreSQL: queries administration data
api/src/routes/admin.router.ts - Audit logging → PostgreSQL: writes audit records
api/src/services/audit.service.ts - Domain services → PostgreSQL: reads domain data
- Maturity alerts → PostgreSQL: reads domain data