# jlawyerorg/j-lawyer-org architecture

> Architecture diagram of the GitHub repository jlawyerorg/j-lawyer-org, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jlawyerorg/j-lawyer-org
- Repository: https://github.com/jlawyerorg/j-lawyer-org

## Overview

j-lawyer.org is a legal-practice management application with a desktop client, a web frontend, server-side services and a separate backup/restore utility. A principal user workflow is to enter through a client or web interface, access case and document functions, and use server services for operations such as search and document handling. The repository also includes distinct capabilities for electronic legal communications, AI assistance, mass mailing and PDF previews. The excerpts establish only selected relationships; unverified wiring between frontends and backend services is intentionally omitted.

Main entry points: [`j-lawyer-web/frontend/src/app/app.routes.ts`](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/app.routes.ts) (Routes and access), [`j-lawyer-client/src/main/java/com/jdimension/jlawyer/services/JLawyerServiceLocator.java`](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/services/JLawyerServiceLocator.java) (Service lookup), [`j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/SearchService.java`](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/SearchService.java) (Search service), [`j-lawyer-web/frontend/src/main.ts`](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/main.ts) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_webapp["Web application<br/>[main.ts]"]
  node_web_routes["Routes and access<br/>[app.routes.ts]"]
  node_web_auth["Authentication<br/>[auth.service.ts]"]
  node_web_cases["Case workspace<br/>[cases.service.ts]"]
  node_web_contacts["Contacts"]
  node_web_calendar["Calendar"]
  node_web_bea["beA messaging<br/>[bea.service.ts]"]
  node_web_email["Email<br/>[email.service.ts]"]
  node_web_admin["User administration"]
end

subgraph group_desktop["Desktop client"]
  node_desktop_app["Desktop client<br/>[Main.java]"]
  node_desktop_settings["Client settings"]
  node_service_locator["Service lookup"]
  node_assistant["AI assistant"]
  node_bea_client["beA client"]
  node_massmail["Campaign management"]
end

subgraph group_server["Server services"]
  node_archive_api["Archive service API"]
  node_search_api["Search service API"]
  node_search_service["Search service<br/>[SearchService.java]"]
  node_archive_service["Archive operations"]
  node_preview_service["PDF preview jobs"]
  node_preview_generator["Preview generation"]
  node_preview_data["Preview data"]
  node_database_migrations["Database migrations"]
end

subgraph group_ops["Backup and restore"]
  node_backup_manager["Backup manager"]
  node_backup_ui["Backup controller"]
  node_restore["Restore executor"]
end

node_user(("Practice user"))

node_user -->|"uses"| node_webapp
node_webapp -->|"starts routing"| node_web_routes
node_web_routes -->|"guards routes"| node_web_auth
node_web_routes -->|"routes to"| node_web_cases
node_web_routes -->|"routes to"| node_web_contacts
node_web_routes -->|"routes to"| node_web_calendar
node_web_routes -->|"routes to"| node_web_bea
node_web_routes -->|"routes to"| node_web_email
node_web_routes -->|"routes to"| node_web_admin
node_user -->|"uses"| node_desktop_app
node_desktop_app -.->|"looks up services"| node_service_locator
node_service_locator -.->|"looks up"| node_archive_api
node_massmail -->|"uses services"| node_service_locator
node_search_service -->|"implements API"| node_search_api
node_search_service -->|"reads cases"| node_archive_service
node_archive_service -.->|"requests previews"| node_preview_service
node_preview_service -->|"creates or updates"| node_preview_generator
node_preview_generator -->|"produces"| node_preview_data
node_user -->|"requests restore"| node_backup_ui
node_backup_ui -->|"invokes"| node_restore
node_backup_manager -->|"dispatches restore"| node_restore

click node_webapp "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/main.ts"
click node_web_routes "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/app.routes.ts"
click node_web_auth "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/core/auth/auth.service.ts"
click node_web_cases "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/akten/cases.service.ts"
click node_web_contacts "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/contacts/contacts.service.ts"
click node_web_calendar "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/calendar/calendar.service.ts"
click node_web_bea "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/bea/bea.service.ts"
click node_web_email "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/communication/email.service.ts"
click node_web_admin "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/settings/users-admin.service.ts"
click node_desktop_app "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/Main.java"
click node_desktop_settings "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/settings/ClientSettings.java"
click node_service_locator "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/services/JLawyerServiceLocator.java"
click node_assistant "https://github.com/jlawyerorg/j-lawyer-org/tree/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/assistant"
click node_bea_client "https://github.com/jlawyerorg/j-lawyer-org/tree/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/bea"
click node_massmail "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/massmail/CampaignController.java"
click node_archive_api "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server-api/src/main/java/com/jdimension/jlawyer/services/ArchiveFileServiceRemote.java"
click node_search_api "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server-api/src/main/java/com/jdimension/jlawyer/services/SearchServiceRemote.java"
click node_search_service "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/SearchService.java"
click node_archive_service "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/ArchiveFileService.java"
click node_preview_service "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/PdfPreviewGenerationService.java"
click node_preview_generator "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/documents/PreviewGenerator.java"
click node_preview_data "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server-common/src/main/java/com/jdimension/jlawyer/documents/DocumentPreview.java"
click node_database_migrations "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server-entities/src/main/java/org/jlawyer/persistence/DatabaseMigrator.java"
click node_backup_manager "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/BackupManagerLauncher.java"
click node_backup_ui "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/controller/BackupMgrController.java"
click node_restore "https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/impl/RestoreExecutor.java"

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_webapp,node_web_routes,node_web_auth,node_web_cases,node_web_contacts,node_web_calendar,node_web_bea,node_web_email,node_web_admin,node_user toneBlue
class node_desktop_app,node_desktop_settings,node_service_locator,node_assistant,node_bea_client,node_massmail toneAmber
class node_archive_api,node_search_api,node_search_service,node_archive_service,node_preview_service,node_preview_generator,node_preview_data,node_database_migrations toneMint
class node_backup_manager,node_backup_ui,node_restore toneRose
```

## Components

### Web client

- [Web application](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/main.ts): `j-lawyer-web/frontend/src/main.ts`
- [Routes and access](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/app.routes.ts): `j-lawyer-web/frontend/src/app/app.routes.ts`
- [Authentication](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/core/auth/auth.service.ts): `j-lawyer-web/frontend/src/app/core/auth/auth.service.ts`
- [Case workspace](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/akten/cases.service.ts): `j-lawyer-web/frontend/src/app/akten/cases.service.ts`
- [Contacts](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/contacts/contacts.service.ts): `j-lawyer-web/frontend/src/app/contacts/contacts.service.ts`
- [Calendar](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/calendar/calendar.service.ts): `j-lawyer-web/frontend/src/app/calendar/calendar.service.ts`
- [beA messaging](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/bea/bea.service.ts): `j-lawyer-web/frontend/src/app/bea/bea.service.ts`
- [Email](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/communication/email.service.ts): `j-lawyer-web/frontend/src/app/communication/email.service.ts`
- [User administration](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-web/frontend/src/app/settings/users-admin.service.ts): `j-lawyer-web/frontend/src/app/settings/users-admin.service.ts`

### Desktop client

- [Desktop client](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/Main.java): `j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/Main.java`
- [Client settings](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/settings/ClientSettings.java): `j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/settings/ClientSettings.java`
- [Service lookup](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/services/JLawyerServiceLocator.java): `j-lawyer-client/src/main/java/com/jdimension/jlawyer/services/JLawyerServiceLocator.java`
- [AI assistant](https://github.com/jlawyerorg/j-lawyer-org/tree/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/assistant): `j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/assistant`
- [beA client](https://github.com/jlawyerorg/j-lawyer-org/tree/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/bea): `j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/bea`
- [Campaign management](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/massmail/CampaignController.java): `j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/massmail/CampaignController.java`

### Server services

- [Archive service API](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server-api/src/main/java/com/jdimension/jlawyer/services/ArchiveFileServiceRemote.java): `j-lawyer-server-api/src/main/java/com/jdimension/jlawyer/services/ArchiveFileServiceRemote.java`
- [Search service API](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server-api/src/main/java/com/jdimension/jlawyer/services/SearchServiceRemote.java): `j-lawyer-server-api/src/main/java/com/jdimension/jlawyer/services/SearchServiceRemote.java`
- [Search service](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/SearchService.java): `j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/SearchService.java`
- [Archive operations](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/ArchiveFileService.java): `j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/ArchiveFileService.java`
- [PDF preview jobs](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/PdfPreviewGenerationService.java): `j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/PdfPreviewGenerationService.java`
- [Preview generation](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/documents/PreviewGenerator.java): `j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/documents/PreviewGenerator.java`
- [Preview data](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server-common/src/main/java/com/jdimension/jlawyer/documents/DocumentPreview.java): `j-lawyer-server-common/src/main/java/com/jdimension/jlawyer/documents/DocumentPreview.java`
- [Database migrations](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-server-entities/src/main/java/org/jlawyer/persistence/DatabaseMigrator.java): `j-lawyer-server-entities/src/main/java/org/jlawyer/persistence/DatabaseMigrator.java`

### Backup and restore

- [Backup manager](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/BackupManagerLauncher.java): `j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/BackupManagerLauncher.java`
- [Backup controller](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/controller/BackupMgrController.java): `j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/controller/BackupMgrController.java`
- [Restore executor](https://github.com/jlawyerorg/j-lawyer-org/blob/master/j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/impl/RestoreExecutor.java): `j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/impl/RestoreExecutor.java`

### Other components

- **Practice user**

## Connections

- Practice user → Web application: uses
- Web application → Routes and access: starts routing (evidence: `j-lawyer-web/frontend/src/main.ts`)
- Routes and access → Authentication: guards routes (evidence: `j-lawyer-web/frontend/src/app/app.routes.ts`)
- Routes and access → Case workspace: routes to (evidence: `j-lawyer-web/frontend/src/app/app.routes.ts`)
- Routes and access → Contacts: routes to (evidence: `j-lawyer-web/frontend/src/app/app.routes.ts`)
- Routes and access → Calendar: routes to (evidence: `j-lawyer-web/frontend/src/app/app.routes.ts`)
- Routes and access → beA messaging: routes to (evidence: `j-lawyer-web/frontend/src/app/app.routes.ts`)
- Routes and access → Email: routes to (evidence: `j-lawyer-web/frontend/src/app/app.routes.ts`)
- Routes and access → User administration: routes to (evidence: `j-lawyer-web/frontend/src/app/app.routes.ts`)
- Practice user → Desktop client: uses
- Desktop client → Service lookup: looks up services
- Service lookup → Archive service API: looks up (evidence: `j-lawyer-client/src/main/java/com/jdimension/jlawyer/services/JLawyerServiceLocator.java`)
- Campaign management → Service lookup: uses services (evidence: `j-lawyer-client/src/main/java/com/jdimension/jlawyer/client/massmail/CampaignController.java`)
- Search service → Search service API: implements API (evidence: `j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/SearchService.java`)
- Search service → Archive operations: reads cases
- Archive operations → PDF preview jobs: requests previews
- PDF preview jobs → Preview generation: creates or updates (evidence: `j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/PdfPreviewGenerationService.java`)
- Preview generation → Preview data: produces (evidence: `j-lawyer-server/j-lawyer-server-ejb/src/main/java/com/jdimension/jlawyer/services/PdfPreviewGenerationService.java`)
- Practice user → Backup controller: requests restore
- Backup controller → Restore executor: invokes (evidence: `j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/controller/BackupMgrController.java`)
- Backup manager → Restore executor: dispatches restore (evidence: `j-lawyer-backupmgr/src/main/java/org/jlawyer/backupmgr/BackupManagerLauncher.java`)
