# beingfaisal/car-showroom-management-system architecture

> Architecture diagram of the GitHub repository beingfaisal/car-showroom-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/beingfaisal/car-showroom-management-system
- Repository: https://github.com/beingfaisal/car-showroom-management-system

## Overview

#### Purpose and Runtime
This is a Windows desktop Car Showroom Management System. It is a C# WinForms application targeting .NET Framework 4.7.2, built from `CSM Project.sln` and `CSM Project/CSM Project.csproj`. The deployed executable is `CSM Project/bin/Release/CSM Project.exe`.

#### Application Entry and Shell
Startup is defined by `CSM Project/Program.cs`, which launches the WinForms UI. `CSM Project/Form1.cs` is likely the initial sign-in form, based on compiled resource naming (`LogInForm`) and the README. Navigation is form-to-form rather than through a web/API layer.

#### Role-Based Workflow Boundary
The application distinguishes manager and salesman experiences. Compiled resource names identify manager, salesman, and login screens; the corresponding source is represented by the numbered WinForms forms:
- `CSM Project/Form1.cs`
- `CSM Project/Form2.cs`
- `CSM Project/Form3.cs`
- `CSM Project/Form4.cs`

Authentication determines which menu/control flow the user enters. The database must contain an initial manager account; managers subsequently administer employees.

#### Showroom Operations UI
Business operations are implemented directly in WinForms code-behind plus generated layout/resource files. The form set provides the primary functional modules for employee management, car management, and vehicle sales:
- `CSM Project/Form5.cs`
- `CSM Project/Form6.cs`
- `CSM Project/Form7.cs`
- `CSM Project/Form8.cs`
- `CSM Project/Form9.cs`
- `CSM Project/Form10.cs`

The absence of separate domain/service/data-access directories indicates that UI event handlers likely own validation, navigation, and SQL interaction.

#### Data Layer and Database Contract
SQL Server is the external persistence service. `CSM Schema.sql` is the authoritative database bootstrap contract and must be run before the application is connected. A typed ADO.NET dataset is included:
- `CSM Project/CSMDataSet.xsd`
- `CSM Project/CSMDataSet.Designer.cs`

Connection configuration is expected at the application boundary in `CSM Project/App.config`; local generated settings are under `CSM Project/Properties/Settings.settings`. Core flow is: user action in a form → direct database read/write via the connected application → refreshed UI/state.

#### Presentation and Shared UI Elements
Each form follows WinForms partial-class separation: behavior in `.cs`, generated controls/layout in `.Designer.cs`, and localized/embedded assets in `.resx`, for example `CSM Project/Form1.Designer.cs` and `CSM Project/Form1.resx`. Shared dialog and visual components include:
- `CSM Project/CustomMsgBox.cs`
- `CSM Project/CustomSuccessBox.cs`
- `CSM Project/CircularPictureBox.cs`
- `CSM Project/LockBitmap.cs`

These form the common feedback and image-rendering boundary used by operational screens.

#### Build Artifacts and Infrastructure
The application runs locally on Windows with the .NET Framework runtime and a reachable SQL Server instance. Build outputs are committed under `CSM Project/bin/Debug` and `CSM Project/bin/Release`; intermediate output is under `CSM Project/obj`. No server-side application, HTTP interface, cloud infrastructure, or test project is represented in the repository tree.

Main entry points: [`CSM Project/Form1.cs`](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form1.cs) (Sign-in form), [`CSM Project/Form5.cs`](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form5.cs) (Showroom operations forms), [`CSM Project/CSM Project.csproj`](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/CSM%20Project.csproj) (WinForms project), [`CSM Project/App.config`](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/App.config) (Connection configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["WinForms Desktop App"]
  node_solution["CSM Project solution<br/>Visual Studio solution<br/>[CSM Project.sln]"]
  node_project["WinForms project<br/>.NET Framework 4.7.2 project<br/>[CSM Project.csproj]"]
  node_entry["Application startup<br/>WinForms entry point<br/>[Program.cs]"]
  node_login["Sign-in form<br/>WinForms form<br/>[Form1.cs]"]
  node_role_forms["Manager and salesman screens<br/>role workflow forms<br/>[Form2.cs]"]
  node_operations["Showroom operations forms<br/>WinForms code-behind<br/>[Form5.cs]"]
  node_form_layout["Generated form layout and assets<br/>WinForms partial resources<br/>[Form1.Designer.cs]"]
  node_shared_ui["Shared feedback and image UI<br/>custom WinForms controls<br/>[CustomMsgBox.cs]"]
end

subgraph group_data["Data &amp; Persistence"]
  node_app_config["Connection configuration<br/>application configuration<br/>[App.config]"]
  node_settings["Generated settings<br/>application settings<br/>[Settings.settings]"]
  node_dataset["Typed ADO.NET dataset<br/>data contract<br/>[CSMDataSet.xsd]"]
  node_schema["Database bootstrap schema<br/>SQL Server schema<br/>[CSM Schema.sql]"]
  node_sql_server[("SQL Server<br/>external database")]
end

subgraph group_platform["Runtime Platform"]
  node_runtime{{"Windows .NET Framework<br/>local runtime"}}
  node_release_exe["Release executable<br/>deployed desktop executable<br/>[CSM Project.exe]"]
end

node_solution -->|"builds"| node_project
node_project -->|"contains"| node_entry
node_project -->|"produces"| node_release_exe
node_runtime -->|"runs"| node_release_exe
node_entry -->|"launches"| node_login
node_login -->|"routes by role"| node_role_forms
node_role_forms -->|"opens workflows"| node_operations
node_login -->|"uses layout and resources"| node_form_layout
node_operations -->|"uses generated controls"| node_form_layout
node_operations -->|"shows feedback and images"| node_shared_ui
node_app_config -->|"loads settings"| node_settings
node_app_config -->|"configures connection"| node_sql_server
node_dataset -->|"maps database data"| node_sql_server
node_login -->|"authenticates against"| node_sql_server
node_operations -->|"direct reads and writes"| node_sql_server
node_schema -->|"bootstraps"| node_sql_server

click node_solution "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project.sln"
click node_project "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/CSM%20Project.csproj"
click node_entry "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Program.cs"
click node_login "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form1.cs"
click node_role_forms "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form2.cs"
click node_operations "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form5.cs"
click node_form_layout "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form1.Designer.cs"
click node_shared_ui "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/CustomMsgBox.cs"
click node_app_config "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/App.config"
click node_settings "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Properties/Settings.settings"
click node_dataset "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/CSMDataSet.xsd"
click node_schema "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Schema.sql"
click node_release_exe "https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/bin/Release/CSM%20Project.exe"

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_solution,node_project,node_entry,node_login,node_role_forms,node_operations,node_form_layout,node_shared_ui toneBlue
class node_app_config,node_settings,node_dataset,node_schema,node_sql_server toneAmber
class node_runtime,node_release_exe toneMint
```

## Components

### WinForms Desktop App

- [CSM Project solution](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project.sln): Visual Studio solution · `CSM Project.sln`
- [WinForms project](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/CSM%20Project.csproj): .NET Framework 4.7.2 project · `CSM Project/CSM Project.csproj`
- [Application startup](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Program.cs): WinForms entry point · `CSM Project/Program.cs`
- [Sign-in form](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form1.cs): WinForms form · Authenticates users and selects a role workflow. · `CSM Project/Form1.cs`
- [Manager and salesman screens](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form2.cs): role workflow forms · Role-specific menus and control flow. · `CSM Project/Form2.cs`
- [Showroom operations forms](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form5.cs): WinForms code-behind · Employee, car, and vehicle-sales workflows execute in form event handlers. · `CSM Project/Form5.cs`
- [Generated form layout and assets](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Form1.Designer.cs): WinForms partial resources · `CSM Project/Form1.Designer.cs`
- [Shared feedback and image UI](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/CustomMsgBox.cs): custom WinForms controls · `CSM Project/CustomMsgBox.cs`

### Data & Persistence

- [Connection configuration](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/App.config): application configuration · `CSM Project/App.config`
- [Generated settings](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/Properties/Settings.settings): application settings · `CSM Project/Properties/Settings.settings`
- [Typed ADO.NET dataset](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/CSMDataSet.xsd): data contract · `CSM Project/CSMDataSet.xsd`
- [Database bootstrap schema](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Schema.sql): SQL Server schema · Must be applied before the application connects. · `CSM Schema.sql`
- **SQL Server**: external database · Stores accounts, employees, cars, and sales data.

### Runtime Platform

- **Windows .NET Framework**: local runtime
- [Release executable](https://github.com/beingfaisal/car-showroom-management-system/blob/master/CSM%20Project/bin/Release/CSM%20Project.exe): deployed desktop executable · `CSM Project/bin/Release/CSM Project.exe`

## Connections

- CSM Project solution → WinForms project: builds
- WinForms project → Application startup: contains
- WinForms project → Release executable: produces
- Windows .NET Framework → Release executable: runs
- Application startup → Sign-in form: launches
- Sign-in form → Manager and salesman screens: routes by role
- Manager and salesman screens → Showroom operations forms: opens workflows
- Sign-in form → Generated form layout and assets: uses layout and resources
- Showroom operations forms → Generated form layout and assets: uses generated controls
- Showroom operations forms → Shared feedback and image UI: shows feedback and images
- Connection configuration → Generated settings: loads settings
- Connection configuration → SQL Server: configures connection
- Typed ADO.NET dataset → SQL Server: maps database data
- Sign-in form → SQL Server: authenticates against
- Showroom operations forms → SQL Server: direct reads and writes
- Database bootstrap schema → SQL Server: bootstraps
