How med-abdellahi-07/neuron-showcase works
Neuron is an offline-first study PWA for university students. Students authenticate, choose course material, study and practise online or offline, and can ask a course-grounded assistant; their timetable, progress and later-synced results support that loop. Separate capabilities include class spaces, chat, announcements, recordings, notifications and staff administration. The README documents the overall integrations and offline flow; sampled route and library code confirms selected AI, snapshot, authentication and scheduling relationships. Many unsampled features are represented at their existing app-action or feature-directory paths, so their internal call wiring is not inferred.
Main entry points: chat/route.ts Assistant chat route · offline-snapshot/route.ts Offline snapshot route · sw.js Offline PWA · auth.ts Authentication and roles
Components 24
Study and practice
- Courses and lessons
src/app/(app)/subjects/[code]/[kind]/page.tsx - Practice and review
src/app/(app)/practice/page.tsx - Classmate duels
src/app/(app)/practice/duel/page.tsx - Progress and streaks
src/app/(app)/progress/page.tsx
AI assistant
- Assistant screens
src/app/(app)/assistant/page.tsx - Assistant chat route
src/app/api/chat/route.ts - Course retrieval
src/lib/ai/rag.ts - Guided explanations
src/lib/ai/guided.ts - AI providers
- Web search
Campus operations
- Timetable
src/app/(app)/schedule/page.tsx - Space chat
src/components/space-chat.tsx - Staff administration
src/app/(app)/admin/page.tsx - Push notifications
src/app/api/cron/notify/route.ts
Offline experience
- Offline PWA
public/sw.js - Offline data store
src/lib/offline/db.ts - Result synchronization
src/lib/offline/sync.ts - Offline snapshot route
src/app/api/offline-snapshot/route.ts
Platform foundation
- Authentication and roles
src/lib/auth.ts - Course and schedule data
src/lib/data.ts - Space access
src/lib/spaces.ts - Arabic French English
src/lib/i18n/dictionaries.ts
Other components
- Student
- Supabase auth database storage
Connections 33
- Student → Courses and lessons: studies
- Student → Practice and review: practises
- Student → Assistant screens: asks
- Student → Timetable: checks
- Student → Space chat: chats
- Assistant screens → Assistant chat route: sends chat
- Assistant chat route → Authentication and roles: checks identity
src/app/api/chat/route.ts - Assistant chat route → Space access: checks feature
src/app/api/chat/route.ts - Assistant chat route → Course retrieval: retrieves course
src/app/api/chat/route.ts - Assistant chat route → Guided explanations: loads material
src/app/api/chat/route.ts - Assistant chat route → Web search: searches optionally
src/app/api/chat/route.ts - Assistant chat route → AI providers: generates answer
- Course retrieval → Supabase auth database storage: reads course index
- Student → Offline PWA: uses offline
- Offline PWA → Offline data store: reads and writes
- Offline PWA → Offline snapshot route: loads snapshot
- Offline snapshot route → Authentication and roles: gets profile
src/app/api/offline-snapshot/route.ts - Offline snapshot route → Course and schedule data: loads subjects
src/app/api/offline-snapshot/route.ts - Offline snapshot route → Supabase auth database storage: reads sessions
src/app/api/offline-snapshot/route.ts - Result synchronization → Supabase auth database storage: syncs results
- Timetable → Course and schedule data: loads schedule data
- Courses and lessons → Supabase auth database storage: loads course material
- Practice and review → Supabase auth database storage: records attempts
- Classmate duels → Supabase auth database storage: stores duels
- Progress and streaks → Supabase auth database storage: reads progress
- Space chat → Supabase auth database storage: uses chat route
- Staff administration → Supabase auth database storage: manages platform data
- Push notifications → Supabase auth database storage: reads and logs
src/app/api/cron/notify/route.ts - Push notifications → Student: sends reminders
src/app/api/cron/notify/route.ts - Authentication and roles → Supabase auth database storage: verifies session
src/lib/auth.ts - Course and schedule data → Supabase auth database storage: reads schedule data
src/lib/data.ts - Space access → Supabase auth database storage: reads space
src/lib/spaces.ts - Student → Arabic French English: selects language