How vrunda2005/note-app works
TakeNote is a full-stack note-taking app whose main workflow is to authenticate, create and organize notes, edit or sketch content, then save changes to the server. Notes can also be encrypted in the browser, shared, exported, or processed by AI tools. The graph includes documented product capabilities whose implementation was not sampled, using their existing enclosing paths; their precise wiring is therefore not asserted. The sampled code confirms the notes and AI request paths, authentication checks, persistence calls, and Gemini fallback behavior.
Main entry points: useNotes.ts Notes state and sync · db.ts Data access · page.tsx Workspace page · NoteEditor.tsx Note editor
Components 24
Note workspace
- Workspace page
src/app/page.tsx - Note editor
src/components/NoteEditor.tsx - Rich text editing
src/components/RichTextEditor.tsx - Sketch canvas
src/components/DrawCanvas.tsx - Note manager
src/components/NotesSidebar.tsx - AI tools and analytics
src/components/AIToolsPanel.tsx
Account access
- Login and signup
src/app/login/page.tsx - Auth state
src/context/AuthContext.tsx
Application services
- Signup endpoint
src/app/api/auth/signup/route.ts - Login endpoint
src/app/api/auth/login/route.ts - Session endpoint
src/app/api/auth/me/route.ts - Notes endpoints
src/app/api/notes/route.ts - Note update and delete
src/app/api/notes/[id]/route.ts - Note sharing
src/app/api/notes/[id]/share/route.ts - Data access
src/lib/db.ts
AI assistance
- AI feature handlers
src/hooks/useAIFeatures.ts - AI request client
src/hooks/useAI.ts - AI endpoint
src/app/api/ai/route.ts - Gemini SDK loader
src/lib/getGeminiSdk.ts
Local and server state
- Notes state and sync
src/hooks/useNotes.ts - IndexedDB notes
src/utils/storage.ts - Client encryption
src/utils/encryption.ts
Other components
- Note taker
- Google Gemini
Connections 28
- Note taker → Login and signup: signs in
- Login and signup → Signup endpoint: submits signup
- Login and signup → Login endpoint: submits login
- Auth state → Session endpoint: checks session
- Signup endpoint → Data access: creates user
- Login endpoint → Data access: finds user
- Session endpoint → Data access: loads user
- Note taker → Workspace page: uses workspace
- Workspace page → Note editor: opens editing
- Workspace page → Note manager: manages notes
- Note editor → Rich text editing: edits text
- Note editor → Sketch canvas: sketches
- Workspace page → Notes state and sync: manages note state
- Notes state and sync → Notes endpoints: fetches and creates
- Notes state and sync → Note update and delete: updates and deletes
- Notes state and sync → Note sharing: shares note
- Notes endpoints → Data access: reads and creates
- Note update and delete → Data access: reads and writes
- Note sharing → Data access: reads and updates
- Notes state and sync → IndexedDB notes: migrates local notes
- Notes state and sync → Client encryption: encrypts and decrypts
- Note editor → AI feature handlers: requests AI tasks
- AI tools and analytics → AI feature handlers: starts analysis
- AI feature handlers → AI request client: calls task methods
- AI request client → AI endpoint: posts text
- AI endpoint → Gemini SDK loader: loads SDK
- AI endpoint → Google Gemini: generates content
- Gemini SDK loader → Google Gemini: SDK client calls