# dhriti143/ai-text-summariser architecture

> Architecture diagram of the GitHub repository dhriti143/ai-text-summariser, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dhriti143/ai-text-summariser
- Repository: https://github.com/dhriti143/ai-text-summariser

## Overview

This is a browser-based text summarizer: users enter text, the frontend submits it to the Express API, the API requests a BART summary from Hugging Face, and the summary is returned for display. The server also serves the public assets. The README documents responsive styling; the HTML and stylesheet contents were not sampled, so their detailed wiring is not shown.

Main entry points: [`index.js`](https://github.com/dhriti143/ai-text-summariser/blob/main/index.js) (Express API), [`public/script.js`](https://github.com/dhriti143/ai-text-summariser/blob/main/public/script.js) (UI behavior), [`public/index.html`](https://github.com/dhriti143/ai-text-summariser/blob/main/public/index.html) (Web page), [`public/stylesheet.css`](https://github.com/dhriti143/ai-text-summariser/blob/main/public/stylesheet.css) (Responsive styles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_page["Web page<br/>[index.html]"]
  node_client["UI behavior<br/>[script.js]"]
  node_styles["Responsive styles<br/>[stylesheet.css]"]
end

subgraph group_backend["API server"]
  node_server["Express API<br/>[index.js]"]
end

subgraph group_inference["Summarization"]
end

node_user(("User"))
node_hf["Hugging Face BART"]

node_user -->|"enters text"| node_page
node_server -->|"serves assets"| node_page
node_server -->|"serves assets"| node_client
node_server -->|"serves assets"| node_styles
node_page -->|"runs interface"| node_client
node_client -->|"posts text"| node_server
node_server -->|"requests summary"| node_hf
node_hf -->|"returns summary"| node_server
node_server -->|"returns summary"| node_client
node_client -->|"displays summary"| node_user

click node_page "https://github.com/dhriti143/ai-text-summariser/blob/main/public/index.html"
click node_client "https://github.com/dhriti143/ai-text-summariser/blob/main/public/script.js"
click node_styles "https://github.com/dhriti143/ai-text-summariser/blob/main/public/stylesheet.css"
click node_server "https://github.com/dhriti143/ai-text-summariser/blob/main/index.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_page,node_client,node_styles,node_user toneBlue
class node_server toneAmber
class node_hf toneIndigo
```

## Components

### Web interface

- [Web page](https://github.com/dhriti143/ai-text-summariser/blob/main/public/index.html): `public/index.html`
- [UI behavior](https://github.com/dhriti143/ai-text-summariser/blob/main/public/script.js): `public/script.js`
- [Responsive styles](https://github.com/dhriti143/ai-text-summariser/blob/main/public/stylesheet.css): `public/stylesheet.css`

### API server

- [Express API](https://github.com/dhriti143/ai-text-summariser/blob/main/index.js): `index.js`

### Other components

- **User**
- **Hugging Face BART**

## Connections

- User → Web page: enters text
- Express API → Web page: serves assets
- Express API → UI behavior: serves assets
- Express API → Responsive styles: serves assets
- Web page → UI behavior: runs interface
- UI behavior → Express API: posts text
- Express API → Hugging Face BART: requests summary
- Hugging Face BART → Express API: returns summary
- Express API → UI behavior: returns summary
- UI behavior → User: displays summary
