# tearcake/nlp-mini architecture

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

- Interactive diagram: https://gitdiagram.com/tearcake/nlp-mini
- Repository: https://github.com/tearcake/nlp-mini

## Overview

LensAI turns a YouTube recording or local media path into a saved, searchable meeting workspace, then supports transcript-based questions. The main workflow runs from the dashboard through authenticated meeting processing, transcription and insight extraction, vector indexing, and persistence; chat retrieves from that index and saves answers. The graph also includes account flows and meeting-history operations. Relationships are limited to excerpted calls/imports and README statements; some documented provider and summary details lack sampled implementation evidence.

Main entry points: [`backend/routes/chat.py`](https://github.com/tearcake/nlp-mini/blob/main/backend/routes/chat.py) (Chat endpoints), [`backend/database/database.py`](https://github.com/tearcake/nlp-mini/blob/main/backend/database/database.py) (Database sessions), [`frontend/src/App.jsx`](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/App.jsx) (Route shell), [`backend/main.py`](https://github.com/tearcake/nlp-mini/blob/main/backend/main.py) (Processing pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web interface"]
  node_app_ui["Route shell<br/>[App.jsx]"]
  node_dashboard["Meeting dashboard<br/>[Dashboard.jsx]"]
  node_sidebar["Meeting sidebar<br/>[Sidebar.jsx]"]
  node_auth_ui["Auth state<br/>[AuthContext.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_landing["Landing page<br/>[landingPage.jsx]"]
  node_login["Login page<br/>[login.jsx]"]
  node_signup["Signup page<br/>[signup.jsx]"]
end

subgraph group_api["API and identity"]
  node_server["FastAPI application<br/>[app.py]"]
  node_auth_routes["Auth endpoints<br/>[auth1.py]"]
  node_meeting_routes["Meeting endpoints<br/>[meeting.py]"]
  node_chat_routes["Chat endpoints<br/>[chat.py]"]
  node_auth_helpers["JWT and passwords<br/>[auth.py]"]
end

subgraph group_intelligence["Meeting intelligence"]
  node_pipeline["Processing pipeline<br/>[main.py]"]
  node_media["Media preparation<br/>[audio_processor.py]"]
  node_transcriber["Transcription<br/>[transcriber.py]"]
  node_extractor["Insight extraction<br/>[extractor.py]"]
  node_summarizer["Summarization<br/>[summarize.py]"]
  node_rag["RAG question answering<br/>[rag_engine.py]"]
end

subgraph group_persistence["Persistence"]
  node_vectors[("Vector index<br/>[vector_store.py]")]
  node_db_session["Database sessions<br/>[database.py]"]
  node_models["User and meeting records<br/>[models.py]"]
  node_sqlite[("Meeting database")]
end

node_person(("Meeting user"))
node_llm["Groq model service"]

node_person -->|"uses"| node_app_ui
node_app_ui -->|"routes to"| node_landing
node_app_ui -->|"routes to"| node_login
node_app_ui -->|"routes to"| node_signup
node_app_ui -->|"routes to"| node_dashboard
node_dashboard -->|"renders"| node_sidebar
node_dashboard -->|"requests"| node_api_client
node_auth_ui -->|"requests"| node_api_client
node_dashboard -->|"uses"| node_auth_ui
node_login -->|"uses"| node_auth_ui
node_signup -->|"uses"| node_auth_ui
node_api_client -->|"calls API"| node_server
node_server -->|"registers"| node_auth_routes
node_server -->|"registers"| node_meeting_routes
node_server -->|"registers"| node_chat_routes
node_auth_routes -->|"uses"| node_auth_helpers
node_auth_routes -->|"queries"| node_db_session
node_auth_routes -->|"queries"| node_models
node_auth_helpers -->|"uses"| node_db_session
node_auth_helpers -->|"loads user"| node_models
node_meeting_routes -->|"runs"| node_pipeline
node_meeting_routes -->|"uses"| node_db_session
node_meeting_routes -->|"stores meetings"| node_models
node_pipeline -->|"prepares media"| node_media
node_pipeline -->|"transcribes"| node_transcriber
node_pipeline -->|"extracts insights"| node_extractor
node_pipeline -->|"indexes transcript"| node_rag
node_rag -->|"retrieves and indexes"| node_vectors
node_chat_routes -->|"answers questions"| node_rag
node_chat_routes -->|"builds index"| node_vectors
node_chat_routes -->|"saves chat"| node_db_session
node_chat_routes -->|"uses records"| node_models
node_chat_routes -->|"authenticates"| node_auth_helpers
node_rag -->|"prompts"| node_llm
node_db_session -->|"connects"| node_sqlite
node_models -->|"uses base"| node_db_session

click node_app_ui "https://github.com/tearcake/nlp-mini/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/tearcake/nlp-mini/blob/main/frontend/src/pages/Dashboard.jsx"
click node_sidebar "https://github.com/tearcake/nlp-mini/blob/main/frontend/src/components/Sidebar.jsx"
click node_auth_ui "https://github.com/tearcake/nlp-mini/blob/main/frontend/src/context/AuthContext.jsx"
click node_api_client "https://github.com/tearcake/nlp-mini/blob/main/frontend/src/api/api.js"
click node_landing "https://github.com/tearcake/nlp-mini/blob/main/frontend/src/pages/landingPage.jsx"
click node_login "https://github.com/tearcake/nlp-mini/blob/main/frontend/src/pages/login.jsx"
click node_signup "https://github.com/tearcake/nlp-mini/blob/main/frontend/src/pages/signup.jsx"
click node_server "https://github.com/tearcake/nlp-mini/blob/main/backend/app.py"
click node_auth_routes "https://github.com/tearcake/nlp-mini/blob/main/backend/routes/auth1.py"
click node_meeting_routes "https://github.com/tearcake/nlp-mini/blob/main/backend/routes/meeting.py"
click node_chat_routes "https://github.com/tearcake/nlp-mini/blob/main/backend/routes/chat.py"
click node_auth_helpers "https://github.com/tearcake/nlp-mini/blob/main/backend/auth/auth.py"
click node_pipeline "https://github.com/tearcake/nlp-mini/blob/main/backend/main.py"
click node_media "https://github.com/tearcake/nlp-mini/blob/main/backend/utils/audio_processor.py"
click node_transcriber "https://github.com/tearcake/nlp-mini/blob/main/backend/core/transcriber.py"
click node_extractor "https://github.com/tearcake/nlp-mini/blob/main/backend/core/extractor.py"
click node_summarizer "https://github.com/tearcake/nlp-mini/blob/main/backend/core/summarize.py"
click node_rag "https://github.com/tearcake/nlp-mini/blob/main/backend/core/rag_engine.py"
click node_vectors "https://github.com/tearcake/nlp-mini/blob/main/backend/core/vector_store.py"
click node_db_session "https://github.com/tearcake/nlp-mini/blob/main/backend/database/database.py"
click node_models "https://github.com/tearcake/nlp-mini/blob/main/backend/models/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_app_ui,node_dashboard,node_sidebar,node_auth_ui,node_api_client,node_landing,node_login,node_signup,node_person toneBlue
class node_server,node_auth_routes,node_meeting_routes,node_chat_routes,node_auth_helpers toneAmber
class node_pipeline,node_media,node_transcriber,node_extractor,node_summarizer,node_rag toneMint
class node_vectors,node_db_session,node_models,node_sqlite toneRose
class node_llm toneIndigo
```

## Components

### Web interface

- [Route shell](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Meeting dashboard](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Meeting sidebar](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/components/Sidebar.jsx): `frontend/src/components/Sidebar.jsx`
- [Auth state](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/api/api.js): `frontend/src/api/api.js`
- [Landing page](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/pages/landingPage.jsx): `frontend/src/pages/landingPage.jsx`
- [Login page](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/pages/login.jsx): `frontend/src/pages/login.jsx`
- [Signup page](https://github.com/tearcake/nlp-mini/blob/main/frontend/src/pages/signup.jsx): `frontend/src/pages/signup.jsx`

### API and identity

- [FastAPI application](https://github.com/tearcake/nlp-mini/blob/main/backend/app.py): `backend/app.py`
- [Auth endpoints](https://github.com/tearcake/nlp-mini/blob/main/backend/routes/auth1.py): `backend/routes/auth1.py`
- [Meeting endpoints](https://github.com/tearcake/nlp-mini/blob/main/backend/routes/meeting.py): `backend/routes/meeting.py`
- [Chat endpoints](https://github.com/tearcake/nlp-mini/blob/main/backend/routes/chat.py): `backend/routes/chat.py`
- [JWT and passwords](https://github.com/tearcake/nlp-mini/blob/main/backend/auth/auth.py): `backend/auth/auth.py`

### Meeting intelligence

- [Processing pipeline](https://github.com/tearcake/nlp-mini/blob/main/backend/main.py): `backend/main.py`
- [Media preparation](https://github.com/tearcake/nlp-mini/blob/main/backend/utils/audio_processor.py): `backend/utils/audio_processor.py`
- [Transcription](https://github.com/tearcake/nlp-mini/blob/main/backend/core/transcriber.py): `backend/core/transcriber.py`
- [Insight extraction](https://github.com/tearcake/nlp-mini/blob/main/backend/core/extractor.py): `backend/core/extractor.py`
- [Summarization](https://github.com/tearcake/nlp-mini/blob/main/backend/core/summarize.py): `backend/core/summarize.py`
- [RAG question answering](https://github.com/tearcake/nlp-mini/blob/main/backend/core/rag_engine.py): `backend/core/rag_engine.py`

### Persistence

- [Vector index](https://github.com/tearcake/nlp-mini/blob/main/backend/core/vector_store.py): `backend/core/vector_store.py`
- [Database sessions](https://github.com/tearcake/nlp-mini/blob/main/backend/database/database.py): `backend/database/database.py`
- [User and meeting records](https://github.com/tearcake/nlp-mini/blob/main/backend/models/models.py): `backend/models/models.py`
- **Meeting database**

### Other components

- **Meeting user**
- **Groq model service**

## Connections

- Meeting user → Route shell: uses (evidence: `frontend/src/App.jsx`)
- Route shell → Landing page: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Login page: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Signup page: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Meeting dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Meeting dashboard → Meeting sidebar: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Meeting dashboard → API client: requests (evidence: `frontend/src/pages/Dashboard.jsx`)
- Auth state → API client: requests (evidence: `frontend/src/context/AuthContext.jsx`)
- Meeting dashboard → Auth state: uses (evidence: `frontend/src/pages/Dashboard.jsx`)
- Login page → Auth state: uses (evidence: `frontend/src/pages/login.jsx`)
- Signup page → Auth state: uses (evidence: `frontend/src/pages/signup.jsx`)
- API client → FastAPI application: calls API (evidence: `README.md`)
- FastAPI application → Auth endpoints: registers (evidence: `backend/app.py`)
- FastAPI application → Meeting endpoints: registers (evidence: `backend/app.py`)
- FastAPI application → Chat endpoints: registers (evidence: `backend/app.py`)
- Auth endpoints → JWT and passwords: uses (evidence: `backend/routes/auth1.py`)
- Auth endpoints → Database sessions: queries (evidence: `backend/routes/auth1.py`)
- Auth endpoints → User and meeting records: queries (evidence: `backend/routes/auth1.py`)
- JWT and passwords → Database sessions: uses (evidence: `backend/auth/auth.py`)
- JWT and passwords → User and meeting records: loads user (evidence: `backend/auth/auth.py`)
- Meeting endpoints → Processing pipeline: runs (evidence: `backend/routes/meeting.py`)
- Meeting endpoints → Database sessions: uses (evidence: `backend/routes/meeting.py`)
- Meeting endpoints → User and meeting records: stores meetings (evidence: `backend/routes/meeting.py`)
- Processing pipeline → Media preparation: prepares media (evidence: `backend/main.py`)
- Processing pipeline → Transcription: transcribes (evidence: `backend/main.py`)
- Processing pipeline → Insight extraction: extracts insights (evidence: `backend/main.py`)
- Processing pipeline → RAG question answering: indexes transcript (evidence: `backend/main.py`)
- RAG question answering → Vector index: retrieves and indexes (evidence: `backend/core/rag_engine.py`)
- Chat endpoints → RAG question answering: answers questions (evidence: `backend/routes/chat.py`)
- Chat endpoints → Vector index: builds index (evidence: `backend/routes/chat.py`)
- Chat endpoints → Database sessions: saves chat (evidence: `backend/routes/chat.py`)
- Chat endpoints → User and meeting records: uses records (evidence: `backend/routes/chat.py`)
- Chat endpoints → JWT and passwords: authenticates (evidence: `backend/routes/chat.py`)
- RAG question answering → Groq model service: prompts (evidence: `backend/core/rag_engine.py`)
- Database sessions → Meeting database: connects (evidence: `backend/database/database.py`)
- User and meeting records → Database sessions: uses base (evidence: `backend/models/models.py`)
