How klraaa/kodigo-ai-study-buddy works
Kodigo is a mobile-first, bilingual study app: students provide notes or files, receive AI-generated summaries and cards, then study and review them. The graph covers that creation-to-study workflow as well as the documented auth, community, admin, and offline capabilities. README claims inform several unsampled branches; those links are shown only where the README describes the interaction, while implementation details are omitted.
Main entry points: study-page.tsx Set study · client.ts Postgres · create-flow.tsx Create flow · auth.ts Auth actions
Components 28
App and access
- App pages
src/app/(app) - Create flow
src/app/(app)/create/create-flow.tsx - File parsers
src/lib/parsers - Auth forms
src/app/auth - Auth actions
src/server/actions/auth.ts
Study and review
- Set study
src/app/(app)/sets/[id]/study-page.tsx - Flashcards mode
src/components/study/flashcards.tsx - Learn mode
src/components/study/learn.tsx - Review session
src/app/(app)/review/session/review-session.tsx - Review action
src/server/actions/reviews.ts - Review queries
src/server/db/queries/reviews.ts - SRS scheduler
src/lib/srs.ts
AI and persistence
- Set actions
src/server/actions/sets.ts - AI generation
src/server/ai - AI router
src/server/ai/router.ts - Set queries
src/server/db/queries/sets.ts - Postgres
src/server/db/client.ts
Community
- Explore and profiles
src/app/(app)/explore - Community actions
src/server/actions/community.ts - Sharing actions
src/server/actions/sharing.ts - Moderation
src/server/moderation
Offline platform
- Offline cache
src/lib/offline-cache.ts - Service worker
public/sw.js - IndexedDB
Other components
- Student
- Neon Auth
- AI providers
- Turnstile
Connections 30
- Student → Create flow: provides notes
- Create flow → File parsers: parses uploads
- Create flow → Set actions: submits content
- Set actions → AI generation: requests generation
- AI generation → AI router: routes models
- AI router → AI providers: calls models
- Set actions → Set queries: stores sets
- Set queries → Postgres: reads and writes
- Student → Auth forms: signs in
- Auth forms → Auth actions: submits credentials
- Auth actions → Neon Auth: authenticates
- Auth actions → Turnstile: checks challenge
- Student → Set study: opens set
- Set study → Flashcards mode: studies cards
- Set study → Learn mode: practices
- Student → Review session: reviews due cards
- Review session → Review action: submits grade
- Learn mode → Review action: records mastery
- Review action → Review queries: records review
- Review queries → SRS scheduler: schedules interval
- Review queries → Postgres: reads and writes
- Student → Explore and profiles: browses sets
- Explore and profiles → Community actions: searches and follows
- Explore and profiles → Sharing actions: opens shared set
- Sharing actions → Moderation: screens publication
- Community actions → Postgres: persists activity
- Sharing actions → Postgres: reads and writes
- Set study → Offline cache: caches opened sets
- Offline cache → IndexedDB: reads and writes
- Service worker → Student: serves offline app