# shintiazhou/fizzbuzz architecture

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

- Interactive diagram: https://gitdiagram.com/shintiazhou/fizzbuzz
- Repository: https://github.com/shintiazhou/fizzbuzz

## Overview

##### Main System Components

a. User Interface Layer
- Login System
- Branch Management (Cabang)
- Employee Management (Pegawai)
- Customer Management (Pelanggan)
- Account Management (AkunBaru)
- Reporting System

b. Data Layer
- Database Connection
- Data Models
- Report Templates

##### Component Relationships

Frontend Components (Top Layer):
**┌─ User Interface Forms ─────────────────────┐**
- ┌─────────┐ ┌─────────┐ ┌──────────────┐  │
- Login  │ │ Branch  │ │   Employee   │  │
- ┘ └─────────┘ └──────────────┘  │
- ┌─────────┐ ┌─────────┐ ┌──────────────┐  │
- Customer │ │ Account │ │    Report    │  │
- ┘ └─────────┘ └──────────────┘  │
- ┘

Business Logic Layer (Middle Layer):
**┌─ Business Logic ──────────────────────────┐**
- User Authentication                     │
- Branch Management Logic                 │
- Employee Management Logic               │
- Customer Management Logic               │
- Report Generation                       │
- ┘

Data Layer (Bottom Layer):
**┌─ Data Access Layer ────────────────────────┐**
- Database Operations                      │
- Crystal Reports Integration             │
- Data Models                             │
- ┘

##### Technical Details

Connections:
- Database connectivity
- Report generation flow
- User authentication flow
- CRUD operations flow for each module

##### Notes for Implementation

- Windows Forms architecture
- Crystal Reports integration
- Multi-branch system structure
- User role management
- Data flow between forms

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI
        Login["Login Form"]:::ui
        Branch["Branch Management"]:::ui
        BranchNew["New Branch Form"]:::ui
        BranchID["Branch ID"]:::ui
        Employee["Employee Management"]:::ui
        Customer["Customer Management"]:::ui
        Account["Account Management"]:::ui
        Report["Report Viewer"]:::ui
    end

    subgraph BusinessLogic
        Auth["Authentication Logic"]:::logic
        BranchLogic["Branch Operations"]:::logic
        EmpLogic["Employee Operations"]:::logic
        CustLogic["Customer Operations"]:::logic
        AccLogic["Account Operations"]:::logic
        ReportGen["Report Generation"]:::logic
    end

    subgraph DataLayer
        DataModels["Data Models"]:::data
        DB[(Database)]:::db
        CrystalReport["Crystal Reports Template"]:::report
    end

    %% UI to Business Logic Connections
    Login --> Auth
    Branch --> BranchLogic
    BranchNew --> BranchLogic
    BranchID --> BranchLogic
    Employee --> EmpLogic
    Customer --> CustLogic
    Account --> AccLogic
    Report --> ReportGen

    %% Business Logic to Data Layer
    Auth --> DB
    BranchLogic --> DB
    EmpLogic --> DB
    CustLogic --> DB
    AccLogic --> DB
    ReportGen --> CrystalReport
    ReportGen --> DataModels
    
    %% Data Layer Interconnections
    DB <--> DataModels
    DataModels <--> CrystalReport

    %% Click Events
    click Login "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/Login.cs"
    click Branch "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/Cabang.cs"
    click BranchNew "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/CabangBaru.cs"
    click BranchID "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/BranchID.cs"
    click Employee "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/Pegawai.cs"
    click Customer "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/Pelanggan.cs"
    click Account "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/AkunBaru.cs"
    click Report "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/Report/cleanLaundryViewer.cs"
    click CrystalReport "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/Report/crPenjualan.rpt"
    click DataModels "https://github.com/shintiazhou/FizzBuzz/blob/main/FizzBuzz tugas 1/Report/cleanLaundry.xsd"

    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef logic fill:#2ecc71,stroke:#27ae60,color:white
    classDef data fill:#f1c40f,stroke:#f39c12,color:black
    classDef db fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef report fill:#9b59b6,stroke:#8e44ad,color:white

    %% Legend
    subgraph Legend
        UI_Legend["UI Component"]:::ui
        Logic_Legend["Business Logic"]:::logic
        Data_Legend["Data Component"]:::data
        DB_Legend["Database"]:::db
        Report_Legend["Report Template"]:::report
    end
```
