How geezdock/voyaq works
Purpose and runtime
VOYAQ is a Next.js 16/React 19 collaborative group-travel planner for Indian students. It supports squad creation and invitations, consensus planning, destination intelligence, trip status, and shared expense settlement. The App Router is the application entry surface: src/app/layout.tsx, src/app/page.tsx, and src/proxy.ts (authentication middleware).
Route domains and user entry points
Public flows include landing, authentication, squad creation/joining, tools, travel intel, and consent: src/app/auth/page.tsx, src/app/create/page.tsx, src/app/join/[code]/page.tsx. Authenticated/dashboard flows expose squads and profiles through src/app/(dashboard)/layout.tsx and src/app/(dashboard)/dashboard/page.tsx. Per-squad planning and finalized trip views are parameterized routes at src/app/workspace/[id]/page.tsx, src/app/trip/[id]/page.tsx, and src/app/trip/[id]/hub/page.tsx.
Identity, tenancy, and persistence boundary
Supabase supplies PostgreSQL, Auth, and Realtime; client and server access are separated in src/services/supabase/client.ts and src/services/supabase/server.ts. Shared authentication and selected-squad state are propagated through React providers: src/shared/providers/AuthContext.tsx and src/shared/providers/SquadContext.tsx. Database evolution and security policy are encoded in supabase/migrations/00001_initial_schema.sql, supabase/migrations/00002_rls_gaps.sql, and supabase/migrations/00006_fix_rls_recursion.sql; RLS is therefore a core tenant/access boundary. Development can bypass auth, and the app can run against mock/fallback data.
Squad planning workflow
Workspace UI implements the consensus pipeline: membership, destination proposal/voting, date voting, anonymous budget alignment, and custom polls. The orchestration surface is src/features/workspace/components/WorkspaceView.tsx; discrete stages live in src/features/workspace/components/steps/TabSquad.tsx, src/features/workspace/components/steps/TabDestinations.tsx, and src/features/workspace/components/steps/TabDates.tsx (with budget/polls sibling steps). Completion feeds the trip route, whose summary/status UI is src/features/trip/components/TripView.tsx.
Server actions and domain repositories
Mutation/read coordination is concentrated in server actions rather than exposed API-route files: src/actions/data.ts handles application data operations and src/actions/ai.ts handles AI-backed requests. Repository adapters isolate persistence concerns for squads and expenses: src/lib/repositories/squad.ts and src/lib/repositories/expense.ts. Types at src/types/squad.ts and src/types/expense.ts establish shared domain contracts across UI, actions, and storage.
Destination intelligence and AI
The destination hub is a tabbed aggregation boundary for weather, food, places, events, safety, transport, budget, itinerary, maps, and AI suggestions. Its shell is src/features/destination/components/DestinationHub.tsx, with representative panels src/features/destination/components/Weather/HubWeather.tsx and src/features/destination/components/AISuggestions/HubAISuggestions.tsx. Google Gemini is optional for itinerary, tips, and budgeting via src/actions/ai.ts; destination constants and typed data constrain this domain in src/constants/destinations.ts and src/types/destination.ts.
Expenses, tools, and client persistence
Expense tracking collects items, derives per-person balances, settlement matrices, and payment QR output through src/features/expense/components/ExpenseTracker.tsx, src/features/expense/components/SettlementMatrix.tsx, and src/features/expense/hooks/useExpenses.ts. Standalone planning tools are browser-oriented and include local-storage packing state and a currency service with offline fallback: src/features/toolkit/PackingList.tsx, src/features/toolkit/CurrencyConverter.tsx.
Cross-cutting operations
Caching uses Upstash Redis when configured, with in-memory fallback in src/lib/cache.ts. Sentry initializes across client, server, and edge runtimes via sentry.client.config.ts, sentry.server.config.ts, and sentry.edge.config.ts; PostHog is integrated through src/shared/providers/AnalyticsProvider.tsx. PWA behavior is delivered by public/sw.js, public/manifest.json, and the navigation fallback src/app/offline/page.tsx.
Components 21
App entry & routes
- App Router · Public, dashboard, workspace, and trip route surface.
src/app/layout.tsx - Auth proxy
src/proxy.ts - Dashboard routes
src/app/(dashboard)/dashboard/page.tsx - Workspace route
src/app/workspace/[id]/page.tsx - Trip routes · Finalized trip and destination hub entry points.
src/app/trip/[id]/page.tsx - Auth & squad state
src/shared/providers/AuthContext.tsx
Planning & trips
- Consensus workspace · Coordinates membership, proposals, votes, budget, and polls.
src/features/workspace/components/WorkspaceView.tsx - Planning stages · Squad, destination, date, budget, and poll stages.
src/features/workspace/components/steps/TabDestinations.tsx - Trip summary
src/features/trip/components/TripView.tsx - Expense tracker · Derives balances, settlements, and payment QR output.
src/features/expense/components/ExpenseTracker.tsx
Data & domain
- Data actions · Coordinates application reads and mutations.
src/actions/data.ts - Squad & expense repositories
src/lib/repositories/squad.ts - Squad & expense contracts
src/types/squad.ts - Supabase
src/services/supabase/server.ts - RLS policies · Database policy boundary for squad access.
supabase/migrations/00002_rls_gaps.sql
Destination & AI
- Destination hub · Aggregates travel intelligence and recommendations.
src/features/destination/components/DestinationHub.tsx - AI actions · Optional itinerary, tips, and budget requests.
src/actions/ai.ts - Destination data
src/constants/destinations.ts
Operations
- Cache
src/lib/cache.ts - Analytics & error tracking · Client, server, and edge operational telemetry.
src/shared/providers/AnalyticsProvider.tsx - Offline PWA · Provides offline navigation fallback.
public/sw.js
Connections 22
- Auth proxy → App Router: guards requests
- App Router → Dashboard routes: serves
- App Router → Workspace route: serves
- App Router → Trip routes: serves
- App Router → Auth & squad state: provides session context
- Workspace route → Consensus workspace: renders
- Consensus workspace → Planning stages: coordinates
- Consensus workspace → Data actions: reads and mutates
- Consensus workspace → Trip summary: completion feeds
- Trip routes → Trip summary: renders
- Trip summary → Destination hub: opens intelligence
- Expense tracker → Data actions: persists expenses
- Data actions → Squad & expense repositories: uses
- Squad & expense repositories → Supabase: accesses
- Squad & expense contracts → Squad & expense repositories: contracts
- Auth & squad state → Supabase: auth session
- RLS policies → Supabase: enforces tenancy
- Destination hub → AI actions: requests suggestions
- Destination hub → Destination data: uses typed data
- AI actions → Cache: caches optional responses
- App Router → Analytics & error tracking: reports telemetry
- App Router → Offline PWA: offline support