How miguel-fnc/eventhub works
EventHub is an event discovery and reservation application. Customers browse future events, register or sign in, reserve seats, review their reservation history, and cancel eligible reservations; administrators publish, edit, inspect, and delete events. The React client calls a Hono API running in a Cloudflare Worker, which reads and updates D1. The Worker also serves the frontend and registers error monitoring. The graph follows the sampled modules and README; Terraform provisioning and CI/deployment automation are outside the runtime workflow shown.
Main entry points: index.ts API router and assets · customer.ts Auth and reservations · main.tsx EventHub interface · admin.ts Event administration
Components 14
Web client
- EventHub interface
frontend/src/main.tsx - Account and reservations
frontend/src/customer.tsx - Admin console
frontend/src/admin.tsx
Worker API
- API router and assets
backend/src/index.ts - Request helpers
backend/src/app.ts - Auth and reservations
backend/src/customer.ts - Event administration
backend/src/admin.ts - Input validation
backend/src/validation.ts - Credential and token crypto
backend/src/crypto.ts
Application data
- Cloudflare D1
- Workers Static Assets
Observability
- Error and trace capture
backend/src/monitoring.ts - Sentry
Other components
- Customer or admin
Connections 20
- Customer or admin → EventHub interface: uses
frontend/src/main.tsx - EventHub interface → Account and reservations: renders
frontend/src/main.tsx - EventHub interface → Admin console: renders
frontend/src/main.tsx - EventHub interface → API router and assets: fetches catalog
frontend/src/main.tsx - Account and reservations → API router and assets: calls API
frontend/src/customer.tsx - Admin console → Account and reservations: uses API helper
frontend/src/admin.tsx - Admin console → API router and assets: calls API
frontend/src/admin.tsx - API router and assets → Auth and reservations: registers routes
backend/src/index.ts - API router and assets → Event administration: registers routes
backend/src/index.ts - API router and assets → Error and trace capture: registers monitoring
backend/src/index.ts - API router and assets → Cloudflare D1: queries health and catalog
backend/src/index.ts - API router and assets → Workers Static Assets: serves non-API requests
backend/src/index.ts - Auth and reservations → Cloudflare D1: reads and updates
backend/src/customer.ts - Event administration → Cloudflare D1: reads and updates
backend/src/admin.ts - Auth and reservations → Request helpers: uses request helpers
backend/src/customer.ts - Event administration → Request helpers: uses request helpers
backend/src/admin.ts - Auth and reservations → Input validation: validates inputs
backend/src/customer.ts - Event administration → Input validation: validates inputs
backend/src/admin.ts - Auth and reservations → Credential and token crypto: hashes credentials
backend/src/customer.ts - Error and trace capture → Sentry: sends errors and traces
backend/src/monitoring.ts