# shubhamjha014/onit_clone architecture

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

- Interactive diagram: https://gitdiagram.com/shubhamjha014/onit_clone
- Repository: https://github.com/shubhamjha014/onit_clone

## Overview

Legal Management Portal is a Flask/PostgreSQL application for managing legal matters and related operational records. Users log in, then work through a live dashboard or the matter, invoice, contact, and task applications; matter records connect to budgets, allocations, participants, comments, activities, tasks, and invoices. Settings, reference lists, vendors, vendor assignments, and chatbot screens are additional registered capabilities. Routes render Jinja templates and read or write database records. The README and sampled source support the main workflows; several peripheral route implementations were not sampled, so their internal wiring is not inferred.

Main entry points: [`app/models`](https://github.com/shubhamjha014/onit_clone/tree/master/app/models) (Domain models), [`app/routes/matters.py`](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/matters.py) (Matter management), [`app/__init__.py`](https://github.com/shubhamjha014/onit_clone/blob/master/app/__init__.py) (Flask app), [`app/routes/invoices.py`](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/invoices.py) (Invoices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and UI"]
  node_app["Flask app<br/>[__init__.py]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_auth_service["Session auth<br/>[auth_service.py]"]
  node_web_ui["Jinja screens"]
end

subgraph group_work["Legal work"]
  node_dashboard["Dashboard<br/>[home.py]"]
  node_matters["Matter management<br/>[matters.py]"]
  node_matter_service["Matter services<br/>[matter_service.py]"]
  node_invoices["Invoices<br/>[invoices.py]"]
  node_tasks["Tasks<br/>[tasks.py]"]
  node_contacts["Contacts<br/>[contacts.py]"]
  node_matter_views["Matter screens"]
  node_invoice_views["Invoice screens"]
  node_task_views["Task screens"]
  node_contact_views["Contact screens"]
end

subgraph group_operations["Operations"]
  node_vendors["Vendor records<br/>[vendors.py]"]
  node_vatms["Matter assignments<br/>[vatms.py]"]
  node_settings["Administration<br/>[settings.py]"]
  node_lists["Reference lists<br/>[lists.py]"]
  node_chat["Chat interface<br/>[chats.py]"]
end

subgraph group_data["Persistence"]
  node_models["Domain models"]
  node_database[("PostgreSQL")]
end

node_user(("Portal user"))

node_user -->|"uses"| node_app
node_app -->|"registers"| node_auth_routes
node_app -->|"renders"| node_web_ui
node_auth_routes -->|"authenticates"| node_auth_service
node_auth_service -->|"loads user"| node_models
node_user -->|"opens"| node_dashboard
node_user -->|"manages matters"| node_matters
node_user -->|"manages invoices"| node_invoices
node_user -->|"manages tasks"| node_tasks
node_user -->|"manages contacts"| node_contacts
node_user -->|"manages vendors"| node_vendors
node_user -->|"manages assignments"| node_vatms
node_user -->|"administers"| node_settings
node_user -->|"maintains lists"| node_lists
node_user -->|"uses chat"| node_chat
node_dashboard -->|"queries live data"| node_models
node_matters -->|"uses numbering and logs"| node_matter_service
node_matters -->|"reads and writes"| node_models
node_invoices -->|"reads and writes"| node_models
node_tasks -->|"reads and writes"| node_models
node_contacts -->|"reads and writes"| node_models
node_vendors -->|"reads and writes"| node_models
node_vatms -->|"reads and writes"| node_models
node_settings -->|"reads and writes"| node_models
node_lists -->|"reads and writes"| node_models
node_matter_service -->|"queries and records"| node_models
node_models -->|"persists records"| node_database
node_matters -->|"renders"| node_matter_views
node_invoices -->|"renders"| node_invoice_views
node_tasks -->|"renders"| node_task_views
node_contacts -->|"renders"| node_contact_views

click node_app "https://github.com/shubhamjha014/onit_clone/blob/master/app/__init__.py"
click node_auth_routes "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/auth.py"
click node_auth_service "https://github.com/shubhamjha014/onit_clone/blob/master/app/services/auth_service.py"
click node_web_ui "https://github.com/shubhamjha014/onit_clone/tree/master/app/templates"
click node_dashboard "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/home.py"
click node_matters "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/matters.py"
click node_matter_service "https://github.com/shubhamjha014/onit_clone/blob/master/app/services/matter_service.py"
click node_invoices "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/invoices.py"
click node_tasks "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/tasks.py"
click node_contacts "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/contacts.py"
click node_matter_views "https://github.com/shubhamjha014/onit_clone/tree/master/app/templates/matters"
click node_invoice_views "https://github.com/shubhamjha014/onit_clone/tree/master/app/templates/invoices"
click node_task_views "https://github.com/shubhamjha014/onit_clone/tree/master/app/templates/tasks"
click node_contact_views "https://github.com/shubhamjha014/onit_clone/tree/master/app/templates/contacts"
click node_vendors "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/vendors.py"
click node_vatms "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/vatms.py"
click node_settings "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/settings.py"
click node_lists "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/lists.py"
click node_chat "https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/chats.py"
click node_models "https://github.com/shubhamjha014/onit_clone/tree/master/app/models"

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_auth_routes,node_auth_service,node_web_ui,node_user toneBlue
class node_dashboard,node_matters,node_matter_service,node_invoices,node_tasks,node_contacts,node_matter_views,node_invoice_views,node_task_views,node_contact_views toneAmber
class node_vendors,node_vatms,node_settings,node_lists,node_chat toneMint
class node_models,node_database toneRose
```

## Components

### Access and UI

- [Flask app](https://github.com/shubhamjha014/onit_clone/blob/master/app/__init__.py): `app/__init__.py`
- [Authentication](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/auth.py): `app/routes/auth.py`
- [Session auth](https://github.com/shubhamjha014/onit_clone/blob/master/app/services/auth_service.py): `app/services/auth_service.py`
- [Jinja screens](https://github.com/shubhamjha014/onit_clone/tree/master/app/templates): `app/templates`

### Legal work

- [Dashboard](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/home.py): `app/routes/home.py`
- [Matter management](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/matters.py): `app/routes/matters.py`
- [Matter services](https://github.com/shubhamjha014/onit_clone/blob/master/app/services/matter_service.py): `app/services/matter_service.py`
- [Invoices](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/invoices.py): `app/routes/invoices.py`
- [Tasks](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/tasks.py): `app/routes/tasks.py`
- [Contacts](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/contacts.py): `app/routes/contacts.py`
- [Matter screens](https://github.com/shubhamjha014/onit_clone/tree/master/app/templates/matters): `app/templates/matters`
- [Invoice screens](https://github.com/shubhamjha014/onit_clone/tree/master/app/templates/invoices): `app/templates/invoices`
- [Task screens](https://github.com/shubhamjha014/onit_clone/tree/master/app/templates/tasks): `app/templates/tasks`
- [Contact screens](https://github.com/shubhamjha014/onit_clone/tree/master/app/templates/contacts): `app/templates/contacts`

### Operations

- [Vendor records](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/vendors.py): `app/routes/vendors.py`
- [Matter assignments](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/vatms.py): `app/routes/vatms.py`
- [Administration](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/settings.py): `app/routes/settings.py`
- [Reference lists](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/lists.py): `app/routes/lists.py`
- [Chat interface](https://github.com/shubhamjha014/onit_clone/blob/master/app/routes/chats.py): `app/routes/chats.py`

### Persistence

- [Domain models](https://github.com/shubhamjha014/onit_clone/tree/master/app/models): `app/models`
- **PostgreSQL**

### Other components

- **Portal user**

## Connections

- Portal user → Flask app: uses
- Flask app → Authentication: registers
- Flask app → Jinja screens: renders
- Authentication → Session auth: authenticates
- Session auth → Domain models: loads user
- Portal user → Dashboard: opens
- Portal user → Matter management: manages matters
- Portal user → Invoices: manages invoices
- Portal user → Tasks: manages tasks
- Portal user → Contacts: manages contacts
- Portal user → Vendor records: manages vendors
- Portal user → Matter assignments: manages assignments
- Portal user → Administration: administers
- Portal user → Reference lists: maintains lists
- Portal user → Chat interface: uses chat
- Dashboard → Domain models: queries live data
- Matter management → Matter services: uses numbering and logs
- Matter management → Domain models: reads and writes
- Invoices → Domain models: reads and writes
- Tasks → Domain models: reads and writes
- Contacts → Domain models: reads and writes
- Vendor records → Domain models: reads and writes
- Matter assignments → Domain models: reads and writes
- Administration → Domain models: reads and writes
- Reference lists → Domain models: reads and writes
- Matter services → Domain models: queries and records
- Domain models → PostgreSQL: persists records
- Matter management → Matter screens: renders
- Invoices → Invoice screens: renders
- Tasks → Task screens: renders
- Contacts → Contact screens: renders
