How frieren-kr/on-site works
This is a collaborative project-planning app: organizers create projects, add sites and schedules, calculate routes, and invite participants; members then view project details and maps. Authentication and role-based access gate the workflow. The graph preserves the documented-by-source features and major UI branches; several components and integrations are unsampled, so their internal relationships are omitted where the excerpts do not establish them.
Main entry points: actions.ts Project planning actions · prisma.ts Database client · session.ts Session access · page.tsx Project overview
Components 26
Identity and access
- Sign-in and sign-up
app/sign-in/SignInForm.tsx - Auth client
lib/auth-client.ts - Auth API
app/api/auth/[...all]/route.ts - Authentication
lib/auth.ts - Session access
lib/session.ts - Account settings
app/settings/page.tsx - Project permissions
lib/permissions.ts
Project management
- Project dashboard
app/dashboard/page.tsx - Create and manage projects
app/projects/actions.ts - Project overview
app/projects/[id]/page.tsx
Itinerary and maps
- Project planning actions
app/projects/[id]/actions.ts - Project tabs
components/ProjectTabs.tsx - Site editor
components/SiteEditor.tsx - Site registration map
components/SiteRegisterMap.tsx - Site list
components/SiteList.tsx - Schedule editor
components/ScheduleSection.tsx - Route view
components/RouteView.tsx - Route calculation
lib/directions.ts
Invitations and members
- Invitation management
components/InvitationManager.tsx - Invitation actions
app/projects/[id]/actions.ts - Accept invitation
app/invite/[token]/actions.ts
Persistence and services
- Database client
lib/prisma.ts - PostgreSQL
- Image object storage
lib/r2.ts - Environment validation
lib/env.ts
Other components
- User
Connections 38
- User → Sign-in and sign-up: signs in
- Sign-in and sign-up → Auth client: authenticates
app/sign-in/SignInForm.tsx - Auth API → Authentication: routes requests
app/api/auth/[...all]/route.ts - Auth client → Authentication: calls auth
lib/auth-client.ts - Authentication → Database client: persists auth data
lib/auth.ts - Authentication → PostgreSQL: reads and writes
- Project dashboard → Session access: checks session
app/dashboard/page.tsx - Project dashboard → Database client: loads projects
app/dashboard/page.tsx - Create and manage projects → Session access: requires auth
app/projects/actions.ts - Create and manage projects → Project permissions: checks role
app/projects/actions.ts - Create and manage projects → Database client: creates projects
app/projects/actions.ts - Project overview → Session access: checks session
app/projects/[id]/page.tsx - Project overview → Project permissions: checks access
app/projects/[id]/page.tsx - Project overview → Database client: loads project data
app/projects/[id]/page.tsx - Project overview → Project tabs: renders tabs
app/projects/[id]/page.tsx - Project overview → Invitation management: renders manager
app/projects/[id]/page.tsx - Project tabs → Site list: renders sites
components/ProjectTabs.tsx - Project tabs → Schedule editor: renders schedules
components/ProjectTabs.tsx - Project tabs → Route view: renders routes
components/ProjectTabs.tsx - Project tabs → Site registration map: renders map
components/ProjectTabs.tsx - Site editor → Project planning actions: updates sites
components/SiteEditor.tsx - Site registration map → Project planning actions: registers sites
components/SiteRegisterMap.tsx - Schedule editor → Project planning actions: manages schedules
components/ScheduleSection.tsx - Invitation management → Invitation actions: manages invitations
components/InvitationManager.tsx - Invitation actions → Session access: requires auth
app/projects/[id]/actions.ts - Invitation actions → Project permissions: checks organizer
app/projects/[id]/actions.ts - Invitation actions → Database client: stores invitations
app/projects/[id]/actions.ts - Project planning actions → Session access: requires auth
app/projects/[id]/actions.ts - Project planning actions → Project permissions: checks organizer
app/projects/[id]/actions.ts - Project planning actions → Database client: stores planning data
app/projects/[id]/actions.ts - Project planning actions → Route calculation: calculates route
app/projects/[id]/actions.ts - Create and manage projects → Image object storage: cleans project images
app/projects/actions.ts - Project planning actions → Image object storage: cleans site images
app/projects/[id]/actions.ts - Database client → Environment validation: reads configuration
lib/prisma.ts - Image object storage → Environment validation: reads configuration
lib/r2.ts - Route calculation → Environment validation: reads configuration
lib/directions.ts - Project permissions → Database client: queries membership
lib/permissions.ts - Account settings → Session access: checks session
app/settings/page.tsx