How shikosai34/synapse works
FesFlow brings together festival operations, visitor services, and school-event management. The principal flow is a visitor or staff member using the SPA, which calls the Worker API; domain routes handle event, circle, menu, order, membership, and other operations against D1. The API also supports uploads through object storage. The README documents capabilities beyond the sampled code, including check-in, coupons, lotteries, reviews, wristbands, and analytics. Some route internals and UI pages were not sampled, so those branches show documented capabilities without speculative call-level links.
Main entry points: routes/index.ts Route registry · api.ts API client · src/index.ts Worker entry · src/index.ts D1 database
Components 23
User applications
- SPA routing
apps/app/src/App.tsx - API client
apps/app/src/lib/api.ts - Order workflows
apps/app/src/features/orders/submission.ts - Event dashboards
apps/app/src/pages/EventDashboard.tsx - Visitor services
apps/app/src/pages/VisitorHome.tsx
API and domain
- Worker entry
apps/api/src/index.ts - Route registry
apps/api/src/routes/index.ts - Events and circles
apps/api/src/routes/event.ts - Circle management
apps/api/src/routes/circle.ts - Menus and toppings
apps/api/src/routes/menu.ts - Orders
apps/api/src/routes/order.ts - Pre-orders
apps/api/src/routes/pre_order.ts - Memberships
apps/api/src/routes/membership.ts - Lotteries
apps/api/src/routes/lottery.ts - Wristbands and check-in
apps/api/src/routes/wristband.ts - System administration
apps/api/src/routes/system.ts - Other domain routes
apps/api/src/routes
Identity and access
- Auth middleware
apps/api/src/middleware/auth.ts - Session and permissions
apps/api/src/utils/auth.ts
Persistence and files
- D1 database
packages/db/src/index.ts - Domain schemas
packages/db/src/schema/festival.ts - Object storage
packages/storage/src/index.ts
Other components
- Visitors and staff
Connections 22
- Visitors and staff → SPA routing: use
README.md - SPA routing → API client: requests
- API client → Worker entry: calls REST API
README.md - Order workflows → API client: submits orders
- Event dashboards → API client: loads dashboard data
- Visitor services → API client: uses API
- Worker entry → Route registry: mounts routes
apps/api/src/index.ts - Route registry → Events and circles: registers
apps/api/src/routes/index.ts - Route registry → Circle management: registers
apps/api/src/routes/index.ts - Route registry → Menus and toppings: registers
apps/api/src/routes/index.ts - Route registry → Orders: registers
apps/api/src/routes/index.ts - Route registry → Pre-orders: registers
apps/api/src/routes/index.ts - Route registry → Memberships: registers
apps/api/src/routes/index.ts - Route registry → Lotteries: registers
apps/api/src/routes/index.ts - Route registry → Wristbands and check-in: registers
apps/api/src/routes/index.ts - Route registry → System administration: registers
apps/api/src/routes/index.ts - Route registry → Other domain routes: registers
apps/api/src/routes/index.ts - Auth middleware → Session and permissions: gets admin session
apps/api/src/middleware/auth.ts - Worker entry → D1 database: creates request DB
apps/api/src/index.ts - Worker entry → Object storage: stores and serves uploads
apps/api/src/index.ts - D1 database → Domain schemas: loads schema
packages/db/src/index.ts - Memberships → D1 database: queries membership data
apps/api/src/routes/membership.ts