# samiul40/studylog architecture

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

- Interactive diagram: https://gitdiagram.com/samiul40/studylog
- Repository: https://github.com/samiul40/studylog
- Video tour (about a minute): https://gitdiagram.com/samiul40/studylog/video

## Overview

Studyflow is a Django study-tracking app: users organize video and reading resources into ordered units, record unit progress and study sessions, then review progress and activity on a dashboard. Accounts support login and profile workflows; the learning app also includes feature requests, YouTube-related views, and usage/retention analytics. The dashboard orchestrator explicitly assembles resource- and session-based statistics. Some view and integration implementations were not sampled, so uncertain internal wiring is omitted.

Main entry points: [`web/learning/models`](https://github.com/samiul40/studylog/tree/main/web/learning/models) (Learning Models), [`web/learning/services/dashboard/_orchestrator.py`](https://github.com/samiul40/studylog/blob/main/web/learning/services/dashboard/_orchestrator.py) (Dashboard Orchestrator), [`web/learning/models/study_session.py`](https://github.com/samiul40/studylog/blob/main/web/learning/models/study_session.py) (Session Models), [`web/learning/views/learning_resource.py`](https://github.com/samiul40/studylog/blob/main/web/learning/views/learning_resource.py) (Resource Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts"]
  node_account_views["Account Views<br/>[views.py]"]
  node_account_models["Account Models<br/>[models.py]"]
end

subgraph group_learning["Learning Content"]
  node_resource_views["Resource Views"]
  node_unit_views["Unit Views<br/>[learning_unit.py]"]
  node_learning_models["Learning Models"]
  node_resource_grouping["Resource Grouping"]
  node_feature_requests["Feature Requests<br/>[feature_request.py]"]
  node_youtube_views["YouTube Views<br/>[youtube.py]"]
end

subgraph group_tracking["Study Tracking"]
  node_session_views["Session Views<br/>[study_session.py]"]
  node_session_service["Session Services<br/>[sessions.py]"]
  node_session_models["Session Models<br/>[study_session.py]"]
  node_progress_service["Progress Services<br/>[progress.py]"]
end

subgraph group_analytics["Analytics"]
  node_dashboard_view["Dashboard View<br/>[dashboard.py]"]
  node_dashboard_api["Dashboard Orchestrator<br/>[_orchestrator.py]"]
  node_resource_stats["Resource Statistics<br/>[_resource.py]"]
  node_session_stats["Session Statistics<br/>[_session.py]"]
  node_usage_analytics["Usage Analytics<br/>[usage.py]"]
  node_retention_data["Retention Cohorts"]
end

subgraph group_site["Site Experience"]
  node_page_views["Landing Pages<br/>[views.py]"]
end

node_learner(("Learner"))
node_database[("PostgreSQL")]

node_learner -->|"uses account"| node_account_views
node_account_views -->|"manages accounts"| node_account_models
node_learner -->|"organizes resources"| node_resource_views
node_resource_views -->|"manages resources"| node_learning_models
node_learner -->|"tracks units"| node_unit_views
node_unit_views -->|"updates units"| node_learning_models
node_resource_views -->|"groups resources"| node_resource_grouping
node_learner -->|"logs sessions"| node_session_views
node_session_views -->|"requests calendar data"| node_session_service
node_session_views -->|"manages sessions"| node_session_models
node_session_service -->|"reads and writes"| node_session_models
node_unit_views -->|"records progress"| node_progress_service
node_learner -->|"views dashboard"| node_dashboard_view
node_dashboard_view -->|"requests statistics"| node_dashboard_api
node_dashboard_api -->|"requests resource stats"| node_resource_stats
node_dashboard_api -->|"requests session stats"| node_session_stats
node_dashboard_api -->|"queries resources and units"| node_learning_models
node_resource_stats -->|"queries resources and units"| node_learning_models
node_session_stats -->|"queries sessions"| node_session_models
node_learner -->|"submits feedback"| node_feature_requests
node_learner -->|"uses video features"| node_youtube_views
node_learner -->|"visits site"| node_page_views
node_learning_models -->|"persists learning data"| node_database
node_session_models -->|"persists sessions"| node_database
node_account_models -->|"persists accounts"| node_database
node_usage_analytics -->|"records usage data"| node_database
node_retention_data -->|"stores cohort data"| node_database

click node_account_views "https://github.com/samiul40/studylog/blob/main/web/accounts/views.py"
click node_account_models "https://github.com/samiul40/studylog/blob/main/web/accounts/models.py"
click node_resource_views "https://github.com/samiul40/studylog/blob/main/web/learning/views/learning_resource.py"
click node_unit_views "https://github.com/samiul40/studylog/blob/main/web/learning/views/learning_unit.py"
click node_learning_models "https://github.com/samiul40/studylog/tree/main/web/learning/models"
click node_resource_grouping "https://github.com/samiul40/studylog/blob/main/web/learning/services/resource_grouping.py"
click node_session_views "https://github.com/samiul40/studylog/blob/main/web/learning/views/study_session.py"
click node_session_service "https://github.com/samiul40/studylog/blob/main/web/learning/services/sessions.py"
click node_session_models "https://github.com/samiul40/studylog/blob/main/web/learning/models/study_session.py"
click node_progress_service "https://github.com/samiul40/studylog/blob/main/web/learning/services/progress.py"
click node_dashboard_view "https://github.com/samiul40/studylog/blob/main/web/learning/views/dashboard.py"
click node_dashboard_api "https://github.com/samiul40/studylog/blob/main/web/learning/services/dashboard/_orchestrator.py"
click node_resource_stats "https://github.com/samiul40/studylog/blob/main/web/learning/services/dashboard/_resource.py"
click node_session_stats "https://github.com/samiul40/studylog/blob/main/web/learning/services/dashboard/_session.py"
click node_usage_analytics "https://github.com/samiul40/studylog/blob/main/web/learning/services/usage.py"
click node_retention_data "https://github.com/samiul40/studylog/blob/main/web/learning/models/user_retention_cohort.py"
click node_feature_requests "https://github.com/samiul40/studylog/blob/main/web/learning/views/feature_request.py"
click node_youtube_views "https://github.com/samiul40/studylog/blob/main/web/learning/views/youtube.py"
click node_page_views "https://github.com/samiul40/studylog/blob/main/web/pages/views.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_account_views,node_account_models toneBlue
class node_resource_views,node_unit_views,node_learning_models,node_resource_grouping,node_feature_requests,node_youtube_views,node_database toneAmber
class node_session_views,node_session_service,node_session_models,node_progress_service toneMint
class node_dashboard_view,node_dashboard_api,node_resource_stats,node_session_stats,node_usage_analytics,node_retention_data toneRose
class node_page_views,node_learner toneIndigo
```

## Components

### Accounts

- [Account Views](https://github.com/samiul40/studylog/blob/main/web/accounts/views.py): `web/accounts/views.py`
- [Account Models](https://github.com/samiul40/studylog/blob/main/web/accounts/models.py): `web/accounts/models.py`

### Learning Content

- [Resource Views](https://github.com/samiul40/studylog/blob/main/web/learning/views/learning_resource.py): `web/learning/views/learning_resource.py`
- [Unit Views](https://github.com/samiul40/studylog/blob/main/web/learning/views/learning_unit.py): `web/learning/views/learning_unit.py`
- [Learning Models](https://github.com/samiul40/studylog/tree/main/web/learning/models): `web/learning/models`
- [Resource Grouping](https://github.com/samiul40/studylog/blob/main/web/learning/services/resource_grouping.py): `web/learning/services/resource_grouping.py`
- [Feature Requests](https://github.com/samiul40/studylog/blob/main/web/learning/views/feature_request.py): `web/learning/views/feature_request.py`
- [YouTube Views](https://github.com/samiul40/studylog/blob/main/web/learning/views/youtube.py): `web/learning/views/youtube.py`

### Study Tracking

- [Session Views](https://github.com/samiul40/studylog/blob/main/web/learning/views/study_session.py): `web/learning/views/study_session.py`
- [Session Services](https://github.com/samiul40/studylog/blob/main/web/learning/services/sessions.py): `web/learning/services/sessions.py`
- [Session Models](https://github.com/samiul40/studylog/blob/main/web/learning/models/study_session.py): `web/learning/models/study_session.py`
- [Progress Services](https://github.com/samiul40/studylog/blob/main/web/learning/services/progress.py): `web/learning/services/progress.py`

### Analytics

- [Dashboard View](https://github.com/samiul40/studylog/blob/main/web/learning/views/dashboard.py): `web/learning/views/dashboard.py`
- [Dashboard Orchestrator](https://github.com/samiul40/studylog/blob/main/web/learning/services/dashboard/_orchestrator.py): `web/learning/services/dashboard/_orchestrator.py`
- [Resource Statistics](https://github.com/samiul40/studylog/blob/main/web/learning/services/dashboard/_resource.py): `web/learning/services/dashboard/_resource.py`
- [Session Statistics](https://github.com/samiul40/studylog/blob/main/web/learning/services/dashboard/_session.py): `web/learning/services/dashboard/_session.py`
- [Usage Analytics](https://github.com/samiul40/studylog/blob/main/web/learning/services/usage.py): `web/learning/services/usage.py`
- [Retention Cohorts](https://github.com/samiul40/studylog/blob/main/web/learning/models/user_retention_cohort.py): `web/learning/models/user_retention_cohort.py`

### Site Experience

- [Landing Pages](https://github.com/samiul40/studylog/blob/main/web/pages/views.py): `web/pages/views.py`

### Other components

- **Learner**
- **PostgreSQL**

## Connections

- Learner → Account Views: uses account
- Account Views → Account Models: manages accounts
- Learner → Resource Views: organizes resources
- Resource Views → Learning Models: manages resources
- Learner → Unit Views: tracks units
- Unit Views → Learning Models: updates units
- Resource Views → Resource Grouping: groups resources
- Learner → Session Views: logs sessions
- Session Views → Session Services: requests calendar data
- Session Views → Session Models: manages sessions
- Session Services → Session Models: reads and writes
- Unit Views → Progress Services: records progress
- Learner → Dashboard View: views dashboard
- Dashboard View → Dashboard Orchestrator: requests statistics
- Dashboard Orchestrator → Resource Statistics: requests resource stats
- Dashboard Orchestrator → Session Statistics: requests session stats
- Dashboard Orchestrator → Learning Models: queries resources and units
- Resource Statistics → Learning Models: queries resources and units
- Session Statistics → Session Models: queries sessions
- Learner → Feature Requests: submits feedback
- Learner → YouTube Views: uses video features
- Learner → Landing Pages: visits site
- Learning Models → PostgreSQL: persists learning data
- Session Models → PostgreSQL: persists sessions
- Account Models → PostgreSQL: persists accounts
- Usage Analytics → PostgreSQL: records usage data
- Retention Cohorts → PostgreSQL: stores cohort data
