# pranjal2208/sentio architecture

> Architecture diagram of the GitHub repository pranjal2208/sentio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pranjal2208/sentio
- Repository: https://github.com/pranjal2208/sentio

## Overview

Sentio is a Streamlit research tutoring platform. Learners authenticate, are assigned to a study condition, complete topic pre/post quizzes and a study session, then submit workload feedback; the app records study data and can present researcher analyses. In adaptive sessions, browser typing telemetry feeds cognitive-load classification and LangGraph response routing, with Chroma-backed topic memory supporting spaced-repetition reviews. The README documents the broader study and admin capabilities; several implementation paths are connected only at the app boundary because their detailed source was not excerpted.

Main entry points: [`app.py`](https://github.com/pranjal2208/sentio/blob/main/app.py) (Study app), [`core/db.py`](https://github.com/pranjal2208/sentio/blob/main/core/db.py) (Study records), [`agent/graph.py`](https://github.com/pranjal2208/sentio/blob/main/agent/graph.py) (Tutoring router), [`analyze_results.py`](https://github.com/pranjal2208/sentio/blob/main/analyze_results.py) (Analysis CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_study["Study experience"]
  node_sentio_app["Study app<br/>[app.py]"]
  node_login["Login and assignment<br/>[auth.py]"]
  node_study_topics["Topics and quizzes<br/>[topics.py]"]
  node_typing_capture["Typing capture<br/>[timing.py]"]
end

subgraph group_tutoring["Adaptive tutoring"]
  node_load_classifier["Load classifier<br/>[load_detector.py]"]
  node_tutor_graph["Tutoring router<br/>[graph.py]"]
  node_topic_memory[("Topic memory and SRS<br/>[store.py]")]
end

subgraph group_research_data["Research data"]
  node_study_records[("Study records<br/>[db.py]")]
  node_supabase[("Supabase")]
end

subgraph group_research_tools["Research tools"]
  node_admin_console["Admin console<br/>[app.py]"]
  node_analysis_cli["Analysis CLI<br/>[analyze_results.py]"]
  node_study_statistics["Study statistics<br/>[analyze_results.py]"]
end

node_learner(("Learner"))
node_researcher(("Researcher"))

node_learner -->|"uses"| node_sentio_app
node_sentio_app -->|"authenticates"| node_login
node_sentio_app -->|"offers quizzes"| node_study_topics
node_sentio_app -->|"collects telemetry"| node_typing_capture
node_typing_capture -->|"sends signals"| node_sentio_app
node_sentio_app -->|"routes tutoring"| node_tutor_graph
node_tutor_graph -->|"classifies load"| node_load_classifier
node_tutor_graph -->|"reviews topics"| node_topic_memory
node_sentio_app -->|"stores topics"| node_topic_memory
node_sentio_app -->|"records study"| node_study_records
node_study_records -->|"syncs records"| node_supabase
node_researcher -->|"reviews cohort"| node_admin_console
node_admin_console -->|"reads records"| node_study_records
node_admin_console -->|"computes tests"| node_study_statistics
node_analysis_cli -->|"analyzes database"| node_study_records
node_analysis_cli -->|"produces statistics"| node_study_statistics

click node_sentio_app "https://github.com/pranjal2208/sentio/blob/main/app.py"
click node_login "https://github.com/pranjal2208/sentio/blob/main/core/auth.py"
click node_study_topics "https://github.com/pranjal2208/sentio/blob/main/core/topics.py"
click node_typing_capture "https://github.com/pranjal2208/sentio/blob/main/ui/timing.py"
click node_load_classifier "https://github.com/pranjal2208/sentio/blob/main/core/load_detector.py"
click node_tutor_graph "https://github.com/pranjal2208/sentio/blob/main/agent/graph.py"
click node_topic_memory "https://github.com/pranjal2208/sentio/blob/main/memory/store.py"
click node_study_records "https://github.com/pranjal2208/sentio/blob/main/core/db.py"
click node_admin_console "https://github.com/pranjal2208/sentio/blob/main/app.py"
click node_analysis_cli "https://github.com/pranjal2208/sentio/blob/main/analyze_results.py"
click node_study_statistics "https://github.com/pranjal2208/sentio/blob/main/analyze_results.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sentio_app,node_login,node_study_topics,node_typing_capture toneBlue
class node_load_classifier,node_tutor_graph,node_topic_memory toneAmber
class node_study_records,node_supabase toneMint
class node_admin_console,node_analysis_cli,node_study_statistics toneRose
class node_learner,node_researcher toneIndigo
```

## Components

### Study experience

- [Study app](https://github.com/pranjal2208/sentio/blob/main/app.py): `app.py`
- [Login and assignment](https://github.com/pranjal2208/sentio/blob/main/core/auth.py): `core/auth.py`
- [Topics and quizzes](https://github.com/pranjal2208/sentio/blob/main/core/topics.py): `core/topics.py`
- [Typing capture](https://github.com/pranjal2208/sentio/blob/main/ui/timing.py): `ui/timing.py`

### Adaptive tutoring

- [Load classifier](https://github.com/pranjal2208/sentio/blob/main/core/load_detector.py): `core/load_detector.py`
- [Tutoring router](https://github.com/pranjal2208/sentio/blob/main/agent/graph.py): `agent/graph.py`
- [Topic memory and SRS](https://github.com/pranjal2208/sentio/blob/main/memory/store.py): `memory/store.py`

### Research data

- [Study records](https://github.com/pranjal2208/sentio/blob/main/core/db.py): `core/db.py`
- **Supabase**

### Research tools

- [Admin console](https://github.com/pranjal2208/sentio/blob/main/app.py): `app.py`
- [Analysis CLI](https://github.com/pranjal2208/sentio/blob/main/analyze_results.py): `analyze_results.py`
- [Study statistics](https://github.com/pranjal2208/sentio/blob/main/analyze_results.py): `analyze_results.py`

### Other components

- **Learner**
- **Researcher**

## Connections

- Learner → Study app: uses (evidence: `README.md`)
- Study app → Login and assignment: authenticates (evidence: `README.md`)
- Study app → Topics and quizzes: offers quizzes (evidence: `README.md`)
- Study app → Typing capture: collects telemetry (evidence: `app.py`)
- Typing capture → Study app: sends signals (evidence: `ui/timing.py`)
- Study app → Tutoring router: routes tutoring (evidence: `app.py`)
- Tutoring router → Load classifier: classifies load (evidence: `agent/graph.py`)
- Tutoring router → Topic memory and SRS: reviews topics (evidence: `agent/graph.py`)
- Study app → Topic memory and SRS: stores topics (evidence: `app.py`)
- Study app → Study records: records study (evidence: `README.md`)
- Study records → Supabase: syncs records (evidence: `core/db.py`)
- Researcher → Admin console: reviews cohort (evidence: `README.md`)
- Admin console → Study records: reads records (evidence: `README.md`)
- Admin console → Study statistics: computes tests (evidence: `README.md`)
- Analysis CLI → Study records: analyzes database (evidence: `README.md`)
- Analysis CLI → Study statistics: produces statistics (evidence: `README.md`)
