How mathanrajchinnadurai07-debug/goalpath works
GoalPath is a multi-tenant productivity SaaS that connects long-term goals to daily planning, habit tracking, gratitude, and team accountability. A typical user signs in, creates goals and milestones, schedules and completes tasks, then reviews progress and reflects. The README documents additional sharing, AI coaching, privacy, export, and administration capabilities. The graph combines these documented workflows with source-index and excerpt evidence; several UI-to-API and unsampled subsystem links are documented rather than verified from implementation excerpts.
Main entry points: prisma.ts PostgreSQL access · auth.ts Authentication · page.tsx Planner page · route.ts Goals engine
Components 29
User experience
- App shell
src/app/layout.tsx - App context
src/context/AppContext.tsx - Navigation
src/components/Navigation.tsx - Goals pages
src/app/goals/page.tsx - Planner page
src/app/planner/page.tsx - Sign-in pages
src/app/login/page.tsx
Goals and execution
- Goals engine
src/app/api/v1/goals/route.ts - Milestones
src/app/api/v1/milestones/route.ts - Tasks
src/app/api/v1/tasks/route.ts - Time blocks
src/app/api/v1/timeblocks/route.ts - Calendar export
src/app/api/v1/calendar/export.ics/route.ts - Focus sessions
src/app/api/v1/focus/route.ts
Habits and gratitude
- Habit tracking
src/app/api/v1/habits/route.ts - Gratitude network
src/app/api/v1/gratitude/route.ts - Support directory
src/app/api/v1/gratitude/support-people/route.ts
Community and insight
- Reviews
src/app/api/v1/reviews/route.ts - Analytics
src/app/api/v1/analytics/route.ts - AI coach
src/app/api/v1/ai-coach/route.ts - Groups and community
src/app/api/v1/groups/route.ts - Admin console
src/app/api/v1/admin/overview/route.ts
Platform services
- Authentication
src/lib/auth.ts - Login and signup
src/app/api/v1/auth/login/route.ts - Two-factor auth
src/lib/totp.ts - Rate limiting
src/lib/rate-limit.ts - Cache service
src/lib/cache.ts - Redis client
src/lib/redis.ts - PostgreSQL access
src/lib/prisma.ts - Translations
src/lib/i18n.ts
Other components
- User
Connections 42
- User → App shell: uses
README.md - App shell → App context: provides context
- App context → Sign-in pages: loads session
src/context/AppContext.tsx - App context → Translations: loads translations
src/context/AppContext.tsx - App context → Navigation: supplies user state
src/components/Navigation.tsx - User → Sign-in pages: signs in
README.md - Sign-in pages → Login and signup: authenticates
- Login and signup → Authentication: checks credentials
src/app/api/v1/auth/login/route.ts - Login and signup → Two-factor auth: verifies codes
src/app/api/v1/auth/login/route.ts - Login and signup → Rate limiting: limits attempts
src/app/api/v1/auth/login/route.ts - Authentication → PostgreSQL access: reads sessions
src/lib/auth.ts - Authentication → Redis client: caches sessions
src/lib/auth.ts - User → Goals pages: sets goals
README.md - Goals pages → Goals engine: manages goals
- Goals engine → Authentication: checks user
src/app/api/v1/goals/route.ts - Goals engine → PostgreSQL access: reads and writes
src/app/api/v1/goals/route.ts - Goals engine → Cache service: caches results
src/app/api/v1/goals/route.ts - Goals engine → Milestones: supports breakdown
README.md - User → Planner page: plans day
README.md - Planner page → Tasks: manages tasks
- Planner page → Time blocks: schedules blocks
- Tasks → Authentication: checks user
src/app/api/v1/tasks/route.ts - Tasks → PostgreSQL access: reads and writes
src/app/api/v1/tasks/route.ts - Tasks → Cache service: caches results
src/app/api/v1/tasks/route.ts - Time blocks → Authentication: checks user
src/app/api/v1/timeblocks/route.ts - Time blocks → PostgreSQL access: reads and writes
src/app/api/v1/timeblocks/route.ts - Time blocks → Cache service: caches results
src/app/api/v1/timeblocks/route.ts - Planner page → Calendar export: exports calendar
README.md - Planner page → Focus sessions: tracks focus
README.md - User → Habit tracking: tracks habits
README.md - Habit tracking → PostgreSQL access: reads and writes
src/app/api/v1/habits/route.ts - User → Gratitude network: records gratitude
README.md - Gratitude network → Support directory: manages supporters
README.md - User → Groups and community: joins groups
README.md - User → Reviews: writes retrospectives
README.md - User → Analytics: reviews progress
README.md - Analytics → PostgreSQL access: queries activity
src/app/api/v1/analytics/route.ts - Analytics → Cache service: caches results
src/app/api/v1/analytics/route.ts - User → AI coach: opts into coaching
README.md - AI coach → PostgreSQL access: reads activity
src/app/api/v1/ai-coach/route.ts - User → Admin console: administers platform
README.md - Cache service → Redis client: stores cache
src/lib/cache.ts