How sina9rk/planner works
This is a Persian-language goal and task planner with account registration, persona-based onboarding, goal tracking, and profile personalization. The main workflow is account creation or login, onboarding to assign a persona, then managing goals and tasks while recording progress; dashboard and profile pages present user context and statistics. Advisor, theme, and goal-log features are represented from the repository tree, but their connections are not asserted where sampled evidence does not establish them. Evidence is limited to the README and the supplied source excerpts and index.
Main entry points: prisma.ts Application Database · auth.ts Auth Actions · onboarding/page.tsx Onboarding · profile/page.tsx Profile
Components 29
Identity & Access
- Login
src/app/login/login-form.tsx - Registration
src/app/register/register-form.tsx - Auth Actions
src/lib/actions/auth.ts - Auth Service
src/lib/auth.ts - Auth Route
src/app/api/auth/[...nextauth]/route.ts
Onboarding & Profile
- Onboarding
src/app/onboarding/page.tsx - Persona Profiles
src/lib/personas.ts - Onboarding Actions
src/lib/actions/onboarding.ts - Profile
src/app/profile/page.tsx - Theme Settings
src/app/profile/theme-section.tsx
Goals & Tasks
- Dashboard
src/app/dashboard/page.tsx - Goals List
src/app/goals/page.tsx - Goal Creation
src/app/goals/new/goal-form.tsx - Goal Actions
src/lib/actions/goal-create.ts - Goal Workspace
src/app/goals/[id]/page.tsx - Goal Tasks
src/app/goals/[id]/goal-tasks.tsx - Goal Task Actions
src/lib/actions/goal-tasks.ts - Goal Advisor
src/app/goals/[id]/advisor/page.tsx - Advisor Chat
src/app/goals/[id]/advisor-chat.tsx - Task Planner
src/app/tasks/tasks-page-client.tsx - Task Actions
src/lib/actions/task-actions.ts - Goal Queries
src/lib/goals.ts
Shared Services
- Access Guards
src/lib/guards.ts - Route Flow
src/lib/flow.ts - User Statistics
src/lib/stats.ts - Event Tracking
src/lib/track.ts - Application Database
src/lib/prisma.ts - Shared UI
src/components/ui.tsx
Other components
- User
Connections 37
- User → Login: signs in
- User → Registration: creates account
- Login → Auth Actions: submits credentials
src/app/login/login-form.tsx - Registration → Auth Actions: submits registration
src/app/register/register-form.tsx - Auth Actions → Auth Service: signs in
src/lib/actions/auth.ts - Auth Actions → Application Database: reads and creates users
src/lib/actions/auth.ts - Auth Actions → Route Flow: chooses redirect
src/lib/actions/auth.ts - Auth Actions → Event Tracking: records events
src/lib/actions/auth.ts - Auth Route → Auth Service: uses handlers
src/app/api/auth/[...nextauth]/route.ts - Auth Service → Application Database: looks up users
src/lib/auth.ts - Onboarding → Access Guards: checks access
src/app/onboarding/page.tsx - Onboarding → Route Flow: uses route paths
src/app/onboarding/page.tsx - Onboarding → Persona Profiles: loads persona content
src/app/onboarding/page.tsx - Onboarding → Onboarding Actions: submits answers
src/app/onboarding/page.tsx - Onboarding → User Statistics: loads statistics
src/app/onboarding/page.tsx - Onboarding Actions → Application Database: persists onboarding
src/lib/actions/onboarding.ts - Onboarding Actions → Persona Profiles: scores answers
src/lib/actions/onboarding.ts - Onboarding Actions → Event Tracking: records events
src/lib/actions/onboarding.ts - Profile → Access Guards: requires persona
src/app/profile/page.tsx - Profile → Application Database: reads profile data
src/app/profile/page.tsx - Profile → Persona Profiles: loads persona
src/app/profile/page.tsx - Profile → Goal Queries: uses date helpers
src/app/profile/page.tsx - Theme Settings → Shared UI: uses shared UI
src/app/profile/theme-section.tsx - Dashboard → Auth Service: checks session
src/app/dashboard/page.tsx - Dashboard → Application Database: loads dashboard data
src/app/dashboard/page.tsx - Dashboard → Persona Profiles: loads persona
src/app/dashboard/page.tsx - Goals List → Access Guards: checks access
src/app/goals/page.tsx - Goals List → Route Flow: uses route paths
src/app/goals/page.tsx - Goals List → Goal Queries: loads goals
src/app/goals/page.tsx - Goal Creation → Goal Actions: submits goal
src/app/goals/new/goal-form.tsx - Goal Workspace → Goal Tasks: renders task controls
- Goal Tasks → Goal Task Actions: dispatches task actions
src/app/goals/[id]/goal-tasks.tsx - Goal Task Actions → Application Database: updates tasks and logs
src/lib/actions/goal-tasks.ts - Goal Task Actions → Event Tracking: records completion
src/lib/actions/goal-tasks.ts - Task Planner → Task Actions: completes tasks
src/app/tasks/tasks-page-client.tsx - Goal Actions → Application Database: creates goal
- Goal Advisor → Advisor Chat: hosts chat