How dalph955-png/sahel-orientation works
Sahel Orientation guides Senegalese Bac students from a bilingual profile through deterministic formation matching, balanced recommendations, comparison, and checking official sources. The browser keeps profile and preference data locally; optional AI reads free text or narrates existing engine results, with deterministic fallbacks. The graph preserves the README’s additional weight settings, bilingual data, and formation-detail capabilities. Some page and API wiring is documented rather than visible in the sampled excerpts, so those connections are limited to explicitly described behavior.
Main entry points: route.ts Chat API · store.tsx Profile state · page.tsx Build profile · matching.ts Match and rank
Components 20
Student journey
- Start
src/app/page.tsx - Build profile
src/app/profil/page.tsx - Profile results
src/app/resultats/page.tsx - Recommendations
src/app/parcours/page.tsx - Compare paths
src/app/comparer/page.tsx - Verify details
src/app/verifier/[id]/page.tsx - Verification guide
src/app/verifier/page.tsx - Weights and language
src/app/reglages/page.tsx - Formation detail
src/components/formation-detail.tsx
Orientation engine
- Match and rank
src/lib/matching.ts - Formation dataset
src/lib/formations.ts - Profile explanations
src/lib/explain.ts - Lexical reading
src/lib/freeText.ts
Optional AI
- Chat API
src/app/api/chat/route.ts - AI providers
src/lib/ai.ts
Local state
- Profile state
src/lib/store.tsx - Browser storage
Other components
- Student
- Configured model services
- Official sources
Connections 28
- Student → Start: opens app
- Start → Build profile: starts profile
- Build profile → Profile state: updates profile
- Profile state → Browser storage: persists locally
- Browser storage → Profile state: restores state
- Build profile → Lexical reading: reads locally
- Build profile → Chat API: requests inference
- Build profile → Profile results: continues
- Profile results → Profile state: reads profile
- Profile results → Profile explanations: builds narrative
- Profile results → Chat API: requests narration
- Recommendations → Profile state: reads profile
- Recommendations → Match and rank: gets recommendations
- Match and rank → Formation dataset: scores records
- Compare paths → Profile state: reads profile
- Compare paths → Match and rank: scores paths
- Compare paths → Chat API: requests comparison
- Weights and language → Profile state: updates preferences
- Weights and language → Match and rank: previews bands
- Verify details → Formation dataset: reads formation
- Verify details → Official sources: links for verification
- Verification guide → Official sources: directs student
- Recommendations → Formation detail: opens details
- Chat API → Lexical reading: interprets text
- Chat API → Profile explanations: builds fallback
- Chat API → Match and rank: scores comparison
- Chat API → AI providers: requests narration
- AI providers → Configured model services: calls provider