How jagadeesh916/hack2 works
NoteHub is a study-note application: users authenticate, create note sets from pasted text or PDFs, generate flashcards and a story, then browse, study, and fork note sets. The graph follows the routes and database operations visible in sampled source. Explore and landing pages are included as documented-by-route product surfaces, but their detailed behavior was not sampled; the README is only a Vite template and documents no additional product capabilities.
Main entry points: App.jsx Router and app shell · CreateNotePage.jsx Create note set · AuthContext.jsx Session and auth actions · supabase.js Supabase client
Components 17
Application flow
- Router and app shell
src/App.jsx - Landing page
src/pages/LandingPage.jsx - Explore note sets
src/pages/ExplorePage.jsx - Navigation and sign out
src/components/Navbar.jsx
Identity
- Sign in and sign up
src/pages/AuthPage.jsx - Session and auth actions
src/contexts/AuthContext.jsx
Note sets and study
- My note sets
src/pages/DashboardPage.jsx - Create note set
src/pages/CreateNotePage.jsx - PDF text extraction
src/lib/pdfExtract.js - Generate-notes function
supabase/functions/generate-notes/index.ts - Study and fork notes
src/pages/ViewNotePage.jsx
Shared UI and utilities
- Supabase client
src/lib/supabase.js - Reusable UI components
src/components/ui - Class-name utilities
src/lib/utils.js
Other components
- Student
- Supabase note store
- Supabase Auth
Connections 28
- Student → Router and app shell: opens routes
src/App.jsx - Router and app shell → Landing page: routes to
src/App.jsx - Router and app shell → Explore note sets: routes to
src/App.jsx - Router and app shell → Sign in and sign up: routes to
src/App.jsx - Router and app shell → My note sets: protects route
src/App.jsx - Router and app shell → Create note set: protects route
src/App.jsx - Router and app shell → Study and fork notes: routes to
src/App.jsx - Router and app shell → Session and auth actions: provides session
src/App.jsx - Sign in and sign up → Session and auth actions: calls auth actions
src/pages/AuthPage.jsx - Session and auth actions → Supabase client: uses client
src/contexts/AuthContext.jsx - Supabase client → Supabase Auth: configures auth
src/lib/supabase.js - Navigation and sign out → Session and auth actions: calls sign out
src/components/Navbar.jsx - My note sets → Supabase client: queries note sets
src/pages/DashboardPage.jsx - My note sets → Supabase note store: reads and deletes
src/pages/DashboardPage.jsx - Create note set → PDF text extraction: extracts PDF text
src/pages/CreateNotePage.jsx - Create note set → Session and auth actions: gets current user
src/pages/CreateNotePage.jsx - Create note set → Supabase client: inserts and updates
src/pages/CreateNotePage.jsx - Create note set → Supabase note store: creates note set
src/pages/CreateNotePage.jsx - Create note set → Generate-notes function: posts generation request
src/pages/CreateNotePage.jsx - Study and fork notes → Supabase client: fetches and forks
src/pages/ViewNotePage.jsx - Study and fork notes → Supabase note store: reads and inserts
src/pages/ViewNotePage.jsx - Create note set → Session and auth actions: reads session token
src/pages/CreateNotePage.jsx - Session and auth actions → Supabase client: refreshes session
src/contexts/AuthContext.jsx - Sign in and sign up → Reusable UI components: renders controls
src/pages/AuthPage.jsx - Create note set → Reusable UI components: renders form controls
src/pages/CreateNotePage.jsx - Reusable UI components → Class-name utilities: merges classes
src/components/ui/Card.jsx - Explore note sets → Supabase client: may query listings
src/pages/ExplorePage.jsx - Study and fork notes → Reusable UI components: renders cards and buttons
src/pages/ViewNotePage.jsx