# mikistat2/group-10-semanote architecture

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

- Interactive diagram: https://gitdiagram.com/mikistat2/group-10-semanote
- Repository: https://github.com/mikistat2/group-10-semanote

## Overview

Sema Note records microphone audio in ordered segments, uploads them for lecture processing, and presents the resulting transcript and Amharic summary. The sampled route uses the local Saar ASR adapter for transcription, then Addis AI for summarization; this differs from the README’s description of Addis transcription. The UI also maintains browser-local note history, and the server exposes saved-lecture retrieval. Source evidence is incomplete, so unsampled connections are omitted.

Main entry points: [`server/src/routes/lectures.js`](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/routes/lectures.js) (Lecture routes), [`client/src/App.jsx`](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/client/src/App.jsx) (Recording and notes UI), [`server/src/db/index.js`](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/db/index.js) (Database client), [`client/src/recorder.js`](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/client/src/recorder.js) (Segmented recorder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and UI"]
  node_app["Recording and notes UI<br/>[App.jsx]"]
  node_recorder["Segmented recorder<br/>[recorder.js]"]
  node_client_api["Upload client<br/>[api.js]"]
end

subgraph group_api["Lecture API"]
  node_server["Express server<br/>[index.js]"]
  node_lectures["Lecture routes<br/>[lectures.js]"]
end

subgraph group_processing["Processing"]
  node_saar_adapter["Saar ASR adapter<br/>[saar-asr.js]"]
  node_addis["Addis AI service<br/>[addis.js]"]
end

subgraph group_persistence["Persistence"]
  node_db_client["Database client<br/>[index.js]"]
  node_lecture_schema[("Lecture records<br/>[schema.js]")]
end

node_lecturer(("Lecturer"))
node_microphone["Browser microphone"]
node_saar_service["Local Saar ASR"]
node_addis_service["Addis AI"]
node_postgres[("PostgreSQL")]

node_lecturer -->|"records with"| node_app
node_app -->|"starts and stops"| node_recorder
node_recorder -->|"captures audio"| node_microphone
node_app -->|"uploads segments"| node_client_api
node_client_api -->|"sends request"| node_server
node_server -->|"mounts routes"| node_lectures
node_lectures -->|"transcribes segments"| node_saar_adapter
node_saar_adapter -->|"posts audio"| node_saar_service
node_lectures -->|"requests summary"| node_addis
node_addis -->|"calls API"| node_addis_service
node_lectures -->|"reads and writes"| node_db_client
node_db_client -->|"configures schema"| node_lecture_schema
node_db_client -.->|"connects to"| node_postgres

click node_app "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/client/src/App.jsx"
click node_recorder "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/client/src/recorder.js"
click node_client_api "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/client/src/api.js"
click node_server "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/index.js"
click node_lectures "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/routes/lectures.js"
click node_saar_adapter "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/services/saar-asr.js"
click node_addis "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/services/addis.js"
click node_db_client "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/db/index.js"
click node_lecture_schema "https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/db/schema.js"

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_app,node_recorder,node_client_api,node_microphone toneBlue
class node_server,node_lectures,node_postgres toneAmber
class node_saar_adapter,node_addis toneMint
class node_db_client,node_lecture_schema toneRose
class node_lecturer,node_saar_service,node_addis_service toneIndigo
```

## Components

### Capture and UI

- [Recording and notes UI](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/client/src/App.jsx): `client/src/App.jsx`
- [Segmented recorder](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/client/src/recorder.js): `client/src/recorder.js`
- [Upload client](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/client/src/api.js): `client/src/api.js`

### Lecture API

- [Express server](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/index.js): `server/src/index.js`
- [Lecture routes](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/routes/lectures.js): `server/src/routes/lectures.js`

### Processing

- [Saar ASR adapter](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/services/saar-asr.js): `server/src/services/saar-asr.js`
- [Addis AI service](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/services/addis.js): `server/src/services/addis.js`

### Persistence

- [Database client](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/db/index.js): `server/src/db/index.js`
- [Lecture records](https://github.com/mikistat2/group-10-semanote/blob/group-10-semanote/server/src/db/schema.js): `server/src/db/schema.js`

### Other components

- **Lecturer**
- **Browser microphone**
- **Local Saar ASR**
- **Addis AI**
- **PostgreSQL**

## Connections

- Lecturer → Recording and notes UI: records with (evidence: `README.md`)
- Recording and notes UI → Segmented recorder: starts and stops (evidence: `client/src/App.jsx`)
- Segmented recorder → Browser microphone: captures audio (evidence: `client/src/recorder.js`)
- Recording and notes UI → Upload client: uploads segments (evidence: `client/src/App.jsx`)
- Upload client → Express server: sends request (evidence: `README.md`)
- Express server → Lecture routes: mounts routes (evidence: `server/src/index.js`)
- Lecture routes → Saar ASR adapter: transcribes segments (evidence: `server/src/routes/lectures.js`)
- Saar ASR adapter → Local Saar ASR: posts audio (evidence: `server/src/services/saar-asr.js`)
- Lecture routes → Addis AI service: requests summary (evidence: `server/src/routes/lectures.js`)
- Addis AI service → Addis AI: calls API (evidence: `server/src/services/addis.js`)
- Lecture routes → Database client: reads and writes (evidence: `server/src/routes/lectures.js`)
- Database client → Lecture records: configures schema (evidence: `server/src/db/index.js`)
- Database client → PostgreSQL: connects to
