# wishwa2002/intelligent-legal-service architecture

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

- Interactive diagram: https://gitdiagram.com/wishwa2002/intelligent-legal-service
- Repository: https://github.com/wishwa2002/intelligent-legal-service

## Overview

The repository combines a legal-services landing page with an ASP.NET API and a relational domain model. The visible user-facing frontend renders the landing page and its service, process, AI, and about sections. The backend exposes a registration flow that checks users and roles and persists account data; the models also represent lawyer matching and availability, appointments, documentation, careers, service requests, and agent workflows. The excerpts show data relationships, not runtime handlers for most of those domains, so those branches are shown as modeled capabilities rather than connected request pipelines.

Main entry points: [`backend/LegalService.API/Data/ApplicationDbContext.cs`](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Data/ApplicationDbContext.cs) (EF data context), [`backend/LegalService.API/Models/Entities/AgentWorkflow.cs`](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/AgentWorkflow.cs) (Agent workflows), [`backend/LegalService.API/Controllers/AuthController.cs`](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Controllers/AuthController.cs) (Auth controller), [`frontend/src/App.tsx`](https://github.com/wishwa2002/intelligent-legal-service/blob/main/frontend/src/App.tsx) (Frontend app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Landing frontend"]
  node_app["Frontend app<br/>[App.tsx]"]
  node_landing["Landing page<br/>[LandingPage.tsx]"]
  node_landing_sections["Landing sections"]
end

subgraph group_identity["Identity"]
  node_auth_controller["Auth controller<br/>[AuthController.cs]"]
  node_auth_dtos["Auth request/response<br/>[DTOs]"]
  node_user_role["Users and roles<br/>[User.cs]"]
end

subgraph group_legal["Legal services"]
  node_lawyer_profile["Lawyer profiles<br/>[Lawyer.cs]"]
  node_legal_services["Legal services<br/>[LegalService.cs]"]
  node_appointments["Appointments<br/>[Appointment.cs]"]
  node_availability["Lawyer availability"]
end

subgraph group_operations["Case operations"]
  node_documentation["Documentation requests"]
  node_documentation_catalog["Documentation catalog"]
  node_career["Careers and applications<br/>[Career.cs]"]
  node_service_requests["Service requests<br/>[ServiceRequest.cs]"]
  node_agent_workflow["Agent workflows<br/>[AgentWorkflow.cs]"]
  node_workflow_steps["Workflow steps and tools<br/>[AgentStep.cs]"]
  node_workflow_results["Workflow decisions"]
end

subgraph group_persistence["Persistence"]
  node_db_context["EF data context"]
  node_database[("Application database")]
end

node_visitor(("Site visitor"))

node_visitor -.->|"opens"| node_app
node_app -->|"renders"| node_landing
node_landing -->|"renders"| node_landing_sections
node_auth_controller -->|"accepts"| node_auth_dtos
node_auth_controller -->|"queries and saves"| node_db_context
node_db_context -.->|"maps entities"| node_database
node_db_context -->|"configures"| node_user_role
node_db_context -->|"configures"| node_lawyer_profile
node_db_context -->|"configures"| node_legal_services
node_db_context -->|"configures"| node_appointments
node_db_context -->|"configures"| node_availability
node_db_context -->|"configures"| node_documentation
node_db_context -->|"configures"| node_documentation_catalog
node_db_context -->|"configures"| node_career
node_db_context -->|"configures"| node_service_requests
node_db_context -->|"configures"| node_agent_workflow
node_agent_workflow -->|"references"| node_service_requests
node_agent_workflow -->|"contains"| node_workflow_steps
node_agent_workflow -->|"tracks decisions"| node_workflow_results

click node_app "https://github.com/wishwa2002/intelligent-legal-service/blob/main/frontend/src/App.tsx"
click node_landing "https://github.com/wishwa2002/intelligent-legal-service/blob/main/frontend/src/pages/LandingPage.tsx"
click node_landing_sections "https://github.com/wishwa2002/intelligent-legal-service/tree/main/frontend/src/components/common"
click node_auth_controller "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Controllers/AuthController.cs"
click node_auth_dtos "https://github.com/wishwa2002/intelligent-legal-service/tree/main/backend/LegalService.API/DTOs"
click node_user_role "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/User.cs"
click node_lawyer_profile "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/Lawyer.cs"
click node_legal_services "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/LegalService.cs"
click node_appointments "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/Appointment.cs"
click node_availability "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/LawyerAvailability.cs"
click node_documentation "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/DocumentationRequest.cs"
click node_documentation_catalog "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/DocumentationService.cs"
click node_career "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/Career.cs"
click node_service_requests "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/ServiceRequest.cs"
click node_agent_workflow "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/AgentWorkflow.cs"
click node_workflow_steps "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/AgentStep.cs"
click node_workflow_results "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/ApprovalDecision.cs"
click node_db_context "https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Data/ApplicationDbContext.cs"

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_landing,node_landing_sections toneBlue
class node_auth_controller,node_auth_dtos,node_user_role toneAmber
class node_lawyer_profile,node_legal_services,node_appointments,node_availability toneMint
class node_documentation,node_documentation_catalog,node_career,node_service_requests,node_agent_workflow,node_workflow_steps,node_workflow_results toneRose
class node_db_context,node_database,node_visitor toneIndigo
```

## Components

### Landing frontend

- [Frontend app](https://github.com/wishwa2002/intelligent-legal-service/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Landing page](https://github.com/wishwa2002/intelligent-legal-service/blob/main/frontend/src/pages/LandingPage.tsx): `frontend/src/pages/LandingPage.tsx`
- [Landing sections](https://github.com/wishwa2002/intelligent-legal-service/tree/main/frontend/src/components/common): `frontend/src/components/common`

### Identity

- [Auth controller](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Controllers/AuthController.cs): `backend/LegalService.API/Controllers/AuthController.cs`
- [Auth request/response](https://github.com/wishwa2002/intelligent-legal-service/tree/main/backend/LegalService.API/DTOs): `backend/LegalService.API/DTOs`
- [Users and roles](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/User.cs): `backend/LegalService.API/Models/Entities/User.cs`

### Legal services

- [Lawyer profiles](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/Lawyer.cs): `backend/LegalService.API/Models/Entities/Lawyer.cs`
- [Legal services](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/LegalService.cs): `backend/LegalService.API/Models/Entities/LegalService.cs`
- [Appointments](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/Appointment.cs): `backend/LegalService.API/Models/Entities/Appointment.cs`
- [Lawyer availability](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/LawyerAvailability.cs): `backend/LegalService.API/Models/Entities/LawyerAvailability.cs`

### Case operations

- [Documentation requests](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/DocumentationRequest.cs): `backend/LegalService.API/Models/Entities/DocumentationRequest.cs`
- [Documentation catalog](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/DocumentationService.cs): `backend/LegalService.API/Models/Entities/DocumentationService.cs`
- [Careers and applications](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/Career.cs): `backend/LegalService.API/Models/Entities/Career.cs`
- [Service requests](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/ServiceRequest.cs): `backend/LegalService.API/Models/Entities/ServiceRequest.cs`
- [Agent workflows](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/AgentWorkflow.cs): `backend/LegalService.API/Models/Entities/AgentWorkflow.cs`
- [Workflow steps and tools](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/AgentStep.cs): `backend/LegalService.API/Models/Entities/AgentStep.cs`
- [Workflow decisions](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Models/Entities/ApprovalDecision.cs): `backend/LegalService.API/Models/Entities/ApprovalDecision.cs`

### Persistence

- [EF data context](https://github.com/wishwa2002/intelligent-legal-service/blob/main/backend/LegalService.API/Data/ApplicationDbContext.cs): `backend/LegalService.API/Data/ApplicationDbContext.cs`
- **Application database**

### Other components

- **Site visitor**

## Connections

- Site visitor → Frontend app: opens
- Frontend app → Landing page: renders (evidence: `frontend/src/App.tsx`)
- Landing page → Landing sections: renders (evidence: `frontend/src/pages/LandingPage.tsx`)
- Auth controller → Auth request/response: accepts (evidence: `backend/LegalService.API/Controllers/AuthController.cs`)
- Auth controller → EF data context: queries and saves (evidence: `backend/LegalService.API/Controllers/AuthController.cs`)
- EF data context → Application database: maps entities
- EF data context → Users and roles: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Lawyer profiles: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Legal services: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Appointments: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Lawyer availability: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Documentation requests: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Documentation catalog: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Careers and applications: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Service requests: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- EF data context → Agent workflows: configures (evidence: `backend/LegalService.API/Data/ApplicationDbContext.cs`)
- Agent workflows → Service requests: references (evidence: `backend/LegalService.API/Models/Entities/AgentWorkflow.cs`)
- Agent workflows → Workflow steps and tools: contains (evidence: `backend/LegalService.API/Models/Entities/AgentWorkflow.cs`)
- Agent workflows → Workflow decisions: tracks decisions (evidence: `backend/LegalService.API/Models/Entities/AgentWorkflow.cs`)
