# sebgui30/capstone-ii-spring architecture

> Architecture diagram of the GitHub repository sebgui30/capstone-ii-spring, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sebgui30/capstone-ii-spring
- Repository: https://github.com/sebgui30/capstone-ii-spring

## Overview

1. **Overall shape**
   - This is a **desktop WinForms onboarding application** built as a single .NET solution, not a web app or multi-service system.
   - The runtime is the **WinForms UI process**; the main external dependency is **PostgreSQL** for persistent onboarding data.
   - One important repo detail: the README says C#, but the source tree is **Visual Basic .NET** (`.vb`, `.vbproj`).

2. **Top-level boundaries**
   - The solution is split into three practical layers:
     - **UI/forms**: interactive screens for HR, managers, IT, and role selection.
     - **Business services**: orchestration and workflow logic.
     - **Data/models**: in-memory/session state plus domain objects.
   - This is a classic desktop MVP-ish structure, with forms calling services rather than embedding all logic directly.

3. **User-facing screens**
   - The main UI entry points are the forms under `src/EmployeeOnboarding/`:
     - `frmRoleSelection` for choosing the active role.
     - `frmOnboardingRequest` for HR intake.
     - `frmManagerDashboard` for manager review.
     - `frmHRdashboard` for HR tracking.
     - `frmITdashboard` and `frmITProvision` for IT work queues and provisioning.
     - `frmRequestDetails` for request inspection/detail workflows.
   - These forms are the primary navigation and interaction layer for the whole system.

4. **Workflow by department**
   - The application models a handoff pipeline:
     - **HR** creates an onboarding request.
     - **Manager** reviews and approves/rejects the request.
     - **IT** receives the request for provisioning tasks.
   - The dashboards reflect this division of responsibility, so the architecture is organized around departmental views of the same onboarding record.

5. **Business layer**
   - `Business/HRDashboardService.vb`, `RequestDetailsService.vb`, and `RoleSelectionService.vb` hold the workflow logic that the forms depend on.
   - This layer likely centralizes things like request retrieval, status transitions, role-based filtering, and display-ready data shaping.
   - In the architecture diagram, these services sit between the WinForms screens and the data/state layer.

6. **Data and state management**
   - `Data/InMemoryRequestStore.vb` suggests a local in-process store for onboarding requests, likely used to keep request state available across screens.
   - `Data/SessionStore.vb` suggests the app also tracks the current user/session role locally during navigation.
   - These are important because they indicate the app is not purely database-driven at every screen; some state is managed inside the desktop application process.

7. **Domain model**
   - `Models/Employee.vb` and `Models/OnboardingRequest.vb` define the core business entities.
   - `Employee` represents the person being onboarded; `OnboardingRequest` is the central record that moves through HR, manager, and IT steps.
   - These models are the shared contract between UI, business services, and persistence.

8. **Database layer and persistence**
   - The `database/` folder contains SQL scripts for schema and seed/reference data:
     - `Schema.sql`
     - `Users.sql`
     - `Statuses.sql`
     - `IT_Tasks.sql`
     - sample employee/request scripts
     - an onboarding request script
   - The database is PostgreSQL, and the README indicates a database like `onboarding_portal` with an `onboarding` schema.
   - The schema files imply separate lookup/status tables and task tables, which supports the multi-stage workflow.

9. **Configuration and integration points**
   - `App.config` is the key application configuration file, and the README notes that the **database connection string is hardcoded in multiple files**.
   - That means database connectivity is a central integration concern and likely duplicated across parts of the app rather than abstracted behind a single repository/config service.
   - PostgreSQL is therefore a direct dependency of the desktop client, not hidden behind an API.

10. **Build and delivery**
   - The repo includes a GitHub Actions workflow at `.github/workflows/ci.yml`, so the project has automated CI for the .NET solution.
   - The solution file `EmployeeOnboarding.sln` and project file `EmployeeOnboarding.vbproj` define the build boundary for the desktop app.
   - The `.vs` folder indicates this is a Visual Studio–centric project.

11. **Data flow summary**
   - A typical flow is: **role selection → form entry/review → business service logic → in-memory/session state updates → database-backed persistence/reference data**.
   - Dashboards read request/status data and present it by role.
   - Request details and provisioning screens act on a single onboarding request as it moves through the pipeline.

12. **What to show in an architecture diagram**
   - Draw the center as a **WinForms desktop application**.
   - Put the forms as the outer interaction layer, the business services in the middle, and the models/data stores beneath them.
   - Show PostgreSQL and the SQL schema/scripts as the persistence side, with arrows from the business/data layer to the database.
   - Emphasize the role-based departments as separate UI/workflow paths sharing the same onboarding request entity.

Main entry points: [`src/EmployeeOnboarding/EmployeeOnboarding.vbproj`](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/EmployeeOnboarding.vbproj) (VB Project), [`src/EmployeeOnboarding/Business/HRDashboardService.vb`](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Business/HRDashboardService.vb) (HR Service), [`src/EmployeeOnboarding/Business/RequestDetailsService.vb`](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Business/RequestDetailsService.vb) (Details Service), [`src/EmployeeOnboarding/Data/InMemoryRequestStore.vb`](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Data/InMemoryRequestStore.vb) (Request Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_ui["WinForms UI"]
  node_node_role["Role Select<br/>winforms form"]
  node_node_request["Request Entry<br/>winforms form"]
  node_node_manager["Manager View<br/>winforms form"]
  node_node_hrdash["HR Dashboard<br/>winforms form<br/>[frmHRdashboard.vb]"]
  node_node_itdash["IT Dashboard<br/>winforms form<br/>[frmITdashboard.vb]"]
  node_node_itprov["IT Provision<br/>winforms form<br/>[frmITProvision.vb]"]
  node_node_details["Request Details<br/>winforms form"]
end

subgraph group_group_business["Business Layer"]
  node_node_role_svc["Role Service<br/>workflow service"]
  node_node_hr_svc["HR Service<br/>workflow service"]
  node_node_details_svc["Details Service<br/>workflow service"]
end

subgraph group_group_data["State & Models"]
  node_node_request_store[("Request Store<br/>in-memory store")]
  node_node_session_store[("Session Store<br/>session state<br/>[SessionStore.vb]")]
  node_node_employee["Employee<br/>domain model<br/>[Employee.vb]"]
  node_node_onboarding["Onboarding Req<br/>domain model"]
end

subgraph group_group_persistence["Database Layer"]
  node_node_schema["Schema Scripts<br/>sql schema<br/>[Schema.sql]"]
  node_node_seed["Seed Data<br/>sql seed<br/>[Users.sql]"]
  node_node_db[("PostgreSQL<br/>database")]
end

subgraph group_group_build["Build & Delivery"]
  node_node_solution["Solution"]
  node_node_project["VB Project<br/>winforms project"]
  node_node_ci["CI Pipeline<br/>github actions<br/>[ci.yml]"]
end

node_node_solution -->|"builds"| node_node_project
node_node_ci -->|"runs"| node_node_solution
node_node_project -->|"starts"| node_node_role
node_node_role -->|"uses"| node_node_role_svc
node_node_role_svc -->|"updates"| node_node_session_store
node_node_request -->|"uses"| node_node_hr_svc
node_node_manager -->|"reviews"| node_node_onboarding
node_node_hrdash -->|"uses"| node_node_hr_svc
node_node_itdash -->|"lists"| node_node_onboarding
node_node_itprov -->|"uses"| node_node_details_svc
node_node_details -->|"uses"| node_node_details_svc
node_node_hr_svc -->|"reads"| node_node_request_store
node_node_details_svc -->|"reads"| node_node_request_store
node_node_request_store -->|"holds"| node_node_onboarding
node_node_onboarding -->|"contains"| node_node_employee
node_node_hr_svc -->|"persists"| node_node_db
node_node_details_svc -->|"persists"| node_node_db
node_node_schema -->|"defines"| node_node_db
node_node_seed -->|"loads"| node_node_db
node_node_project -.->|"depends"| node_node_schema
node_node_project -.->|"depends"| node_node_request_store

click node_node_solution "https://github.com/sebgui30/capstone-ii-spring/blob/main/EmployeeOnboarding.sln"
click node_node_project "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/EmployeeOnboarding.vbproj"
click node_node_ci "https://github.com/sebgui30/capstone-ii-spring/blob/main/.github/workflows/ci.yml"
click node_node_role "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmRoleSelection.vb"
click node_node_request "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmOnboardingRequest.vb"
click node_node_manager "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmManagerDashboard.vb"
click node_node_hrdash "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmHRdashboard.vb"
click node_node_itdash "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmITdashboard.vb"
click node_node_itprov "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmITProvision.vb"
click node_node_details "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmRequestDetails.vb"
click node_node_role_svc "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Business/RoleSelectionService.vb"
click node_node_hr_svc "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Business/HRDashboardService.vb"
click node_node_details_svc "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Business/RequestDetailsService.vb"
click node_node_request_store "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Data/InMemoryRequestStore.vb"
click node_node_session_store "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Data/SessionStore.vb"
click node_node_employee "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Models/Employee.vb"
click node_node_onboarding "https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Models/OnboardingRequest.vb"
click node_node_schema "https://github.com/sebgui30/capstone-ii-spring/blob/main/database/Schema.sql"
click node_node_seed "https://github.com/sebgui30/capstone-ii-spring/blob/main/database/Users.sql"

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_node_role,node_node_request,node_node_manager,node_node_hrdash,node_node_itdash,node_node_itprov,node_node_details toneBlue
class node_node_role_svc,node_node_hr_svc,node_node_details_svc toneAmber
class node_node_request_store,node_node_session_store,node_node_employee,node_node_onboarding toneMint
class node_node_schema,node_node_seed,node_node_db toneRose
class node_node_solution,node_node_project,node_node_ci toneIndigo
```

## Components

### WinForms UI

Interactive desktop screens and role-specific dashboards.

- [Role Select](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmRoleSelection.vb): winforms form · Chooses the active department or user role. · `src/EmployeeOnboarding/frmRoleSelection.vb`
- [Request Entry](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmOnboardingRequest.vb): winforms form · HR intake screen for onboarding requests. · `src/EmployeeOnboarding/frmOnboardingRequest.vb`
- [Manager View](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmManagerDashboard.vb): winforms form · Manager review and approval dashboard. · `src/EmployeeOnboarding/frmManagerDashboard.vb`
- [HR Dashboard](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmHRdashboard.vb): winforms form · HR tracking and oversight screen. · `src/EmployeeOnboarding/frmHRdashboard.vb`
- [IT Dashboard](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmITdashboard.vb): winforms form · IT work queue and request triage screen. · `src/EmployeeOnboarding/frmITdashboard.vb`
- [IT Provision](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmITProvision.vb): winforms form · Provisioning workflow for IT tasks. · `src/EmployeeOnboarding/frmITProvision.vb`
- [Request Details](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/frmRequestDetails.vb): winforms form · Detailed view and action screen for a request. · `src/EmployeeOnboarding/frmRequestDetails.vb`

### Business Layer

Workflow and display orchestration services.

- [Role Service](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Business/RoleSelectionService.vb): workflow service · Role selection and navigation logic. · `src/EmployeeOnboarding/Business/RoleSelectionService.vb`
- [HR Service](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Business/HRDashboardService.vb): workflow service · HR dashboard orchestration and request shaping. · `src/EmployeeOnboarding/Business/HRDashboardService.vb`
- [Details Service](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Business/RequestDetailsService.vb): workflow service · Request lookup, status handling, and action logic. · `src/EmployeeOnboarding/Business/RequestDetailsService.vb`

### State & Models

In-process stores and shared domain entities.

- [Request Store](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Data/InMemoryRequestStore.vb): in-memory store · Process-local request cache/state. · `src/EmployeeOnboarding/Data/InMemoryRequestStore.vb`
- [Session Store](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Data/SessionStore.vb): session state · Tracks the current user role and session context. · `src/EmployeeOnboarding/Data/SessionStore.vb`
- [Employee](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Models/Employee.vb): domain model · Person being onboarded. · `src/EmployeeOnboarding/Models/Employee.vb`
- [Onboarding Req](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/Models/OnboardingRequest.vb): domain model · Central onboarding workflow record. · `src/EmployeeOnboarding/Models/OnboardingRequest.vb`

### Database Layer

PostgreSQL schema and seed scripts.

- [Schema Scripts](https://github.com/sebgui30/capstone-ii-spring/blob/main/database/Schema.sql): sql schema · PostgreSQL schema and lookup tables for onboarding data. · `database/Schema.sql`
- [Seed Data](https://github.com/sebgui30/capstone-ii-spring/blob/main/database/Users.sql): sql seed · Reference and sample data for users, statuses, employees, and tasks. · `database/Users.sql`
- **PostgreSQL**: database · External persistent store used by the desktop client.

### Build & Delivery

Solution, project, and CI boundary.

- [Solution](https://github.com/sebgui30/capstone-ii-spring/blob/main/EmployeeOnboarding.sln): dotnet solution · Top-level build boundary for the desktop app. · `EmployeeOnboarding.sln`
- [VB Project](https://github.com/sebgui30/capstone-ii-spring/blob/main/src/EmployeeOnboarding/EmployeeOnboarding.vbproj): winforms project · Visual Basic .NET WinForms application project. · `src/EmployeeOnboarding/EmployeeOnboarding.vbproj`
- [CI Pipeline](https://github.com/sebgui30/capstone-ii-spring/blob/main/.github/workflows/ci.yml): github actions · Automated build workflow for the solution. · `.github/workflows/ci.yml`

## Connections

- Solution → VB Project: builds · The solution contains the WinForms project.
- CI Pipeline → Solution: runs · CI builds the solution on each workflow run.
- VB Project → Role Select: starts · The project launches the desktop experience through role selection.
- Role Select → Role Service: uses · Role screen delegates navigation decisions to the service.
- Role Service → Session Store: updates · Selected role is stored in session context.
- Request Entry → HR Service: uses · HR intake screen delegates workflow logic.
- Manager View → Onboarding Req: reviews · Manager dashboard works on onboarding requests.
- HR Dashboard → HR Service: uses · HR dashboard relies on dashboard service logic.
- IT Dashboard → Onboarding Req: lists · IT dashboard presents pending onboarding work.
- IT Provision → Details Service: uses · Provisioning screen uses request-detail operations.
- Request Details → Details Service: uses · Request detail form delegates request actions.
- HR Service → Request Store: reads · Dashboard logic reads the shared request store.
- Details Service → Request Store: reads · Detail actions operate on stored requests.
- Request Store → Onboarding Req: holds · The store keeps onboarding request objects in memory.
- Onboarding Req → Employee: contains · Onboarding requests reference the employee being onboarded.
- HR Service → PostgreSQL: persists · HR workflow ultimately syncs with PostgreSQL data.
- Details Service → PostgreSQL: persists · Request detail actions update persistent request state.
- Schema Scripts → PostgreSQL: defines · Schema scripts define the PostgreSQL structure.
- Seed Data → PostgreSQL: loads · Seed scripts populate reference and sample data.
- VB Project → Schema Scripts: depends · The app is backed by the SQL-defined data model.
- VB Project → Request Store: depends · The runtime uses in-process stores for shared state.
