How pheuangvichith/nextpath01 works
PATHAI is a Lao-first self-reflection and career-exploration application, not an automated career-decision system. Its main journey takes a young person from session setup through a versioned questionnaire, answer persistence and completion, then report generation and reflection. The backend supports distinct v4 profile-correlation scoring and a legacy Signal Engine, plus feedback and report export. The graph uses sampled frontend and service excerpts and README capabilities; unsampled router wiring is shown only where documented or marked unverified.
Main entry points: routers API routers · page.tsx Questionnaire · session_service.py Session lifecycle · report_service.py Report orchestration
Components 25
Reflection journey
- Start experience
app/page.tsx - Introduction
app/introduction/page.tsx - Questionnaire
app/assessment/page.tsx - Processing status
app/processing/page.tsx - Reflection report
app/report/page.tsx - Feedback
app/feedback/page.tsx
Web client
- Session client
api/session.ts - Report client
api/report.ts - Feedback client
api/feedback.ts - Local drafts
utils/draft.ts - Session state
hooks/useSession.ts
API and sessions
- FastAPI application
backend/app/main.py - API routers
backend/app/routers - Session lifecycle
backend/app/services/session_service.py - Answer handling
backend/app/services/answer_service.py - Feedback handling
backend/app/services/feedback_service.py
Scoring and reports
- Report orchestration
backend/app/services/report_service.py - V4 report adapter
backend/app/services/v4_report_service.py - V4 profile scoring
backend/v4.0/scoring.py - Legacy Signal Engine
backend/app/ds/signal_engine.py - Reflection DS engine
backend/app/ds/engine.py
Persistence
- SQL database
backend/app/database.py - Answer records
backend/app/models/answer.py - Session records
backend/app/models/session.py
Other components
- Youth
Connections 28
- Youth → Start experience: starts
README.md - Start experience → Introduction: guides to
- Youth → Questionnaire: answers
app/assessment/page.tsx - Questionnaire → Local drafts: saves locally
app/assessment/page.tsx - Questionnaire → Session client: sends answers
app/assessment/page.tsx - Questionnaire → Processing status: navigates to
app/assessment/page.tsx - Processing status → Session client: checks status
app/processing/page.tsx - Session client → API routers: calls session API
api/session.ts - Reflection report → Report client: requests report
app/report/page.tsx - Report client → API routers: calls report API
- Feedback → Feedback client: submits feedback
app/feedback/page.tsx - Feedback client → API routers: calls feedback API
- FastAPI application → API routers: registers routes
backend/app/main.py - API routers → Session lifecycle: dispatches session work
- API routers → Answer handling: dispatches answer work
- API routers → Feedback handling: dispatches feedback work
- API routers → Report orchestration: dispatches report work
- Session lifecycle → Session records: reads and updates
backend/app/services/session_service.py - Session lifecycle → Answer records: loads answers
backend/app/services/session_service.py - Session lifecycle → SQL database: uses database session
backend/app/database.py - Report orchestration → V4 report adapter: uses v4 adapter
backend/app/services/report_service.py - Report orchestration → Reflection DS engine: uses legacy evaluation
backend/app/services/report_service.py - V4 report adapter → V4 profile scoring: adapts scoring
- Reflection DS engine → Legacy Signal Engine: evaluates signals
- Report orchestration → Answer records: reads answers
backend/app/services/report_service.py - Session state → Questionnaire: provides session state
app/assessment/page.tsx - Reflection report → Youth: presents reflection
README.md - Feedback → Youth: collects feedback