# johnferrater/paper_studio architecture

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

- Interactive diagram: https://gitdiagram.com/johnferrater/paper_studio
- Repository: https://github.com/johnferrater/paper_studio

## Overview

Paper Studio is a Django research-paper workspace. Students create projects and chapters, organize sources and citations, collaborate, and draft chapters; teachers review submissions and request revisions, with notifications supporting that cycle. The graph also preserves assistant, analytics, supervision, and role-based account capabilities visible in the repository tree and page smoke-test excerpt. Several view modules were not sampled, so their internal calls and integrations are not asserted.

Main entry points: [`apps/accounts/views.py`](https://github.com/johnferrater/paper_studio/blob/main/apps/accounts/views.py) (Accounts and Dashboards), [`apps/core/access.py`](https://github.com/johnferrater/paper_studio/blob/main/apps/core/access.py) (Project Visibility), [`apps/research/models.py`](https://github.com/johnferrater/paper_studio/blob/main/apps/research/models.py) (Projects and Chapters), [`apps/research/views.py`](https://github.com/johnferrater/paper_studio/blob/main/apps/research/views.py) (Project and Chapter Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and Access"]
  node_accounts_ui["Accounts and Dashboards<br/>[views.py]"]
  node_user_data[("User Records<br/>[models.py]")]
  node_access["Project Visibility<br/>[access.py]"]
  node_permissions["Role Permissions<br/>[permissions.py]"]
end

subgraph group_research["Research Workspace"]
  node_project_ui["Project and Chapter Views<br/>[views.py]"]
  node_research_data[("Projects and Chapters<br/>[models.py]")]
  node_research_forms["Research Forms<br/>[forms.py]"]
end

subgraph group_writing["Writing and Review"]
  node_writing_ui["Drafting and Review<br/>[views.py]"]
  node_writing_data[("Drafts and Reviews<br/>[models.py]")]
end

subgraph group_references["Sources and Citations"]
  node_sources_ui["Source Management<br/>[views.py]"]
  node_sources_data[("Source Records<br/>[models.py]")]
  node_citations_ui["Citation Management<br/>[views.py]"]
  node_citation_data[("Citation Records<br/>[models.py]")]
  node_citation_format["Citation Formatting<br/>[formatting.py]"]
end

subgraph group_support["Collaboration and Support"]
  node_collab_ui["Project Collaboration<br/>[views.py]"]
  node_membership_data[("Project Memberships<br/>[models.py]")]
  node_assistant_ui["Research Assistant<br/>[views.py]"]
  node_assistant_service["Assistant Service<br/>[services.py]"]
  node_assistant_data[("Assistant Messages<br/>[models.py]")]
  node_analytics["Research Analytics<br/>[views.py]"]
  node_supervision[("Supervision Records<br/>[models.py]")]
  node_notifications_ui["Notification Views<br/>[views.py]"]
  node_notification_service["Notification Service<br/>[services.py]"]
  node_notification_data[("Notifications<br/>[models.py]")]
end

node_user(("Researcher"))

node_user -.->|"uses"| node_accounts_ui
node_accounts_ui -->|"reads and creates"| node_user_data
node_accounts_ui -->|"reads"| node_research_data
node_accounts_ui -->|"reads"| node_membership_data
node_accounts_ui -->|"records reviews"| node_writing_data
node_accounts_ui -->|"notifies"| node_notification_service
node_project_ui -->|"checks visibility"| node_access
node_project_ui -->|"uses"| node_research_forms
node_project_ui -->|"reads and writes"| node_research_data
node_access -->|"filters projects"| node_research_data
node_sources_ui -->|"checks access"| node_access
node_sources_ui -->|"reads and writes"| node_sources_data
node_citations_ui -->|"checks access"| node_access
node_citations_ui -->|"reads and writes"| node_citation_data
node_citation_data -->|"formats citations"| node_citation_format
node_collab_ui -->|"reads and writes"| node_membership_data
node_collab_ui -->|"reads projects"| node_research_data
node_collab_ui -->|"notifies"| node_notification_service
node_notification_service -->|"creates notifications"| node_notification_data
node_user -.->|"uses"| node_writing_ui
node_user -.->|"uses"| node_assistant_ui
node_assistant_ui -.->|"delegates"| node_assistant_service
node_assistant_ui -.->|"stores messages"| node_assistant_data
node_user -.->|"views reports"| node_analytics
node_user -.->|"uses supervision"| node_supervision
node_user -.->|"views notifications"| node_notifications_ui

click node_accounts_ui "https://github.com/johnferrater/paper_studio/blob/main/apps/accounts/views.py"
click node_user_data "https://github.com/johnferrater/paper_studio/blob/main/apps/accounts/models.py"
click node_access "https://github.com/johnferrater/paper_studio/blob/main/apps/core/access.py"
click node_permissions "https://github.com/johnferrater/paper_studio/blob/main/apps/core/permissions.py"
click node_project_ui "https://github.com/johnferrater/paper_studio/blob/main/apps/research/views.py"
click node_research_data "https://github.com/johnferrater/paper_studio/blob/main/apps/research/models.py"
click node_research_forms "https://github.com/johnferrater/paper_studio/blob/main/apps/research/forms.py"
click node_writing_ui "https://github.com/johnferrater/paper_studio/blob/main/apps/writing/views.py"
click node_writing_data "https://github.com/johnferrater/paper_studio/blob/main/apps/writing/models.py"
click node_sources_ui "https://github.com/johnferrater/paper_studio/blob/main/apps/sources/views.py"
click node_sources_data "https://github.com/johnferrater/paper_studio/blob/main/apps/sources/models.py"
click node_citations_ui "https://github.com/johnferrater/paper_studio/blob/main/apps/citations/views.py"
click node_citation_data "https://github.com/johnferrater/paper_studio/blob/main/apps/citations/models.py"
click node_citation_format "https://github.com/johnferrater/paper_studio/blob/main/apps/citations/formatting.py"
click node_collab_ui "https://github.com/johnferrater/paper_studio/blob/main/apps/collaboration/views.py"
click node_membership_data "https://github.com/johnferrater/paper_studio/blob/main/apps/collaboration/models.py"
click node_assistant_ui "https://github.com/johnferrater/paper_studio/blob/main/apps/assistant/views.py"
click node_assistant_service "https://github.com/johnferrater/paper_studio/blob/main/apps/assistant/services.py"
click node_assistant_data "https://github.com/johnferrater/paper_studio/blob/main/apps/assistant/models.py"
click node_analytics "https://github.com/johnferrater/paper_studio/blob/main/apps/analytics/views.py"
click node_supervision "https://github.com/johnferrater/paper_studio/blob/main/apps/supervision/models.py"
click node_notifications_ui "https://github.com/johnferrater/paper_studio/blob/main/apps/notifications/views.py"
click node_notification_service "https://github.com/johnferrater/paper_studio/blob/main/apps/notifications/services.py"
click node_notification_data "https://github.com/johnferrater/paper_studio/blob/main/apps/notifications/models.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_accounts_ui,node_user_data,node_access,node_permissions toneBlue
class node_project_ui,node_research_data,node_research_forms toneAmber
class node_writing_ui,node_writing_data toneMint
class node_sources_ui,node_sources_data,node_citations_ui,node_citation_data,node_citation_format toneRose
class node_collab_ui,node_membership_data,node_assistant_ui,node_assistant_service,node_assistant_data,node_analytics,node_supervision,node_notifications_ui,node_notification_service,node_notification_data,node_user toneIndigo
```

## Components

### Accounts and Access

- [Accounts and Dashboards](https://github.com/johnferrater/paper_studio/blob/main/apps/accounts/views.py): `apps/accounts/views.py`
- [User Records](https://github.com/johnferrater/paper_studio/blob/main/apps/accounts/models.py): `apps/accounts/models.py`
- [Project Visibility](https://github.com/johnferrater/paper_studio/blob/main/apps/core/access.py): `apps/core/access.py`
- [Role Permissions](https://github.com/johnferrater/paper_studio/blob/main/apps/core/permissions.py): `apps/core/permissions.py`

### Research Workspace

- [Project and Chapter Views](https://github.com/johnferrater/paper_studio/blob/main/apps/research/views.py): `apps/research/views.py`
- [Projects and Chapters](https://github.com/johnferrater/paper_studio/blob/main/apps/research/models.py): `apps/research/models.py`
- [Research Forms](https://github.com/johnferrater/paper_studio/blob/main/apps/research/forms.py): `apps/research/forms.py`

### Writing and Review

- [Drafting and Review](https://github.com/johnferrater/paper_studio/blob/main/apps/writing/views.py): `apps/writing/views.py`
- [Drafts and Reviews](https://github.com/johnferrater/paper_studio/blob/main/apps/writing/models.py): `apps/writing/models.py`

### Sources and Citations

- [Source Management](https://github.com/johnferrater/paper_studio/blob/main/apps/sources/views.py): `apps/sources/views.py`
- [Source Records](https://github.com/johnferrater/paper_studio/blob/main/apps/sources/models.py): `apps/sources/models.py`
- [Citation Management](https://github.com/johnferrater/paper_studio/blob/main/apps/citations/views.py): `apps/citations/views.py`
- [Citation Records](https://github.com/johnferrater/paper_studio/blob/main/apps/citations/models.py): `apps/citations/models.py`
- [Citation Formatting](https://github.com/johnferrater/paper_studio/blob/main/apps/citations/formatting.py): `apps/citations/formatting.py`

### Collaboration and Support

- [Project Collaboration](https://github.com/johnferrater/paper_studio/blob/main/apps/collaboration/views.py): `apps/collaboration/views.py`
- [Project Memberships](https://github.com/johnferrater/paper_studio/blob/main/apps/collaboration/models.py): `apps/collaboration/models.py`
- [Research Assistant](https://github.com/johnferrater/paper_studio/blob/main/apps/assistant/views.py): `apps/assistant/views.py`
- [Assistant Service](https://github.com/johnferrater/paper_studio/blob/main/apps/assistant/services.py): `apps/assistant/services.py`
- [Assistant Messages](https://github.com/johnferrater/paper_studio/blob/main/apps/assistant/models.py): `apps/assistant/models.py`
- [Research Analytics](https://github.com/johnferrater/paper_studio/blob/main/apps/analytics/views.py): `apps/analytics/views.py`
- [Supervision Records](https://github.com/johnferrater/paper_studio/blob/main/apps/supervision/models.py): `apps/supervision/models.py`
- [Notification Views](https://github.com/johnferrater/paper_studio/blob/main/apps/notifications/views.py): `apps/notifications/views.py`
- [Notification Service](https://github.com/johnferrater/paper_studio/blob/main/apps/notifications/services.py): `apps/notifications/services.py`
- [Notifications](https://github.com/johnferrater/paper_studio/blob/main/apps/notifications/models.py): `apps/notifications/models.py`

### Other components

- **Researcher**

## Connections

- Researcher → Accounts and Dashboards: uses
- Accounts and Dashboards → User Records: reads and creates (evidence: `apps/accounts/views.py`)
- Accounts and Dashboards → Projects and Chapters: reads (evidence: `apps/accounts/views.py`)
- Accounts and Dashboards → Project Memberships: reads (evidence: `apps/accounts/views.py`)
- Accounts and Dashboards → Drafts and Reviews: records reviews (evidence: `apps/accounts/views.py`)
- Accounts and Dashboards → Notification Service: notifies (evidence: `apps/accounts/views.py`)
- Project and Chapter Views → Project Visibility: checks visibility (evidence: `apps/research/views.py`)
- Project and Chapter Views → Research Forms: uses (evidence: `apps/research/views.py`)
- Project and Chapter Views → Projects and Chapters: reads and writes (evidence: `apps/research/views.py`)
- Project Visibility → Projects and Chapters: filters projects (evidence: `apps/core/access.py`)
- Source Management → Project Visibility: checks access (evidence: `apps/sources/views.py`)
- Source Management → Source Records: reads and writes (evidence: `apps/sources/views.py`)
- Citation Management → Project Visibility: checks access (evidence: `apps/citations/views.py`)
- Citation Management → Citation Records: reads and writes (evidence: `apps/citations/views.py`)
- Citation Records → Citation Formatting: formats citations (evidence: `apps/citations/models.py`)
- Project Collaboration → Project Memberships: reads and writes (evidence: `apps/collaboration/views.py`)
- Project Collaboration → Projects and Chapters: reads projects (evidence: `apps/collaboration/views.py`)
- Project Collaboration → Notification Service: notifies (evidence: `apps/collaboration/views.py`)
- Notification Service → Notifications: creates notifications (evidence: `apps/notifications/services.py`)
- Researcher → Drafting and Review: uses
- Researcher → Research Assistant: uses
- Research Assistant → Assistant Service: delegates
- Research Assistant → Assistant Messages: stores messages
- Researcher → Research Analytics: views reports
- Researcher → Supervision Records: uses supervision
- Researcher → Notification Views: views notifications
