How mfreshad/japanese_mastery works
Japanese Mastery is a book-based Japanese vocabulary and kanji study system. Learners browse library material, study vocabulary or kanji, practice questions, and track progress; managers maintain books, chapters, items, imports, and review marks. The backend exposes these capabilities through FastAPI and stores study content and practice state in PostgreSQL. The graph preserves documented product branches, but sampled source supports only some request-to-service relationships; unsampled routes are represented without guessed internal call chains.
Main entry points: main.py API application · review.py Review API · item.py Content models · ReviewMarksScreen.tsx Review marks
Components 24
Learner and management UI
- Library
frontend/features/library/Screen.tsx - Study screens
frontend/features/study/Screen.tsx - Practice screen
frontend/features/practice/Screen.tsx - Progress view
frontend/app/progress/page.tsx - Content management
frontend/features/management/Screen.tsx - Review marks
frontend/features/management/ReviewMarksScreen.tsx - API client
frontend/lib/api.ts
Backend API
- API application
backend/app/main.py - Books API
backend/app/api/books.py - Items API
backend/app/api/items.py - Imports API
backend/app/api/imports.py - Library API
backend/app/api/library.py - Practice API
backend/app/api/practice.py - Review API
backend/app/api/review.py - Study and progress APIs
backend/app/api/study.py
Study and content services
- Item management
backend/app/services/item_management.py - Practice engine
backend/app/services/practice/service.py - JSON import
backend/app/services/imports/service.py - Books and library operations
backend/app/services/books_operations.py
Persistent study data
- Content models
backend/app/models/item.py - Progress and sessions
backend/app/models/practice.py - Database session
backend/app/db/session.py
Other components
- Learner / manager
- Neon PostgreSQL
Connections 25
- Learner / manager → Library: browses
README.md - Learner / manager → Study screens: studies
README.md - Learner / manager → Practice screen: practices
README.md - Learner / manager → Progress view: tracks progress
README.md - Learner / manager → Content management: manages content
README.md - Learner / manager → Review marks: reviews marks
- Review marks → API client: requests data
frontend/features/management/ReviewMarksScreen.tsx - API client → Review API: sends HTTP requests
- API application → Books API: registers route
backend/app/main.py - API application → Items API: registers route
backend/app/main.py - API application → Imports API: registers route
backend/app/main.py - API application → Library API: registers route
backend/app/main.py - API application → Practice API: registers route
backend/app/main.py - API application → Review API: registers route
backend/app/main.py - API application → Study and progress APIs: registers routes
backend/app/main.py - Items API → Item management: delegates to
backend/app/api/items.py - Practice API → Practice engine: dispatches to
backend/app/api/practice.py - Imports API → JSON import: delegates to
backend/app/api/imports.py - Books API → Books and library operations: delegates to
backend/app/api/books.py - Item management → Content models: updates
backend/app/services/item_management.py - Practice engine → Progress and sessions: persists sessions
backend/app/services/practice/service.py - Review API → Progress and sessions: reads progress
backend/app/api/review.py - Review API → Content models: reads review items
backend/app/api/review.py - JSON import → Content models: imports content
backend/app/services/imports/service.py - Database session → Neon PostgreSQL: connects to
backend/app/db/session.py