# delightech25/outcome-focused-summarization-of-court-judgments architecture

> Architecture diagram of the GitHub repository delightech25/outcome-focused-summarization-of-court-judgments, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/delightech25/outcome-focused-summarization-of-court-judgments
- Repository: https://github.com/delightech25/outcome-focused-summarization-of-court-judgments

## Overview

This is a Flask web application for producing concise, outcome-focused summaries of court judgments. The user workflow is to register or log in, open the protected dashboard, provide judgment text or upload a .txt file, and view the generated summary. Authentication and analysis routing are handled in app.py; credentials are stored locally, while model.py applies a Hugging Face summarization pipeline. The README documents these capabilities; source excerpts show the route and model calls, but the HTML templates and data files were not inspected.

Main entry points: [`101-Outcome-Focused Summarization of Court Judgments/app.py`](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/app.py) (Flask routes), [`101-Outcome-Focused Summarization of Court Judgments/model.py`](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/model.py) (Summary generation), [`101-Outcome-Focused Summarization of Court Judgments/templates/login.html`](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/login.html) (Login page), [`101-Outcome-Focused Summarization of Court Judgments/templates/register.html`](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/register.html) (Registration page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["Flask routes<br/>[app.py]"]
  node_login["Login page<br/>[login.html]"]
  node_registration["Registration page<br/>[register.html]"]
  node_dashboard["Analysis dashboard<br/>[dashboard.html]"]
  node_result["Summary result<br/>[result.html]"]
end

subgraph group_identity["User identity"]
  node_session["Session access<br/>[app.py]"]
  node_users[("Credential store<br/>[users.json]")]
end

subgraph group_summarization["Summarization"]
  node_analysis["Text and file handling<br/>[app.py]"]
  node_summary["Summary generation<br/>[model.py]"]
  node_pipeline{{"Transformers pipeline"}}
  node_distilbart{{"DistilBART model"}}
end

node_user(("Legal user"))

node_user -->|"opens"| node_login
node_user -->|"registers"| node_registration
node_user -->|"provides text or file"| node_dashboard
node_app -->|"renders"| node_login
node_app -->|"renders"| node_registration
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_result
node_app -->|"reads and writes"| node_users
node_app -->|"sets and checks"| node_session
node_app -->|"routes analysis"| node_analysis
node_analysis -->|"calls"| node_summary
node_summary -->|"invokes"| node_pipeline
node_pipeline -->|"uses model"| node_distilbart
node_analysis -->|"passes summary"| node_result

click node_app "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/app.py"
click node_login "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/login.html"
click node_registration "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/register.html"
click node_dashboard "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/dashboard.html"
click node_result "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/result.html"
click node_session "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/app.py"
click node_users "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/users.json"
click node_analysis "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/app.py"
click node_summary "https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/model.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,node_login,node_registration,node_dashboard,node_result,node_user toneBlue
class node_session,node_users toneAmber
class node_analysis,node_summary,node_pipeline,node_distilbart toneMint
```

## Components

### Web experience

- [Flask routes](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/app.py): `101-Outcome-Focused Summarization of Court Judgments/app.py`
- [Login page](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/login.html): `101-Outcome-Focused Summarization of Court Judgments/templates/login.html`
- [Registration page](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/register.html): `101-Outcome-Focused Summarization of Court Judgments/templates/register.html`
- [Analysis dashboard](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/dashboard.html): `101-Outcome-Focused Summarization of Court Judgments/templates/dashboard.html`
- [Summary result](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/templates/result.html): `101-Outcome-Focused Summarization of Court Judgments/templates/result.html`

### User identity

- [Session access](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/app.py): `101-Outcome-Focused Summarization of Court Judgments/app.py`
- [Credential store](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/users.json): `101-Outcome-Focused Summarization of Court Judgments/users.json`

### Summarization

- [Text and file handling](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/app.py): `101-Outcome-Focused Summarization of Court Judgments/app.py`
- [Summary generation](https://github.com/delightech25/outcome-focused-summarization-of-court-judgments/blob/main/101-Outcome-Focused%20Summarization%20of%20Court%20Judgments/model.py): `101-Outcome-Focused Summarization of Court Judgments/model.py`
- **Transformers pipeline**
- **DistilBART model**

### Other components

- **Legal user**

## Connections

- Legal user → Login page: opens (evidence: `README.md`)
- Legal user → Registration page: registers (evidence: `README.md`)
- Legal user → Analysis dashboard: provides text or file (evidence: `README.md`)
- Flask routes → Login page: renders (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
- Flask routes → Registration page: renders (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
- Flask routes → Analysis dashboard: renders (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
- Flask routes → Summary result: renders (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
- Flask routes → Credential store: reads and writes (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
- Flask routes → Session access: sets and checks (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
- Flask routes → Text and file handling: routes analysis (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
- Text and file handling → Summary generation: calls (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
- Summary generation → Transformers pipeline: invokes (evidence: `101-Outcome-Focused Summarization of Court Judgments/model.py`)
- Transformers pipeline → DistilBART model: uses model
- Text and file handling → Summary result: passes summary (evidence: `101-Outcome-Focused Summarization of Court Judgments/app.py`)
