How kishore-in2007/memorystack works
Memory Stack is an Expo mobile app for capturing solved DSA problems and retaining their concepts through a 10-stage spaced-repetition workflow. Users sign in or enter demo mode, add/search problems, review saved solutions, practice in a code editor, submit for evaluation, and see performance and memory metrics. Zustand provides persistent local state and offline behavior; Supabase Edge Functions support cloud revision, search, and code execution. The map preserves documented recommendation, analytics, and notification capabilities, while some unsampled function-level wiring is necessarily shown only where README documentation supports it.
Main entry points: useStore.ts Persistent app state · review.tsx Review step · edgeFunctions.ts Edge function client · index.tsx Daily dashboard
Components 34
App entry and identity
- Sign in / demo
app/(auth)/login.tsx - Daily dashboard
app/(tabs)/index.tsx - Review alerts
lib/notifications.ts - App root
app/_layout.tsx
Problem capture and discovery
- Add problem
app/(tabs)/add.tsx - Problem search
services/problemSearchService.ts - Search hook
hooks/useProblemSearch.ts - Catalog sync
supabase/functions/sync-problem-catalog/index.ts - Due queue
app/(tabs)/queue.tsx
Revision and practice
- Review step
app/revision/[id]/review.tsx - Revision context
hooks/useRevisionContext.ts - Revision service
services/revisionService.ts - Saved solution card
components/revision/PreviousSolutionCard.tsx - Practice step
app/revision/[id]/practice.tsx - Code editor
app/revision/[id]/compiler.tsx - Code drafts
hooks/useCodeDraft.ts - Submission service
services/compilerService.ts - Performance result
app/revision/[id]/result.tsx - Practice recommendations
supabase/functions/generate-practice-problem/index.ts
State and scheduling
- Memory analytics
app/(tabs)/stats.tsx - Persistent app state
store/useStore.ts - Spaced repetition
lib/spacedRepetition.ts - Memory strength
lib/memoryStrength.ts - Offline revision cache
services/revisionCache.ts
Cloud services
- Edge function client
lib/edgeFunctions.ts - Revision context API
supabase/functions/get-revision-context/index.ts - Review marker API
supabase/functions/mark-revision-reviewed/index.ts - Code execution API
supabase/functions/run-code/index.ts - Solution submission API
supabase/functions/submit-solution/index.ts - Search API
supabase/functions/search-problems/index.ts
Other components
- Learner
- Supabase service
- Code judge
- AI provider
Connections 45
- Learner → Sign in / demo: signs in
app/(auth)/login.tsx - Sign in / demo → Persistent app state: sets user
app/(auth)/login.tsx - Sign in / demo → Daily dashboard: routes to
- Daily dashboard → Persistent app state: reads state
app/(tabs)/index.tsx - Daily dashboard → Due queue: opens queue
app/(tabs)/index.tsx - Daily dashboard → Review step: starts review
app/(tabs)/index.tsx - Daily dashboard → Offline revision cache: caches due items
app/(tabs)/index.tsx - Learner → Add problem: adds problem
- Add problem → Search hook: searches catalog
- Search hook → Problem search: requests matches
hooks/useProblemSearch.ts - Problem search → Search API: invokes search
- Search API → Supabase service: queries catalog
- Catalog sync → Supabase service: updates catalog
- Add problem → Persistent app state: records problem
- Persistent app state → Spaced repetition: generates schedule
store/useStore.ts - Learner → Review step: reviews work
- Review step → Revision context: loads context
app/revision/[id]/review.tsx - Revision context → Revision service: requests context
hooks/useRevisionContext.ts - Revision context → Offline revision cache: caches context
hooks/useRevisionContext.ts - Revision service → Edge function client: invokes API
services/revisionService.ts - Edge function client → Revision context API: dispatches context
- Edge function client → Review marker API: dispatches review
- Revision context API → Supabase service: loads revision data
- Review step → Saved solution card: renders solution
app/revision/[id]/review.tsx - Review step → Revision service: marks reviewed
app/revision/[id]/review.tsx - Review step → Practice step: continues to
app/revision/[id]/review.tsx - Practice step → Code editor: opens editor
- Code editor → Code drafts: saves draft
- Code editor → Submission service: runs or submits
- Submission service → Edge function client: invokes API
services/compilerService.ts - Edge function client → Code execution API: dispatches run
- Edge function client → Solution submission API: dispatches submission
- Code execution API → Code judge: executes tests
- Solution submission API → Code judge: evaluates solution
- Submission service → Persistent app state: completes revision
services/compilerService.ts - Persistent app state → Memory strength: updates strength
store/useStore.ts - Submission service → Offline revision cache: updates context
services/compilerService.ts - Code editor → Performance result: shows outcome
- Performance result → Persistent app state: reads performance
- Persistent app state → Memory analytics: supplies metrics
- Revision service → Practice recommendations: requests practice
- Practice recommendations → AI provider: uses classification
- App root → Review alerts: schedules alerts
app/_layout.tsx - App root → Persistent app state: reads due schedule
app/_layout.tsx - Review alerts → Review step: routes alert tap