# tanzeem3210/wp-smart-link-search architecture

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

- Interactive diagram: https://gitdiagram.com/tanzeem3210/wp-smart-link-search
- Repository: https://github.com/tanzeem3210/wp-smart-link-search

## Overview

This is a small WhatsApp chat-link search application. A user uploads a .txt export; the API parses messages and URLs, stores chats, messages, and links, then searches message text and returns nearby links. The graph also includes chat listing and the browser UI. Relationships are based on the supplied source excerpts; no README content was provided.

Main entry points: [`backend/app/main.py`](https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/main.py) (HTTP API), [`frontend/app.js`](https://github.com/tanzeem3210/wp-smart-link-search/blob/main/frontend/app.js) (Upload and search UI), [`backend/app/services/chat_parser.py`](https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/services/chat_parser.py) (Export parser), [`backend/app/db/database.py`](https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/db/database.py) (Chat database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Browser interface"]
  node_browser["Upload and search UI<br/>[app.js]"]
end

subgraph group_api["API workflows"]
  node_api_service["HTTP API<br/>[main.py]"]
end

subgraph group_processing["Chat processing"]
  node_parser["Export parser<br/>[chat_parser.py]"]
end

subgraph group_persistence["Persistence"]
  node_sqlite[("Chat database<br/>[database.py]")]
end

node_user(("User"))

node_user -->|"uploads and searches"| node_browser
node_browser -->|"sends requests"| node_api_service
node_api_service -->|"parses export"| node_parser
node_api_service -->|"reads and writes"| node_sqlite
node_api_service -->|"serves interface"| node_browser

click node_browser "https://github.com/tanzeem3210/wp-smart-link-search/blob/main/frontend/app.js"
click node_api_service "https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/main.py"
click node_parser "https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/services/chat_parser.py"
click node_sqlite "https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/db/database.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_browser,node_user toneBlue
class node_api_service toneAmber
class node_parser toneMint
class node_sqlite toneRose
```

## Components

### Browser interface

- [Upload and search UI](https://github.com/tanzeem3210/wp-smart-link-search/blob/main/frontend/app.js): `frontend/app.js`

### API workflows

- [HTTP API](https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/main.py): `backend/app/main.py`

### Chat processing

- [Export parser](https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/services/chat_parser.py): `backend/app/services/chat_parser.py`

### Persistence

- [Chat database](https://github.com/tanzeem3210/wp-smart-link-search/blob/main/backend/app/db/database.py): `backend/app/db/database.py`

### Other components

- **User**

## Connections

- User → Upload and search UI: uploads and searches (evidence: `frontend/app.js`)
- Upload and search UI → HTTP API: sends requests (evidence: `frontend/app.js`)
- HTTP API → Export parser: parses export (evidence: `backend/app/main.py`)
- HTTP API → Chat database: reads and writes (evidence: `backend/app/main.py`)
- HTTP API → Upload and search UI: serves interface (evidence: `backend/app/main.py`)
