How rithusona35-cpu/ncct-final-website-and-app works
NCCT Skill Ecosystem is a role-based training and employment frontend delivered as a Next.js PWA. Its user journey spans trainee learning and assessment, skill-gap and passport outcomes, and employer matching; trainer and admin workspaces support delivery and operations. The frontend also provides authenticated API access, offline caching and queued synchronization, and on-device AI features. Several portal routes and integrations are represented at directory level from the tree and README; their individual implementations were not sampled, so only documented or indexed relationships are shown.
Main entry points: api.ts Backend API client · local-db.ts IndexedDB cache · sync-orchestrator.ts Sync orchestration · useOfflineFirstQuery.ts Offline-first queries
Components 22
Role Portals
- Trainee workspace
src/app/trainee - Trainer workspace
src/app/trainer - Employer workspace
src/app/employer - Admin workspace
src/app/admin - Attendance kiosk
src/app/kiosk/page.tsx
Learning Outcomes
- Courses and assessments
src/app/trainee/courses/page.tsx - Skill-gap analysis
lib/local-runtime/local-skill-gap-engine.ts - Skill passport
src/app/trainee/skill-passport/page.tsx - Employment matching
src/app/employer/matches/page.tsx - Credential verification
src/app/verify
Offline Runtime
- Offline-first queries
lib/hooks/useOfflineFirstQuery.ts - IndexedDB cache
lib/local-runtime/local-db.ts - Sync orchestration
lib/sync-engine/sync-orchestrator.ts - Pending write queue
lib/sync-engine/sync-queue.ts - Network monitor
lib/sync-engine/network-monitor.ts - Local chatbot
lib/local-runtime/local-chatbot.ts - On-device model loader
lib/local-runtime/local-model-loader.ts
App Platform
- Authentication
src/context/AuthContext.tsx - Backend API client
src/lib/api.ts - PWA service worker
public/sw.js
Other components
- Portal user
- NCCT backend
Connections 25
- Portal user → Authentication: signs in
src/context/AuthContext.tsx - Authentication → Backend API client: verifies session
src/context/AuthContext.tsx - Portal user → Trainee workspace: uses portal
README.md - Portal user → Trainer workspace: uses portal
README.md - Portal user → Employer workspace: uses portal
README.md - Portal user → Admin workspace: uses portal
README.md - Trainee workspace → Courses and assessments: accesses courses
- Courses and assessments → Skill-gap analysis: computes gaps
- Skill-gap analysis → IndexedDB cache: reads cached skills
lib/local-runtime/local-skill-gap-engine.ts - Trainee workspace → Skill passport: views passport
- Employer workspace → Employment matching: reviews candidates
src/app/employer/matches/page.tsx - Portal user → Credential verification: verifies credential
- Courses and assessments → Backend API client: loads course data
src/app/trainee/courses/page.tsx - Employment matching → Backend API client: loads matches
src/app/employer/matches/page.tsx - Backend API client → NCCT backend: sends requests
src/lib/api.ts - Offline-first queries → IndexedDB cache: reads and caches
lib/hooks/useOfflineFirstQuery.ts - Offline-first queries → Backend API client: fetches online data
lib/hooks/useOfflineFirstQuery.ts - Offline-first queries → Sync orchestration: tracks sync status
lib/hooks/useOfflineFirstQuery.ts - Sync orchestration → Network monitor: checks connectivity
lib/sync-engine/sync-orchestrator.ts - Sync orchestration → IndexedDB cache: updates cache
lib/sync-engine/sync-orchestrator.ts - Sync orchestration → Pending write queue: pushes pending writes
lib/sync-engine/sync-orchestrator.ts - Pending write queue → IndexedDB cache: stores queued writes
lib/sync-engine/sync-queue.ts - Local chatbot → On-device model loader: loads model
lib/local-runtime/local-chatbot.ts - Local chatbot → IndexedDB cache: uses local data
lib/local-runtime/local-chatbot.ts - PWA service worker → Portal user: supports offline app
README.md