How felipedenuzzo/vigilway works
VigilWay is a browser-based cognitive-training journey: a user signs in or continues as a guest, chooses a guided training step, completes an exercise, and the app resolves progress, lives, and journey state. Evidence sampled shows the app-level orchestration, journey/life rules, one training implementation, and offline-first journey persistence; the tree lists additional training modules and UI capabilities whose internal wiring was not sampled, so those links are limited to documented registry and app entry points where supported.
Main entry points: App.tsx Application controller · adminNotesService.ts Admin notes service · localStorageAdapter.ts Local journey storage · firebaseClient.ts Firebase client
Components 25
Journey and play
- Application controller
src/App.tsx - Journey home
src/features/home/JourneyHomeScreen.tsx - Game runner
src/runner/GameRunner.tsx - Transition screen
src/runner/TransitionScreen.tsx - Journey progression
src/journey/journeyManager.ts - Lives and challenge
src/journey/lifeManager.ts - Item celebration
src/journey/ItemCelebrationModal.tsx
Training activities
- Training registry
src/trainings/trainingRegistry.ts - Training instructions
src/trainings/trainingInstructions.ts - Visual search exercise
src/trainings/visual-search/VisualSearchModule.tsx - Other exercises
src/trainings - Risk-all challenge
src/features/challenge/RiskAllChallengeModal.tsx
Identity and persistence
- Sign-in modal
src/components/auth/AuthModal.tsx - Authentication context
src/core/auth/AuthContext.tsx - Firebase client
src/core/firebase/firebaseClient.ts - Local journey storage
src/core/storage/localStorageAdapter.ts - Firestore journey sync
src/core/firebase/firestoreSync.ts
Insights and admin
- Cognitive insight
src/services/aiInsightService.ts - Admin notes service
src/services/adminNotesService.ts - Inspector and feedback
src/runner/InspectorPanel.tsx
Other components
- Learner
- Firebase Authentication
- Cloud Firestore
- Browser local storage
- Configured insight endpoint
Connections 33
- Learner → Sign-in modal: signs in
- Sign-in modal → Authentication context: requests auth
- Authentication context → Firebase client: gets client
- Firebase client → Firebase Authentication: authenticates
- Learner → Journey home: chooses activity
- Application controller → Authentication context: reads session
- Application controller → Local journey storage: loads journey
- Local journey storage → Firestore journey sync: fetches and syncs
- Local journey storage → Browser local storage: reads and writes
- Firestore journey sync → Firebase client: gets client
- Firestore journey sync → Cloud Firestore: syncs journey
- Application controller → Journey home: renders
- Journey home → Application controller: starts session
- Application controller → Journey progression: selects next attention
- Application controller → Training registry: selects training
- Application controller → Transition screen: shows transition
- Application controller → Game runner: renders session
- Training registry → Visual search exercise: resolves module
- Visual search exercise → Game runner: returns result
- Visual search exercise → Training instructions: uses guidance
- Application controller → Journey progression: resolves outcome
- Journey progression → Lives and challenge: updates lives
- Application controller → Local journey storage: saves progress
- Application controller → Item celebration: shows milestone
- Application controller → Risk-all challenge: offers challenge
- Risk-all challenge → Application controller: reports outcome
- Application controller → Other exercises: offers activities
- Application controller → Cognitive insight: requests item insight
- Cognitive insight → Configured insight endpoint: enriches insight
- Inspector and feedback → Admin notes service: manages notes
- Admin notes service → Browser local storage: caches notes
- Admin notes service → Firebase client: gets client
- Admin notes service → Cloud Firestore: stores notes