How soupgorn/wangmai works
Wangmai is a personal scheduling and availability-sharing application. Users sign in with Google, manage recurring or dated schedule blocks and timezone preferences, then—if they opt in—can appear in authenticated availability searches; sharing is private by default and the public preview is fictional and independent. The frontend talks to a Hono API backed by PostgreSQL, with Better Auth handling sessions and shared schedule logic. The graph emphasizes documented capabilities and sampled wiring; several frontend page-to-feature and browser-to-API connections are not shown in the excerpts, so they are omitted or marked unverified.
Main entry points: routes.ts Schedule endpoints · auth.ts Google authentication · client.ts Database client · app.ts Hono API
Components 21
Web experience
- Google login
frontend/src/app/login/page.tsx - Schedule workspace
frontend/src/features/core - Schedule editing
frontend/src/features/core/schedule-page.tsx - Sharing settings
frontend/src/features/core/settings-page.tsx - Availability finder
frontend/src/features/core/availability-page.tsx - Fictional preview
frontend/src/components/marketing/availability-preview.tsx - Schedule repository
frontend/src/features/core/database-repository.ts - API client
frontend/src/lib/api-client.ts - Preview pages
frontend/src/app/preview
Identity and API
- Hono API
backend/src/app.ts - Google authentication
backend/src/auth/auth.ts - Backend startup
backend/src/index.ts - Runtime configuration
backend/src/config/env.ts
Schedule and discovery
- Schedule endpoints
backend/src/modules/schedule/routes.ts - Availability search
backend/src/modules/availability/routes.ts
Persistence
- Database client
backend/src/db/client.ts - Relational schema
backend/src/db/schema.ts - PostgreSQL
Shared domain
- Schedule rules
packages/shared/src/schedule.ts - Availability rules
packages/shared/src/availability.ts
Other components
- Workspace user
Connections 26
- Workspace user → Google login: signs in
README.md - Workspace user → Schedule workspace: manages schedule
- Schedule workspace → Schedule repository: loads and saves
frontend/src/features/core/availability-client.ts - Schedule repository → Hono API: requests schedule API
- Hono API → Google authentication: routes auth requests
backend/src/app.ts - Hono API → Schedule endpoints: mounts schedule routes
backend/src/app.ts - Hono API → Availability search: mounts finder routes
backend/src/app.ts - Schedule endpoints → Google authentication: validates sessions
backend/src/modules/schedule/routes.ts - Availability search → Google authentication: validates sessions
backend/src/modules/availability/routes.ts - Schedule endpoints → Database client: reads and writes
backend/src/modules/schedule/routes.ts - Availability search → Database client: queries schedules
backend/src/modules/availability/routes.ts - Schedule endpoints → Schedule rules: validates blocks
backend/src/modules/schedule/routes.ts - Availability search → Availability rules: classifies availability
backend/src/modules/availability/routes.ts - Availability rules → Schedule rules: uses schedule rules
packages/shared/src/availability.ts - Database client → Relational schema: configures ORM
backend/src/db/client.ts - Database client → PostgreSQL: connects
backend/src/db/client.ts - Google authentication → Database client: uses database
backend/src/auth/auth.ts - Google authentication → Relational schema: adapts tables
backend/src/auth/auth.ts - Backend startup → Hono API: starts server
backend/src/index.ts - Backend startup → Google authentication: creates auth
backend/src/index.ts - Backend startup → Database client: creates database
backend/src/index.ts - Backend startup → Runtime configuration: loads configuration
backend/src/index.ts - Preview pages → Fictional preview: presents preview
- Availability finder → Availability search: searches availability
- Schedule editing → Schedule endpoints: edits schedule
- Sharing settings → Schedule endpoints: updates preferences