How v-par23/waterloo-budget works
Overview
This is a Next.js App Router application. The route and module names indicate a workspace/travel planning product centered on spots, maps, schedules, transport, budgets, saved items, teams, reviews, and AI-assisted recommendations. The README documents only the Next.js scaffold, so detailed business behavior is inferred from repository organization rather than confirmed source logic.
Public entry points
• Browser pages include /, /discover, /map, /planner, /schedule, /transport, /budget, /saved, /ask, /suggest, /workspots, and team routes under /teams.
• Authentication pages are organized under src/app/(auth), including login, signup, password recovery, and reset flows. /auth/callback provides an authentication callback endpoint.
• HTTP API surfaces are organized under src/app/api: AI insights and recommendations, reviews, and schedule parsing.
Core components
• App Router screens — src/app: Owns page-level entry points, authentication pages, the shared layout, and route-specific UI.
• API route handlers — src/app/api: Defines server-facing HTTP boundaries for AI, reviews, and schedule parsing. These are separate from the browser page routes.
• Feature UI — src/components/features: Contains map views, route planning, spot lists, AI insights, comparisons, and team expense interfaces.
• Application shell and controls — src/components/layout: Provides navigation-oriented layout elements such as the sidebar and mobile header.
• Client state providers — src/components/AuthProvider.tsx: Establishes shared client-side state boundaries; parallel providers cover budgets, saved spots, and schedules.
• Persistence adapters — src/lib/supabase/server.ts: Provides server-side Supabase integration, with companion client and type modules. supabase-schema.sql and the budget/team migration files define the repository’s documented database artifacts.
• AI integration area — src/lib/ai: Groups AI configuration and embedding-related implementation used by the AI route surface.
• Domain utilities and hooks — src/lib/hooks: Groups reusable concerns for route plans, speech, reviews, and user location; related domain modules cover budgets, schedules, geography, Yelp, and static spot data.
Relationships
Browser requests enter page routes in src/app, which can share layout, feature, UI, provider, hook, and domain modules. API requests enter the handlers under src/app/api; the AI, schedule, review, geography, and persistence areas provide supporting ownership boundaries rather than a proven fixed execution sequence. Supabase adapters correspond to the SQL schema and migrations, forming the persistence boundary. The browser/user and any configured external services are actors outside this repository; Yelp and AI-related modules indicate optional integration areas, not guaranteed runtime call order.
Main entry points: app App Router screens · api API route handlers · server.ts Persistence adapters · hooks Domain utilities and hooks
Components 11
Application surfaces
- App Router screens · Owns browser pages, authentication pages, shared layout, and route UI.
src/app - API route handlers · Defines server-facing boundaries for AI, reviews, and schedule parsing.
src/app/api - Feature UI
src/components/features - Application shell
src/components/layout
Supporting modules
- Client state providers · Provides shared client-side state for authentication and domain features.
src/components/AuthProvider.tsx - Domain utilities and hooks
src/lib/hooks - AI integration · Provides AI configuration and embedding-related implementation.
src/lib/ai - Persistence adapters · Provides server-side persistence integration and database types.
src/lib/supabase/server.ts - Database schema
supabase-schema.sql
Other components
- Browser / user
- Supabase
Connections 10
- Browser / user → App Router screens: requests pages
- Browser / user → API route handlers: requests API
- App Router screens → Application shell: uses
- App Router screens → Feature UI: uses
- App Router screens → Client state providers: shares state through
- App Router screens → Domain utilities and hooks: uses
- API route handlers → AI integration: uses
- API route handlers → Domain utilities and hooks: uses
- Persistence adapters → Database schema: corresponds to
- Persistence adapters → Supabase: integrates with