How earljohncabog03/brainstack-pwa-app works
Brainstack is a browser-based quiz and study-dashboard app. Learners enter through the home page, create a quiz, take it, and review dashboard data; the sampled quiz pages persist quizzes and attempts in IndexedDB. The app also exposes an install page and shared home-page feature/CTA sections. A retry-capable LLM client exists, but the excerpts do not show it being called by quiz creation, so that integration is not inferred. Some page details are based only on imports and routing references in the SOURCE INDEX.
Main entry points: App.tsx App routing · CreateQuiz.tsx Quiz creation · Header.tsx Site header · home Home sections
Components 18
App entry and navigation
- App routing
src/App.tsx - Home page
src/pages/Index.tsx - Home sections
src/components/home - Site header
src/components/layout/Header.tsx - Not found page
src/pages/NotFound.tsx
Quiz learning workflow
- Quiz creation
src/pages/CreateQuiz.tsx - Quiz taking
src/pages/TakeQuiz.tsx - Study dashboard
src/pages/Dashboard.tsx - App installation
src/pages/Install.tsx
Local study data
- IndexedDB data layer
src/lib/db.ts - LLM retry client
src/lib/llmClient.ts - Retry helper
src/lib/retry.ts - Logger
src/lib/logger.ts
Shared UI and utilities
- Button component
src/components/ui/button.tsx - Input component
src/components/ui/input.tsx - Progress component
src/components/ui/progress.tsx - Class utilities
src/lib/utils.ts
Other components
- Learner
Connections 27
- Learner → App routing: opens
src/App.tsx - App routing → Home page: routes to
src/App.tsx - App routing → Study dashboard: routes to
src/App.tsx - App routing → Quiz creation: routes to
src/App.tsx - App routing → Quiz taking: routes to
src/App.tsx - App routing → App installation: routes to
src/App.tsx - App routing → Not found page: catches routes
src/App.tsx - Home page → Home sections: renders
src/pages/Index.tsx - Home page → Site header: renders
src/pages/Index.tsx - Home sections → Quiz creation: links to
src/components/home/Hero.tsx - Home sections → Study dashboard: links to
src/components/home/Hero.tsx - Quiz creation → IndexedDB data layer: saves quiz and count
src/pages/CreateQuiz.tsx - Quiz taking → IndexedDB data layer: loads quiz and saves attempt
src/pages/TakeQuiz.tsx - Study dashboard → IndexedDB data layer: reads study data
src/pages/Dashboard.tsx - Quiz creation → Site header: renders
src/pages/CreateQuiz.tsx - Quiz taking → Site header: renders
src/pages/TakeQuiz.tsx - Study dashboard → Site header: renders
src/pages/Dashboard.tsx - App installation → Site header: renders
src/pages/Install.tsx - Home sections → Button component: uses
src/components/home/Hero.tsx - Quiz creation → Button component: uses
src/pages/CreateQuiz.tsx - Quiz creation → Input component: uses
src/pages/CreateQuiz.tsx - Quiz taking → Progress component: uses
src/pages/TakeQuiz.tsx - Site header → Button component: uses
src/components/layout/Header.tsx - Button component → Class utilities: merges classes with
src/components/ui/button.tsx - Input component → Class utilities: uses
src/components/ui/input.tsx - LLM retry client → Retry helper: retries calls with
src/lib/llmClient.ts - LLM retry client → Logger: logs retries with
src/lib/llmClient.ts