# umar-rahim/galent_test architecture

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

- Interactive diagram: https://gitdiagram.com/umar-rahim/galent_test
- Repository: https://github.com/umar-rahim/galent_test

## Overview

Galent Local 1040 is a local-first Form 1040 preparation and review application. Preparers sign in, create and edit drafts, then calculate and validate them; reviewers can inspect submissions, while admins manage users. The API persists submission and identity data in SQLite and can generate and serve PDFs from local storage. The graph reflects explicit calls and documented product capabilities; several UI pages and API subsystems are represented by their exact tree paths, but their internal calls were not sampled.

Main entry points: [`Client/src/App.tsx`](https://github.com/umar-rahim/galent_test/blob/main/Client/src/App.tsx) (App navigation), [`Api/Services/DocumentService.cs`](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/DocumentService.cs) (Document workflow), [`Client/src/services/api.ts`](https://github.com/umar-rahim/galent_test/blob/main/Client/src/services/api.ts) (API client), [`Api/Services/SubmissionService.cs`](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/SubmissionService.cs) (Submission workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Frontend"]
  node_app["App navigation<br/>[App.tsx]"]
  node_login["Login UI<br/>[LoginPage.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_submissions_ui["Submission pages<br/>[SubmissionPage.tsx]"]
  node_form_editor["Form editor<br/>[FormEditor.tsx]"]
  node_review_ui["Review UI<br/>[ReviewPage.tsx]"]
  node_admin_ui["Admin UI<br/>[AdminPage.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API workflows"]
  node_auth_api["Authentication routes"]
  node_submission_api["Submission routes"]
  node_document_api["Document routes"]
  node_admin_api["Admin routes"]
  node_submission_service["Submission workflow"]
  node_auth_service["Authentication service<br/>[AuthService.cs]"]
  node_admin_service["Admin user service"]
end

subgraph group_tax["Tax and documents"]
  node_document_service["Document workflow<br/>[DocumentService.cs]"]
  node_calculator["Tax calculator"]
  node_validator["Form validator"]
  node_pdf_service["PDF generation"]
end

subgraph group_persistence["Persistence and identity"]
  node_submission_repo["Submission repository"]
  node_document_repo["Document repository"]
  node_user_repo["User repository<br/>[UserRepository.cs]"]
  node_revoked_repo["Revocation repository"]
  node_db[("SQLite and identity data")]
  node_file_store["Local document store"]
  node_token_service["JWT token service<br/>[TokenService.cs]"]
end

node_user(("Local user"))

node_user -->|"uses"| node_app
node_app -->|"shows"| node_login
node_app -->|"shows"| node_dashboard
node_app -->|"shows"| node_submissions_ui
node_app -->|"shows"| node_review_ui
node_app -->|"shows"| node_admin_ui
node_app -->|"calls"| node_api_client
node_submissions_ui -.->|"renders"| node_form_editor
node_api_client -.->|"requests"| node_auth_api
node_api_client -.->|"requests"| node_submission_api
node_api_client -.->|"requests"| node_document_api
node_api_client -.->|"requests"| node_admin_api
node_auth_api -->|"delegates to"| node_auth_service
node_submission_api -->|"delegates to"| node_submission_service
node_document_api -->|"delegates to"| node_document_service
node_admin_api -->|"delegates to"| node_admin_service
node_submission_service -->|"recalculates with"| node_calculator
node_submission_service -->|"validates with"| node_validator
node_submission_service -->|"loads and saves"| node_submission_repo
node_document_service -->|"loads submission"| node_submission_repo
node_document_service -->|"recalculates with"| node_calculator
node_document_service -->|"validates with"| node_validator
node_document_service -->|"generates with"| node_pdf_service
node_document_service -->|"records document"| node_document_repo
node_document_service -->|"stores files"| node_file_store
node_auth_service -->|"authenticates via"| node_user_repo
node_auth_service -->|"creates token"| node_token_service
node_auth_service -->|"revokes and checks"| node_revoked_repo
node_submission_repo -->|"reads and writes"| node_db
node_document_repo -->|"reads and writes"| node_db
node_revoked_repo -->|"reads and writes"| node_db

click node_app "https://github.com/umar-rahim/galent_test/blob/main/Client/src/App.tsx"
click node_login "https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/auth/LoginPage.tsx"
click node_dashboard "https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/dashboard/DashboardPage.tsx"
click node_submissions_ui "https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/submissions/SubmissionPage.tsx"
click node_form_editor "https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/form1040/FormEditor.tsx"
click node_review_ui "https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/review/ReviewPage.tsx"
click node_admin_ui "https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/admin/AdminPage.tsx"
click node_api_client "https://github.com/umar-rahim/galent_test/blob/main/Client/src/services/api.ts"
click node_auth_api "https://github.com/umar-rahim/galent_test/blob/main/Api/Controllers/AuthApiController.cs"
click node_submission_api "https://github.com/umar-rahim/galent_test/blob/main/Api/Controllers/SubmissionsApiController.cs"
click node_document_api "https://github.com/umar-rahim/galent_test/blob/main/Api/Controllers/DocumentsApiController.cs"
click node_admin_api "https://github.com/umar-rahim/galent_test/blob/main/Api/Controllers/AdminUsersApiController.cs"
click node_submission_service "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/SubmissionService.cs"
click node_auth_service "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/AuthService.cs"
click node_admin_service "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/AdminUserService.cs"
click node_document_service "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/DocumentService.cs"
click node_calculator "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/Form1040Calculator.cs"
click node_validator "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/Form1040Validator.cs"
click node_pdf_service "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/Form1040PdfService.cs"
click node_submission_repo "https://github.com/umar-rahim/galent_test/blob/main/Api/Repositories/SubmissionRepository.cs"
click node_document_repo "https://github.com/umar-rahim/galent_test/blob/main/Api/Repositories/DocumentRepository.cs"
click node_user_repo "https://github.com/umar-rahim/galent_test/blob/main/Api/Repositories/UserRepository.cs"
click node_revoked_repo "https://github.com/umar-rahim/galent_test/blob/main/Api/Repositories/RevokedTokenRepository.cs"
click node_db "https://github.com/umar-rahim/galent_test/blob/main/Api/Data/ApplicationDbContext.cs"
click node_file_store "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/LocalFileDocumentStore.cs"
click node_token_service "https://github.com/umar-rahim/galent_test/blob/main/Api/Services/TokenService.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_login,node_dashboard,node_submissions_ui,node_form_editor,node_review_ui,node_admin_ui,node_api_client,node_user toneBlue
class node_auth_api,node_submission_api,node_document_api,node_admin_api,node_submission_service,node_auth_service,node_admin_service toneAmber
class node_document_service,node_calculator,node_validator,node_pdf_service toneMint
class node_submission_repo,node_document_repo,node_user_repo,node_revoked_repo,node_db,node_file_store,node_token_service toneRose
```

## Components

### Frontend

- [App navigation](https://github.com/umar-rahim/galent_test/blob/main/Client/src/App.tsx): `Client/src/App.tsx`
- [Login UI](https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/auth/LoginPage.tsx): `Client/src/features/auth/LoginPage.tsx`
- [Dashboard](https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/dashboard/DashboardPage.tsx): `Client/src/features/dashboard/DashboardPage.tsx`
- [Submission pages](https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/submissions/SubmissionPage.tsx): `Client/src/features/submissions/SubmissionPage.tsx`
- [Form editor](https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/form1040/FormEditor.tsx): `Client/src/features/form1040/FormEditor.tsx`
- [Review UI](https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/review/ReviewPage.tsx): `Client/src/features/review/ReviewPage.tsx`
- [Admin UI](https://github.com/umar-rahim/galent_test/blob/main/Client/src/features/admin/AdminPage.tsx): `Client/src/features/admin/AdminPage.tsx`
- [API client](https://github.com/umar-rahim/galent_test/blob/main/Client/src/services/api.ts): `Client/src/services/api.ts`

### API workflows

- [Authentication routes](https://github.com/umar-rahim/galent_test/blob/main/Api/Controllers/AuthApiController.cs): `Api/Controllers/AuthApiController.cs`
- [Submission routes](https://github.com/umar-rahim/galent_test/blob/main/Api/Controllers/SubmissionsApiController.cs): `Api/Controllers/SubmissionsApiController.cs`
- [Document routes](https://github.com/umar-rahim/galent_test/blob/main/Api/Controllers/DocumentsApiController.cs): `Api/Controllers/DocumentsApiController.cs`
- [Admin routes](https://github.com/umar-rahim/galent_test/blob/main/Api/Controllers/AdminUsersApiController.cs): `Api/Controllers/AdminUsersApiController.cs`
- [Submission workflow](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/SubmissionService.cs): `Api/Services/SubmissionService.cs`
- [Authentication service](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/AuthService.cs): `Api/Services/AuthService.cs`
- [Admin user service](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/AdminUserService.cs): `Api/Services/AdminUserService.cs`

### Tax and documents

- [Document workflow](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/DocumentService.cs): `Api/Services/DocumentService.cs`
- [Tax calculator](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/Form1040Calculator.cs): `Api/Services/Form1040Calculator.cs`
- [Form validator](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/Form1040Validator.cs): `Api/Services/Form1040Validator.cs`
- [PDF generation](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/Form1040PdfService.cs): `Api/Services/Form1040PdfService.cs`

### Persistence and identity

- [Submission repository](https://github.com/umar-rahim/galent_test/blob/main/Api/Repositories/SubmissionRepository.cs): `Api/Repositories/SubmissionRepository.cs`
- [Document repository](https://github.com/umar-rahim/galent_test/blob/main/Api/Repositories/DocumentRepository.cs): `Api/Repositories/DocumentRepository.cs`
- [User repository](https://github.com/umar-rahim/galent_test/blob/main/Api/Repositories/UserRepository.cs): `Api/Repositories/UserRepository.cs`
- [Revocation repository](https://github.com/umar-rahim/galent_test/blob/main/Api/Repositories/RevokedTokenRepository.cs): `Api/Repositories/RevokedTokenRepository.cs`
- [SQLite and identity data](https://github.com/umar-rahim/galent_test/blob/main/Api/Data/ApplicationDbContext.cs): `Api/Data/ApplicationDbContext.cs`
- [Local document store](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/LocalFileDocumentStore.cs): `Api/Services/LocalFileDocumentStore.cs`
- [JWT token service](https://github.com/umar-rahim/galent_test/blob/main/Api/Services/TokenService.cs): `Api/Services/TokenService.cs`

### Other components

- **Local user**

## Connections

- Local user → App navigation: uses (evidence: `Client/src/App.tsx`)
- App navigation → Login UI: shows (evidence: `Client/src/App.tsx`)
- App navigation → Dashboard: shows (evidence: `Client/src/App.tsx`)
- App navigation → Submission pages: shows (evidence: `Client/src/App.tsx`)
- App navigation → Review UI: shows (evidence: `Client/src/App.tsx`)
- App navigation → Admin UI: shows (evidence: `Client/src/App.tsx`)
- App navigation → API client: calls (evidence: `Client/src/App.tsx`)
- Submission pages → Form editor: renders
- API client → Authentication routes: requests
- API client → Submission routes: requests
- API client → Document routes: requests
- API client → Admin routes: requests
- Authentication routes → Authentication service: delegates to (evidence: `Api/Controllers/AuthApiController.cs`)
- Submission routes → Submission workflow: delegates to (evidence: `Api/Controllers/SubmissionsApiController.cs`)
- Document routes → Document workflow: delegates to (evidence: `Api/Controllers/DocumentsApiController.cs`)
- Admin routes → Admin user service: delegates to (evidence: `Api/Controllers/AdminUsersApiController.cs`)
- Submission workflow → Tax calculator: recalculates with (evidence: `Api/Services/SubmissionService.cs`)
- Submission workflow → Form validator: validates with (evidence: `Api/Services/SubmissionService.cs`)
- Submission workflow → Submission repository: loads and saves (evidence: `Api/Services/SubmissionService.cs`)
- Document workflow → Submission repository: loads submission (evidence: `Api/Services/DocumentService.cs`)
- Document workflow → Tax calculator: recalculates with (evidence: `Api/Services/DocumentService.cs`)
- Document workflow → Form validator: validates with (evidence: `Api/Services/DocumentService.cs`)
- Document workflow → PDF generation: generates with (evidence: `Api/Services/DocumentService.cs`)
- Document workflow → Document repository: records document (evidence: `Api/Services/DocumentService.cs`)
- Document workflow → Local document store: stores files (evidence: `Api/Services/DocumentService.cs`)
- Authentication service → User repository: authenticates via (evidence: `Api/Services/AuthService.cs`)
- Authentication service → JWT token service: creates token (evidence: `Api/Services/AuthService.cs`)
- Authentication service → Revocation repository: revokes and checks (evidence: `Api/Services/AuthService.cs`)
- Submission repository → SQLite and identity data: reads and writes (evidence: `Api/Repositories/SubmissionRepository.cs`)
- Document repository → SQLite and identity data: reads and writes (evidence: `Api/Repositories/DocumentRepository.cs`)
- Revocation repository → SQLite and identity data: reads and writes (evidence: `Api/Repositories/RevokedTokenRepository.cs`)
