# manula-sameera/university-management-system architecture

> Architecture diagram of the GitHub repository manula-sameera/university-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manula-sameera/university-management-system
- Repository: https://github.com/manula-sameera/university-management-system

## Overview

##### Project type and purpose
- This is a “University Management System” written as a Windows-Forms desktop application in C#.
- It provides CRUD management of campuses, departments, courses, students, faculty, fees, salaries, reports, and user authentication (Login/Signup).

##### File structure
- Top level:
- University Management System.sln / .csproj – Visual Studio solution and project files
- Program.cs – application entry point
- *.Designer.cs + *.cs + *.resx – one folderless WinForms form per entity (Campus, Department, Courses, Student, Faculty, Fees, Salaries, Reports, Login, Signup, Menu, Home, etc.)
- UniversityDataBase.mdf / .ldf – local SQL Server database files
- App.config – connection strings and settings
- Properties – assembly info, resources, settings
- CODE_OF_CONDUCT.md, CONTRIBUTING.md, README.md – repo governance
- No separate “backend” or “API” folder; data access is embedded in code-behind of forms (ADO.NET or typed DataSet from the MDF file).

##### Key insights from README
- (Empty in this repo) → rely solely on file tree to infer architecture.

a. Presentation Layer (WinForms UI)
- Each form: Login/Signup → Main Menu → Home → Domain forms (Student, Faculty, Courses, Department, Campus, Fees, Salaries, Reports, DialogBox).
- Program.cs launches Login, then hands off to the Menu form.
b. Business/Data Access Layer
- Classes and methods in code-behind (.cs) files handling button clicks, validation, queries (ADO.NET commands, TableAdapters, DataSets).
c. Database Layer
- UniversityDataBase.mdf – SQL Server LocalDB database containing tables for Students, Faculty, Courses, Departments, Fees, Salaries, etc.
d. Configuration
- App.config – connection string connecting the UI/data-access code to the local MDF file.

##### Relationships and interactions
- User interacts with WinForms UI → UI invokes data-access calls in code-behind → data-access layer opens SQL connection to the MDF → CRUD operations on tables → results returned to UI → UI updates controls.
- Program.cs → Login form → on success → Menu form → navigation to various modules.

##### Important architectural patterns / principles
- Monolithic 3-tier style (Presentation / Data Access / Database)
- UI tightly coupled to data-access (no separate service layer or API)
- Typed DataSets or direct ADO.NET usage for data binding

##### Technologies / frameworks
- Microsoft .NET Framework (WinForms)
- ADO.NET or Typed DataSets
- SQL Server LocalDB (MDF file)
- Visual Studio solution/project

##### Final checklist
- Clear labels for each component (forms, layers, DB)
- A note callout for App.config’s connection string
- Related forms into functional modules (e.g., “Student Management” group: StudentForm, FeesForm, ReportsForm)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Application Entry Point
    ProgramExe["Program.cs"]:::entry

    %% Configuration
    AppConfig["App.config\n(Connection String)"]:::config

    %% Presentation Layer
    subgraph "Presentation Layer" 
        direction TB
        subgraph "Authentication Forms"
            direction TB
            LoginForm["LoginForm"]:::ui
            SignupForm["SignupForm"]:::ui
            MenuForm["Main Menu (MenuForm)"]:::ui
            HomeForm["Home Screen"]:::ui
            DialogBox["DialogBox"]:::ui
        end
        subgraph "Domain Management Forms"
            direction TB
            CampusForm["CampusForm"]:::ui
            DepartmentForm["DepartmentForm"]:::ui
            CoursesForm["CoursesForm"]:::ui
            StudentForm["StudentForm"]:::ui
            FacultyForm["FacultyForm"]:::ui
            FeesForm["FeesForm"]:::ui
            SalariesForm["SalariesForm"]:::ui
            ReportsForm["ReportsForm"]:::ui
        end
    end

    %% Data-Access Layer
    subgraph "Data-Access Layer"
        direction TB
        DataAccess["DataAccess Logic\n(SQLConnection / TableAdapter)"]:::dal
        TypedDataSet["Typed DataSet\n(ClassDiagram1.cd)"]:::dal
    end

    %% Database Layer
    UniversityDB[(UniversityDataBase.mdf)]:::db
    UniversityLog[(UniversityDataBase_log.ldf)]:::db

    %% Project & Solution
    Solution["University Management System.sln"]:::proj
    ProjectFile["University Management System.csproj"]:::proj

    %% Properties
    subgraph "Properties"
        AssemblyInfo["AssemblyInfo.cs"]:::proj
        Resources["Resources.resx"]:::proj
        Settings["Settings.settings"]:::proj
        Licenses["licenses.licx"]:::proj
    end

    %% Relationships
    ProgramExe -->|"launches"| LoginForm
    LoginForm -->|"on success"| MenuForm
    MenuForm -->|"navigate to"| HomeForm
    MenuForm -->|"open"| CampusForm
    MenuForm -->|"open"| DepartmentForm
    MenuForm -->|"open"| CoursesForm
    MenuForm -->|"open"| StudentForm
    MenuForm -->|"open"| FacultyForm
    MenuForm -->|"open"| FeesForm
    MenuForm -->|"open"| SalariesForm
    MenuForm -->|"open"| ReportsForm
    HomeForm -->|uses| DataAccess
    DialogBox -->|uses| DataAccess
    CampusForm -->|uses| DataAccess
    DepartmentForm -->|uses| DataAccess
    CoursesForm -->|uses| DataAccess
    StudentForm -->|uses| DataAccess
    FacultyForm -->|uses| DataAccess
    FeesForm -->|uses| DataAccess
    SalariesForm -->|uses| DataAccess
    ReportsForm -->|uses| DataAccess

    DataAccess -->|connects| UniversityDB
    DataAccess -->|logs| UniversityLog
    DataAccess -->|schema| TypedDataSet
    AppConfig -->|provides connection string| DataAccess

    Solution --> ProjectFile
    ProjectFile --> ProgramExe
    ProjectFile --> AppConfig
    ProjectFile --> Properties

    %% Click Events
    click ProgramExe "https://github.com/manula-sameera/university-management-system/blob/master/Program.cs"
    click AppConfig "https://github.com/manula-sameera/university-management-system/blob/master/App.config"
    click LoginForm "https://github.com/manula-sameera/university-management-system/blob/master/Login.cs"
    click SignupForm "https://github.com/manula-sameera/university-management-system/blob/master/Signup.cs"
    click MenuForm "https://github.com/manula-sameera/university-management-system/blob/master/Menu.cs"
    click HomeForm "https://github.com/manula-sameera/university-management-system/blob/master/Home.cs"
    click DialogBox "https://github.com/manula-sameera/university-management-system/blob/master/DialogBox.cs"
    click CampusForm "https://github.com/manula-sameera/university-management-system/blob/master/Campus.cs"
    click DepartmentForm "https://github.com/manula-sameera/university-management-system/blob/master/Department.cs"
    click CoursesForm "https://github.com/manula-sameera/university-management-system/blob/master/Courses.cs"
    click StudentForm "https://github.com/manula-sameera/university-management-system/blob/master/Student.cs"
    click FacultyForm "https://github.com/manula-sameera/university-management-system/blob/master/Faculty.cs"
    click FeesForm "https://github.com/manula-sameera/university-management-system/blob/master/Fees.cs"
    click SalariesForm "https://github.com/manula-sameera/university-management-system/blob/master/Salaries.cs"
    click ReportsForm "https://github.com/manula-sameera/university-management-system/blob/master/reports.cs"
    click TypedDataSet "https://github.com/manula-sameera/university-management-system/blob/master/ClassDiagram1.cd"
    click UniversityDB "https://github.com/manula-sameera/university-management-system/blob/master/UniversityDataBase.mdf"
    click UniversityLog "https://github.com/manula-sameera/university-management-system/blob/master/UniversityDataBase_log.ldf"
    click Solution "https://github.com/manula-sameera/university-management-system/blob/master/University Management System.sln"
    click ProjectFile "https://github.com/manula-sameera/university-management-system/blob/master/University Management System.csproj"
    click AssemblyInfo "https://github.com/manula-sameera/university-management-system/blob/master/Properties/AssemblyInfo.cs"
    click Resources "https://github.com/manula-sameera/university-management-system/blob/master/Properties/Resources.resx"
    click Settings "https://github.com/manula-sameera/university-management-system/blob/master/Properties/Settings.settings"
    click Licenses "https://github.com/manula-sameera/university-management-system/blob/master/Properties/licenses.licx"

    %% Styles
    classDef ui fill:#C4E1FF,stroke:#0B69A3,color:#0B69A3;
    classDef dal fill:#D5F5E3,stroke:#27AE60,color:#27AE60;
    classDef db fill:#FDEBD0,stroke:#D35400,color:#D35400,shape:cylinder;
    classDef config fill:#FCF3CF,stroke:#B7950B,color:#B7950B;
    classDef entry fill:#EBDEF0,stroke:#8E44AD,color:#8E44AD;
    classDef proj fill:#F0F3F4,stroke:#566573,color:#566573;
```
