# cwcarr69/wfe architecture

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

- Interactive diagram: https://gitdiagram.com/cwcarr69/wfe
- Repository: https://github.com/cwcarr69/wfe

## Overview

This repository implements a workforce timesheet and time-off management product, with a React client, .NET API, application/domain layers, and supporting integrations. The main workflow is an employee or manager using the client to view or change timesheets or time-off requests; API controllers query read models or dispatch commands, while domain aggregates enforce state changes. Other visible product areas include holidays, payroll-period review/export, notifications, audit, settings, and employee/payroll integration. The README is empty, and several subsystems are unsampled, so only evidenced relationships are shown; unverified frontend-to-API wiring is omitted.

Main entry points: [`Timesheet.Application/Shared/Dispatcher.cs`](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Application/Shared/Dispatcher.cs) (Command dispatcher), [`Timesheet.Web.Api/Controllers/TimesheetController.cs`](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Web.Api/Controllers/TimesheetController.cs) (Timesheet endpoints), [`Timesheet.ReadModel/Queries/QueryEmployee.cs`](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.ReadModel/Queries/QueryEmployee.cs) (Employee queries), [`Front/src/app.js`](https://github.com/cwcarr69/wfe/blob/develop/Front/src/app.js) (Timesheet UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_webapp["Timesheet UI<br/>[app.js]"]
  node_auth["Authentication client<br/>[authService.js]"]
end

subgraph group_api["API and application"]
  node_api_host["Web API host<br/>[Program.cs]"]
  node_timesheet_api["Timesheet endpoints"]
  node_timeoff_api["Time-off endpoints"]
  node_dispatcher["Command dispatcher<br/>[Dispatcher.cs]"]
  node_app_config["Application wiring"]
  node_timeoff_commands["Time-off commands<br/>[CommandHandlers]"]
  node_timesheet_commands["Timesheet commands<br/>[CommandHandlers]"]
  node_workflow["Approval workflows<br/>[Definitions]"]
  node_holidays["Holiday management<br/>[Holidays]"]
  node_payroll_export["Payroll export<br/>[Export]"]
  node_pay_period["Pay-period creation<br/>[PayPeriods]"]
  node_audit["Audit queries<br/>[IQueryAudit.cs]"]
  node_settings["Settings<br/>[Settings]"]
end

subgraph group_domain["Domain model"]
  node_employee_domain["Employee and leave<br/>[Employee.cs]"]
  node_timesheet_domain["Timesheet aggregate<br/>[TimesheetHeader.cs]"]
  node_read_models["Timesheet read models"]
end

subgraph group_data["Read and persistence"]
  node_read_query["Employee queries<br/>[QueryEmployee.cs]"]
  node_sql[("SQL database")]
end

subgraph group_integrations["Product integrations"]
  node_notifications["Email notifications<br/>[MailEngine.cs]"]
  node_email_service["Email worker<br/>[Program.cs]"]
  node_fdp_service["FDP integration worker<br/>[Program.cs]"]
  node_fdp_processing["Employee and payroll import"]
end

node_employee(("Employee or manager"))

node_webapp -.->|"serves UI"| node_employee
node_webapp -->|"uses auth"| node_auth
node_api_host -.->|"hosts endpoints"| node_timesheet_api
node_timesheet_api -->|"queries employee data"| node_read_query
node_timesheet_api -->|"dispatches commands"| node_dispatcher
node_timeoff_api -->|"dispatches commands"| node_dispatcher
node_read_query -->|"queries"| node_sql
node_read_query -->|"maps results"| node_read_models
node_app_config -->|"registers"| node_dispatcher
node_app_config -->|"registers"| node_workflow
node_dispatcher -.->|"dispatches"| node_timeoff_commands
node_dispatcher -.->|"dispatches"| node_timesheet_commands
node_timeoff_commands -.->|"changes leave state"| node_employee_domain
node_timesheet_commands -.->|"changes timesheets"| node_timesheet_domain
node_timesheet_api -->|"requests export"| node_payroll_export
node_email_service -->|"runs mail delivery"| node_notifications
node_notifications -.->|"sends email"| node_employee
node_fdp_service -->|"runs integration"| node_fdp_processing

click node_webapp "https://github.com/cwcarr69/wfe/blob/develop/Front/src/app.js"
click node_auth "https://github.com/cwcarr69/wfe/blob/develop/Front/src/services/authService.js"
click node_api_host "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Web.Api/Program.cs"
click node_timesheet_api "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Web.Api/Controllers/TimesheetController.cs"
click node_timeoff_api "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Web.Api/Controllers/TimeoffController.cs"
click node_read_query "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.ReadModel/Queries/QueryEmployee.cs"
click node_dispatcher "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Application/Shared/Dispatcher.cs"
click node_app_config "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Application/ServiceCollection.cs"
click node_timeoff_commands "https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Employees/CommandHandlers"
click node_timesheet_commands "https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Timesheets/CommandHandlers"
click node_workflow "https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Workflow/Definitions"
click node_employee_domain "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Domain/Models/Employees/Employee.cs"
click node_timesheet_domain "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Domain/Models/Timesheets/TimesheetHeader.cs"
click node_read_models "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Domain/ReadModels/Timesheets/EmployeeTimesheet.cs"
click node_holidays "https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Holidays"
click node_payroll_export "https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Timesheets/Services/Export"
click node_notifications "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.EmailSender/Services/MailEngine.cs"
click node_email_service "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.EmailService/Program.cs"
click node_fdp_service "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.FDPIntegratorService/Program.cs"
click node_fdp_processing "https://github.com/cwcarr69/wfe/tree/develop/Timesheet.FDPDataIntegrator"
click node_pay_period "https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/PayPeriods"
click node_audit "https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Application/Audits/Queries/IQueryAudit.cs"
click node_settings "https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Settings"

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_auth toneBlue
class node_api_host,node_timesheet_api,node_timeoff_api,node_dispatcher,node_app_config,node_timeoff_commands,node_timesheet_commands,node_workflow,node_holidays,node_payroll_export,node_pay_period,node_audit,node_settings toneAmber
class node_employee_domain,node_timesheet_domain,node_read_models toneMint
class node_read_query,node_sql toneRose
class node_notifications,node_email_service,node_fdp_service,node_fdp_processing,node_employee toneIndigo
```

## Components

### Web client

- [Timesheet UI](https://github.com/cwcarr69/wfe/blob/develop/Front/src/app.js): `Front/src/app.js`
- [Authentication client](https://github.com/cwcarr69/wfe/blob/develop/Front/src/services/authService.js): `Front/src/services/authService.js`

### API and application

- [Web API host](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Web.Api/Program.cs): `Timesheet.Web.Api/Program.cs`
- [Timesheet endpoints](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Web.Api/Controllers/TimesheetController.cs): `Timesheet.Web.Api/Controllers/TimesheetController.cs`
- [Time-off endpoints](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Web.Api/Controllers/TimeoffController.cs): `Timesheet.Web.Api/Controllers/TimeoffController.cs`
- [Command dispatcher](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Application/Shared/Dispatcher.cs): `Timesheet.Application/Shared/Dispatcher.cs`
- [Application wiring](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Application/ServiceCollection.cs): `Timesheet.Application/ServiceCollection.cs`
- [Time-off commands](https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Employees/CommandHandlers): `Timesheet.Application/Employees/CommandHandlers`
- [Timesheet commands](https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Timesheets/CommandHandlers): `Timesheet.Application/Timesheets/CommandHandlers`
- [Approval workflows](https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Workflow/Definitions): `Timesheet.Application/Workflow/Definitions`
- [Holiday management](https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Holidays): `Timesheet.Application/Holidays`
- [Payroll export](https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Timesheets/Services/Export): `Timesheet.Application/Timesheets/Services/Export`
- [Pay-period creation](https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/PayPeriods): `Timesheet.Application/PayPeriods`
- [Audit queries](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Application/Audits/Queries/IQueryAudit.cs): `Timesheet.Application/Audits/Queries/IQueryAudit.cs`
- [Settings](https://github.com/cwcarr69/wfe/tree/develop/Timesheet.Application/Settings): `Timesheet.Application/Settings`

### Domain model

- [Employee and leave](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Domain/Models/Employees/Employee.cs): `Timesheet.Domain/Models/Employees/Employee.cs`
- [Timesheet aggregate](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Domain/Models/Timesheets/TimesheetHeader.cs): `Timesheet.Domain/Models/Timesheets/TimesheetHeader.cs`
- [Timesheet read models](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.Domain/ReadModels/Timesheets/EmployeeTimesheet.cs): `Timesheet.Domain/ReadModels/Timesheets/EmployeeTimesheet.cs`

### Read and persistence

- [Employee queries](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.ReadModel/Queries/QueryEmployee.cs): `Timesheet.ReadModel/Queries/QueryEmployee.cs`
- **SQL database**

### Product integrations

- [Email notifications](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.EmailSender/Services/MailEngine.cs): `Timesheet.EmailSender/Services/MailEngine.cs`
- [Email worker](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.EmailService/Program.cs): `Timesheet.EmailService/Program.cs`
- [FDP integration worker](https://github.com/cwcarr69/wfe/blob/develop/Timesheet.FDPIntegratorService/Program.cs): `Timesheet.FDPIntegratorService/Program.cs`
- [Employee and payroll import](https://github.com/cwcarr69/wfe/tree/develop/Timesheet.FDPDataIntegrator): `Timesheet.FDPDataIntegrator`

### Other components

- **Employee or manager**

## Connections

- Timesheet UI → Employee or manager: serves UI
- Timesheet UI → Authentication client: uses auth (evidence: `Front/src/app.js`)
- Web API host → Timesheet endpoints: hosts endpoints
- Timesheet endpoints → Employee queries: queries employee data (evidence: `Timesheet.Web.Api/Controllers/TimesheetController.cs`)
- Timesheet endpoints → Command dispatcher: dispatches commands (evidence: `Timesheet.Web.Api/Controllers/TimesheetController.cs`)
- Time-off endpoints → Command dispatcher: dispatches commands (evidence: `Timesheet.Web.Api/Controllers/TimeoffController.cs`)
- Employee queries → SQL database: queries (evidence: `Timesheet.ReadModel/Queries/QueryEmployee.cs`)
- Employee queries → Timesheet read models: maps results (evidence: `Timesheet.ReadModel/Queries/QueryEmployee.cs`)
- Application wiring → Command dispatcher: registers (evidence: `Timesheet.Application/ServiceCollection.cs`)
- Application wiring → Approval workflows: registers (evidence: `Timesheet.Application/ServiceCollection.cs`)
- Command dispatcher → Time-off commands: dispatches
- Command dispatcher → Timesheet commands: dispatches
- Time-off commands → Employee and leave: changes leave state
- Timesheet commands → Timesheet aggregate: changes timesheets
- Timesheet endpoints → Payroll export: requests export (evidence: `Timesheet.Web.Api/Controllers/TimesheetController.cs`)
- Email worker → Email notifications: runs mail delivery (evidence: `Timesheet.EmailService/Program.cs`)
- Email notifications → Employee or manager: sends email
- FDP integration worker → Employee and payroll import: runs integration (evidence: `Timesheet.FDPIntegratorService/Program.cs`)
