# bashyazada-spec/juridicasimandolaw architecture

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

- Interactive diagram: https://gitdiagram.com/bashyazada-spec/juridicasimandolaw
- Repository: https://github.com/bashyazada-spec/juridicasimandolaw

## Overview

Simando Law is a browser-based law-practice case management system with desktop, tablet and mobile entry points. Users enter the responsive app, sign in, load firm profiles and cases, then manage case records, documents, schedules, notifications and collaboration. The sampled controller and data modules show case lifecycle, in-memory state, encryption and Firestore-backed persistence; analyzer and Drive add document intake and external file storage. README content is absent, so capability coverage relies on the provided tree and excerpts; unsampled feature links are omitted where callers are not evidenced.

Main entry points: [`js/app.js`](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/app.js) (Case lifecycle), [`js/data.js`](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/data.js) (Domain data layer), [`js/ui.js`](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/ui.js) (Case and calendar UI), [`js/chat.js`](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/chat.js) (Chat and appointments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_router["Device router<br/>[redirect.js]"]
  node_pwa["Offline app shell<br/>[sw.js]"]
end

subgraph group_cases["Case work"]
  node_caseui["Case lifecycle<br/>[app.js]"]
  node_presentation["Case and calendar UI<br/>[ui.js]"]
  node_analyzer["Document analyzer<br/>[analyzer.js]"]
  node_drive["Drive files<br/>[drive.js]"]
end

subgraph group_collab["Collaboration"]
  node_chat["Chat and appointments<br/>[chat.js]"]
end

subgraph group_platform["Data and integrations"]
  node_data["Domain data layer<br/>[data.js]"]
  node_firebase["Firebase adapter<br/>[firebase-init.js]"]
  node_firestore[("Firestore")]
  node_config["Case configuration<br/>[config.js]"]
end

node_user(("Law firm user"))
node_google["Google Drive API"]

node_user -->|"opens app"| node_router
node_router -.->|"routes device"| node_caseui
node_caseui -->|"loads cases"| node_data
node_caseui -.->|"uses categories"| node_config
node_caseui -.->|"renders views"| node_presentation
node_presentation -->|"deletes files"| node_drive
node_presentation -->|"updates records"| node_data
node_data -.->|"persists records"| node_firebase
node_firebase -->|"reads and writes"| node_firestore
node_caseui -->|"writes security data"| node_firestore
node_drive -->|"uploads and manages"| node_google
node_chat -->|"stores messages"| node_firestore
node_chat -->|"adds appointments"| node_data
node_pwa -.->|"serves cached app"| node_user

click node_router "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/redirect.js"
click node_caseui "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/app.js"
click node_presentation "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/ui.js"
click node_analyzer "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/analyzer.js"
click node_drive "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/drive.js"
click node_chat "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/chat.js"
click node_data "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/data.js"
click node_firebase "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/firebase-init.js"
click node_config "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/config.js"
click node_pwa "https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/sw.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_router,node_pwa,node_user toneBlue
class node_caseui,node_presentation,node_analyzer,node_drive toneAmber
class node_chat,node_google toneMint
class node_data,node_firebase,node_firestore,node_config toneRose
```

## Components

### App entry

- [Device router](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/redirect.js): `js/redirect.js`
- [Offline app shell](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/sw.js): `sw.js`

### Case work

- [Case lifecycle](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/app.js): `js/app.js`
- [Case and calendar UI](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/ui.js): `js/ui.js`
- [Document analyzer](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/analyzer.js): `js/analyzer.js`
- [Drive files](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/drive.js): `js/drive.js`

### Collaboration

- [Chat and appointments](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/chat.js): `js/chat.js`

### Data and integrations

- [Domain data layer](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/data.js): `js/data.js`
- [Firebase adapter](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/firebase-init.js): `js/firebase-init.js`
- **Firestore**
- [Case configuration](https://github.com/bashyazada-spec/juridicasimandolaw/blob/main/js/config.js): `js/config.js`

### Other components

- **Law firm user**
- **Google Drive API**

## Connections

- Law firm user → Device router: opens app (evidence: `js/redirect.js`)
- Device router → Case lifecycle: routes device
- Case lifecycle → Domain data layer: loads cases (evidence: `js/app.js`)
- Case lifecycle → Case configuration: uses categories
- Case lifecycle → Case and calendar UI: renders views
- Case and calendar UI → Drive files: deletes files (evidence: `js/ui.js`)
- Case and calendar UI → Domain data layer: updates records (evidence: `js/ui.js`)
- Domain data layer → Firebase adapter: persists records
- Firebase adapter → Firestore: reads and writes (evidence: `js/firebase-init.js`)
- Case lifecycle → Firestore: writes security data (evidence: `js/app.js`)
- Drive files → Google Drive API: uploads and manages (evidence: `js/drive.js`)
- Chat and appointments → Firestore: stores messages (evidence: `js/chat.js`)
- Chat and appointments → Domain data layer: adds appointments (evidence: `js/chat.js`)
- Offline app shell → Law firm user: serves cached app
