# naverisme/snote architecture

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

- Interactive diagram: https://gitdiagram.com/naverisme/snote
- Repository: https://github.com/naverisme/snote

## Overview

SNOTE is a student-focused “second brain” for notes, tasks, projects, and study planning. The main workflow is a student using the React SPA to manage learning data through the API, which dispatches to modular backend domains and persists through Prisma/PostgreSQL. The graph also retains AI assistance, search, sharing, backup, and academic organization. Several feature modules are represented at their domain entry points because their internals were not sampled; those connections are shown only where the index, excerpts, or README support them.

Main entry points: [`backend/src/server.ts`](https://github.com/naverisme/snote/blob/main/backend/src/server.ts) (Express API), [`backend/src/shared/db/prismaClient.ts`](https://github.com/naverisme/snote/blob/main/backend/src/shared/db/prismaClient.ts) (Prisma client), [`frontend/src/services/api.ts`](https://github.com/naverisme/snote/blob/main/frontend/src/services/api.ts) (API client), [`frontend/src/App.tsx`](https://github.com/naverisme/snote/blob/main/frontend/src/App.tsx) (React workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Student workspace"]
  node_spa["React workspace<br/>[App.tsx]"]
  node_tasks_ui["Task workspace<br/>[TasksListPage.tsx]"]
  node_notes_ui["Notes workspace<br/>[NotesListPage.tsx]"]
  node_projects_ui["Project workspace"]
  node_study_ui["Study planning"]
  node_schedule_ui["Schedule workspace"]
  node_ai_ui["AI assistant<br/>[AiChatPage.tsx]"]
  node_search_ui["Global search"]
  node_share_ui["Public share view"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_backend["Backend domains"]
  node_backend_server["Express API<br/>[server.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_notes["Notes domain<br/>[notes.service.ts]"]
  node_tasks["Tasks domain"]
  node_projects["Projects domain"]
  node_academic["Semester and subjects"]
  node_schedule["Schedule domain"]
  node_ai["AI domain<br/>[ai.controller.ts]"]
  node_search["Search domain<br/>[search.service.ts]"]
  node_backup["Backup and restore"]
  node_shares["Share domain"]
end

subgraph group_platform["Runtime platform"]
  node_database_client["Prisma client<br/>[prismaClient.ts]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_shared["Shared contracts"]
  node_contracts["Shared DTOs and enums<br/>[enums.ts]"]
end

node_student(("Student"))

node_student -->|"uses"| node_spa
node_spa -.->|"requests through"| node_api
node_spa -->|"uses API"| node_backend_server
node_tasks_ui -->|"sends requests"| node_api
node_notes_ui -->|"sends requests"| node_api
node_share_ui -->|"loads share"| node_api
node_backend_server -->|"mounts routes"| node_auth
node_backend_server -->|"mounts routes"| node_notes
node_backend_server -->|"mounts routes"| node_tasks
node_backend_server -->|"mounts routes"| node_projects
node_backend_server -->|"mounts routes"| node_academic
node_backend_server -->|"mounts routes"| node_schedule
node_backend_server -->|"mounts routes"| node_ai
node_backend_server -->|"mounts routes"| node_search
node_backend_server -->|"mounts routes"| node_backup
node_backend_server -->|"mounts routes"| node_shares
node_auth -.->|"reads and writes via"| node_database_client
node_notes -.->|"persists via"| node_database_client
node_tasks -.->|"persists via"| node_database_client
node_projects -.->|"persists via"| node_database_client
node_academic -.->|"persists via"| node_database_client
node_schedule -.->|"persists via"| node_database_client
node_ai -->|"uses"| node_database_client
node_search -->|"queries"| node_database_client
node_backup -->|"uses"| node_database_client
node_shares -.->|"uses"| node_database_client
node_database_client -->|"connects to"| node_postgres
node_tasks_ui -->|"uses enums"| node_contracts
node_ai_ui -.->|"calls"| node_ai
node_search_ui -.->|"queries"| node_search
node_projects_ui -.->|"manages"| node_projects
node_study_ui -.->|"manages"| node_academic
node_schedule_ui -.->|"manages"| node_schedule
node_notes_ui -.->|"manages"| node_notes

click node_spa "https://github.com/naverisme/snote/blob/main/frontend/src/App.tsx"
click node_tasks_ui "https://github.com/naverisme/snote/blob/main/frontend/src/features/tasks/pages/TasksListPage.tsx"
click node_notes_ui "https://github.com/naverisme/snote/blob/main/frontend/src/features/notes/pages/NotesListPage.tsx"
click node_projects_ui "https://github.com/naverisme/snote/blob/main/frontend/src/features/projects/pages/ProjectsListPage.tsx"
click node_study_ui "https://github.com/naverisme/snote/blob/main/frontend/src/features/semesters/pages/SemesterOverviewPage.tsx"
click node_schedule_ui "https://github.com/naverisme/snote/blob/main/frontend/src/features/schedule/pages/ScheduleWeekPage.tsx"
click node_ai_ui "https://github.com/naverisme/snote/blob/main/frontend/src/features/ai/pages/AiChatPage.tsx"
click node_search_ui "https://github.com/naverisme/snote/blob/main/frontend/src/components/common/GlobalSearchModal.tsx"
click node_share_ui "https://github.com/naverisme/snote/blob/main/frontend/src/features/shares/pages/PublicShareViewPage.tsx"
click node_api "https://github.com/naverisme/snote/blob/main/frontend/src/services/api.ts"
click node_backend_server "https://github.com/naverisme/snote/blob/main/backend/src/server.ts"
click node_auth "https://github.com/naverisme/snote/blob/main/backend/src/modules/auth/auth.service.ts"
click node_notes "https://github.com/naverisme/snote/blob/main/backend/src/modules/notes/notes.service.ts"
click node_tasks "https://github.com/naverisme/snote/blob/main/backend/src/modules/tasks/tasks.controller.ts"
click node_projects "https://github.com/naverisme/snote/blob/main/backend/src/modules/projects/projects.controller.ts"
click node_academic "https://github.com/naverisme/snote/blob/main/backend/src/modules/semesters/semesters.controller.ts"
click node_schedule "https://github.com/naverisme/snote/blob/main/backend/src/modules/schedule/schedule.controller.ts"
click node_ai "https://github.com/naverisme/snote/blob/main/backend/src/modules/ai/ai.controller.ts"
click node_search "https://github.com/naverisme/snote/blob/main/backend/src/modules/search/search.service.ts"
click node_backup "https://github.com/naverisme/snote/blob/main/backend/src/modules/backup/backup.controller.ts"
click node_shares "https://github.com/naverisme/snote/blob/main/backend/src/modules/shares/shares.controller.ts"
click node_database_client "https://github.com/naverisme/snote/blob/main/backend/src/shared/db/prismaClient.ts"
click node_contracts "https://github.com/naverisme/snote/blob/main/packages/shared/src/enums.ts"

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_spa,node_tasks_ui,node_notes_ui,node_projects_ui,node_study_ui,node_schedule_ui,node_ai_ui,node_search_ui,node_share_ui,node_api toneBlue
class node_backend_server,node_auth,node_notes,node_tasks,node_projects,node_academic,node_schedule,node_ai,node_search,node_backup,node_shares toneAmber
class node_database_client,node_postgres toneMint
class node_contracts toneRose
class node_student toneIndigo
```

## Components

### Student workspace

- [React workspace](https://github.com/naverisme/snote/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Task workspace](https://github.com/naverisme/snote/blob/main/frontend/src/features/tasks/pages/TasksListPage.tsx): `frontend/src/features/tasks/pages/TasksListPage.tsx`
- [Notes workspace](https://github.com/naverisme/snote/blob/main/frontend/src/features/notes/pages/NotesListPage.tsx): `frontend/src/features/notes/pages/NotesListPage.tsx`
- [Project workspace](https://github.com/naverisme/snote/blob/main/frontend/src/features/projects/pages/ProjectsListPage.tsx): `frontend/src/features/projects/pages/ProjectsListPage.tsx`
- [Study planning](https://github.com/naverisme/snote/blob/main/frontend/src/features/semesters/pages/SemesterOverviewPage.tsx): `frontend/src/features/semesters/pages/SemesterOverviewPage.tsx`
- [Schedule workspace](https://github.com/naverisme/snote/blob/main/frontend/src/features/schedule/pages/ScheduleWeekPage.tsx): `frontend/src/features/schedule/pages/ScheduleWeekPage.tsx`
- [AI assistant](https://github.com/naverisme/snote/blob/main/frontend/src/features/ai/pages/AiChatPage.tsx): `frontend/src/features/ai/pages/AiChatPage.tsx`
- [Global search](https://github.com/naverisme/snote/blob/main/frontend/src/components/common/GlobalSearchModal.tsx): `frontend/src/components/common/GlobalSearchModal.tsx`
- [Public share view](https://github.com/naverisme/snote/blob/main/frontend/src/features/shares/pages/PublicShareViewPage.tsx): `frontend/src/features/shares/pages/PublicShareViewPage.tsx`
- [API client](https://github.com/naverisme/snote/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### Backend domains

- [Express API](https://github.com/naverisme/snote/blob/main/backend/src/server.ts): `backend/src/server.ts`
- [Authentication](https://github.com/naverisme/snote/blob/main/backend/src/modules/auth/auth.service.ts): `backend/src/modules/auth/auth.service.ts`
- [Notes domain](https://github.com/naverisme/snote/blob/main/backend/src/modules/notes/notes.service.ts): `backend/src/modules/notes/notes.service.ts`
- [Tasks domain](https://github.com/naverisme/snote/blob/main/backend/src/modules/tasks/tasks.controller.ts): `backend/src/modules/tasks/tasks.controller.ts`
- [Projects domain](https://github.com/naverisme/snote/blob/main/backend/src/modules/projects/projects.controller.ts): `backend/src/modules/projects/projects.controller.ts`
- [Semester and subjects](https://github.com/naverisme/snote/blob/main/backend/src/modules/semesters/semesters.controller.ts): `backend/src/modules/semesters/semesters.controller.ts`
- [Schedule domain](https://github.com/naverisme/snote/blob/main/backend/src/modules/schedule/schedule.controller.ts): `backend/src/modules/schedule/schedule.controller.ts`
- [AI domain](https://github.com/naverisme/snote/blob/main/backend/src/modules/ai/ai.controller.ts): `backend/src/modules/ai/ai.controller.ts`
- [Search domain](https://github.com/naverisme/snote/blob/main/backend/src/modules/search/search.service.ts): `backend/src/modules/search/search.service.ts`
- [Backup and restore](https://github.com/naverisme/snote/blob/main/backend/src/modules/backup/backup.controller.ts): `backend/src/modules/backup/backup.controller.ts`
- [Share domain](https://github.com/naverisme/snote/blob/main/backend/src/modules/shares/shares.controller.ts): `backend/src/modules/shares/shares.controller.ts`

### Runtime platform

- [Prisma client](https://github.com/naverisme/snote/blob/main/backend/src/shared/db/prismaClient.ts): `backend/src/shared/db/prismaClient.ts`
- **PostgreSQL**

### Shared contracts

- [Shared DTOs and enums](https://github.com/naverisme/snote/blob/main/packages/shared/src/enums.ts): `packages/shared/src/enums.ts`

### Other components

- **Student**

## Connections

- Student → React workspace: uses (evidence: `README.md`)
- React workspace → API client: requests through
- React workspace → Express API: uses API (evidence: `README.md`)
- Task workspace → API client: sends requests (evidence: `frontend/src/features/tasks/pages/TasksListPage.tsx`)
- Notes workspace → API client: sends requests
- Public share view → API client: loads share (evidence: `frontend/src/features/shares/pages/PublicShareViewPage.tsx`)
- Express API → Authentication: mounts routes (evidence: `backend/src/server.ts`)
- Express API → Notes domain: mounts routes (evidence: `backend/src/server.ts`)
- Express API → Tasks domain: mounts routes (evidence: `backend/src/server.ts`)
- Express API → Projects domain: mounts routes (evidence: `backend/src/server.ts`)
- Express API → Semester and subjects: mounts routes (evidence: `backend/src/server.ts`)
- Express API → Schedule domain: mounts routes (evidence: `backend/src/server.ts`)
- Express API → AI domain: mounts routes (evidence: `backend/src/server.ts`)
- Express API → Search domain: mounts routes (evidence: `backend/src/server.ts`)
- Express API → Backup and restore: mounts routes (evidence: `backend/src/server.ts`)
- Express API → Share domain: mounts routes (evidence: `backend/src/server.ts`)
- Authentication → Prisma client: reads and writes via
- Notes domain → Prisma client: persists via
- Tasks domain → Prisma client: persists via
- Projects domain → Prisma client: persists via
- Semester and subjects → Prisma client: persists via
- Schedule domain → Prisma client: persists via
- AI domain → Prisma client: uses
- Search domain → Prisma client: queries (evidence: `backend/src/modules/search/search.service.ts`)
- Backup and restore → Prisma client: uses
- Share domain → Prisma client: uses
- Prisma client → PostgreSQL: connects to (evidence: `backend/src/shared/db/prismaClient.ts`)
- Task workspace → Shared DTOs and enums: uses enums
- AI assistant → AI domain: calls
- Global search → Search domain: queries
- Project workspace → Projects domain: manages
- Study planning → Semester and subjects: manages
- Schedule workspace → Schedule domain: manages
- Notes workspace → Notes domain: manages
