Study Feature Guide
Guide to the Study module — pipeline-based study item management with three learning modes (Input, Processing, Review), session tracking, and Obsidian integration.
Overview
The Study module organises learning work into a three-stage pipeline (Pending → In Progress → Processed) and three study modes aligned to how information is absorbed: Input (consuming new material), Processing (making sense of it), and Review (reinforcing memory). Items are grouped by topic and discipline. Sessions are timed and linked to both a topic and a specific item. Completing a Processing session auto-promotes the linked item to PROCESSED. Icons are stored on AWS S3 and referenced by URL.
Architecture
Data Models
Key Enums
Stage (StudyItem pipeline position):
| Value | Meaning |
|---|---|
PENDING | Not yet started |
IN_PROGRESS | Actively being worked on |
PROCESSED | Completed; auto-set when a Processing session is completed |
Mode (study approach):
| Value | Use when |
|---|---|
INPUT | First pass — reading, watching, consuming new material |
PROCESSING | Making notes, summarising, creating connections |
REVIEW | Spaced repetition, recall practice |
SourceType: URL, BOOK, VIDEO, ARTICLE, DOCUMENT, OTHER
State Machine
PROCESSED is not final — items can re-enter IN_PROGRESS for review sessions.
API Endpoints
Topics
| Method | Path | Description |
|---|---|---|
GET | /study/topics | List all topics |
POST | /study/topics | Create topic |
GET | /study/topics/{id} | Get topic |
PATCH | /study/topics/{id} | Update topic |
DELETE | /study/topics/{id} | Delete topic |
Items
| Method | Path | Description |
|---|---|---|
GET | /study/items | List items (filterable by topic, stage) |
POST | /study/items | Create item |
GET | /study/items/{id} | Get item |
PATCH | /study/items/{id} | Update item |
DELETE | /study/items/{id} | Delete item |
POST | /study/items/reorder | Reorder items (kanban drag) |
GET | /study/backlog | Pending items only |
Sessions
| Method | Path | Description |
|---|---|---|
GET | /study/sessions | List sessions |
POST | /study/sessions | Create session |
GET | /study/sessions/{id} | Get session |
PATCH | /study/sessions/{id} | Update session |
DELETE | /study/sessions/{id} | Delete session |
POST | /study/sessions/{id}/complete | Complete session (promotes item if mode=PROCESSING) |
GET | /study/sessions/{id}/timer | Get linked timer state |
Other
| Method | Path | Description |
|---|---|---|
POST | /study/icons/upload | Upload topic icon to S3 (multipart) |
GET/POST | /study/disciplines | List / create disciplines |
GET | /study/stats | Aggregated stats (time by topic/mode, items by stage) |
Client Behavior
Completing a Processing session is the only automatic stage transition — all other stage changes require explicit item updates.
Key Files
| File | Purpose |
|---|---|
shared/.../models/StudyTopic.kt | Topic model with color + icon |
shared/.../models/StudyItem.kt | Item model with Stage, Mode, SourceType |
shared/.../models/StudySession.kt | Session model with timer linkage |
study/study_domain/.../repository/StudyRepository.kt | Repository interface |
study/study_presentation/.../viewmodel/StudyViewModel.kt | Full state management |
server/.../routing/StudyRouting.kt | All study endpoints (~615 lines) |
STUDY_SYSTEM.md | Root-level detailed system specification (migrate to docs/study/) |
Testing
- Unit: Stage transition logic — verify
PROCESSEDis only set when mode isPROCESSING. - Unit: Stats aggregation —
totalTimeByTopicandtotalTimeByModecomputations. - Integration: Create topic → create item → start session → complete session → verify item stage is
PROCESSED. - Edge case: Completing an
INPUTsession should not change item stage.
Troubleshooting
Item not promoted to PROCESSED after session complete
- Confirm the session
modeisPROCESSING—INPUTandREVIEWcompletions do not auto-promote. - Check the
POST /sessions/{id}/completeresponse; a 200 does not guarantee stage promotion if mode was wrong.
Icon upload failing
- Verify the S3 bucket and credentials are configured in the server environment.
- Confirm the upload uses
multipart/form-dataencoding — JSON body will be rejected.
Backlog endpoint returns empty
/study/backlogreturns onlyPENDINGitems; items inIN_PROGRESSorPROCESSEDwill not appear.
API Endpoints
All endpoints require JWT authentication and are prefixed with /api/v1. See server/README.md for full reference.
| Method | Path | Description |
|---|---|---|
GET | /study/topics | List study topics |
POST | /study/topics | Create a study topic |
GET | /study/topics/{id} | Get topic by ID |
PATCH | /study/topics/{id} | Update topic |
DELETE | /study/topics/{id} | Delete topic |
GET | /study/items | List study items (filterable by topic, stage, search) |
POST | /study/items | Create a study item |
GET | /study/items/{id} | Get study item by ID |
PATCH | /study/items/{id} | Update study item |
DELETE | /study/items/{id} | Delete study item |
GET | /study/sessions | List study sessions |
POST | /study/sessions | Create a study session |
POST | /study/sessions/{id}/complete | Complete a study session |
GET | /study/disciplines | List study disciplines |
POST | /study/disciplines | Create a discipline |
GET | /study/stats | Get study statistics |
Related Docs
- Timer system — study sessions can be linked to timers
- UI & UX — kanban pipeline UI and study session flow
- Integrations — AWS S3 icon storage