# ryanaidilp/sistem_absensi_pegawai_app architecture

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

- Interactive diagram: https://gitdiagram.com/ryanaidilp/sistem_absensi_pegawai_app
- Repository: https://github.com/ryanaidilp/sistem_absensi_pegawai_app

## Overview

##### System Overview
This is a mobile application built with Flutter that manages employee attendance in a government office environment, with a separate backend server and push notification integration.

##### Main Components

a. Client-Side (Mobile Application):
- UI Layer (Screens)
- Data Layer (Models)
- Network Layer
- Repository Layer
- Utilities

b. Server-Side (Referenced but not in this repo):
- Backend API Server
- Database Server

c. External Services:
- OneSignal Push Notification Service

##### Component Relationships and Architecture

**[Mobile Application]**
**┌─────────────────────────────────────┐**
- Presentation Layer                  │
- Screens (lib/screen/)           │
- Widgets (lib/widgets/)          │
- ┤
- Business Logic Layer               │
- Repositories                    │
- Models                          │
- ┤
- Data Layer                         │
- API Service                     │
- Network Utilities               │
- ┘
- ↕️
**[Backend Server]**
- ↕️
**[Database]**
- ↔️
**[OneSignal Service]**

##### Specific Elements to Highlight

a. Mobile Application Components:
- Models (lib/models/):
- User management
- Attendance tracking
- Leave management
- Notifications
- Reports

- Screens (lib/screen/):
- Authentication flows
- Main functionality screens
- Administrative features

- Network Layer (lib/network/):
- API communication
- Service handlers

b. External Integrations:
- OneSignal for push notifications
- Backend API connections
- File storage for attendance photos

##### Technical Stack Indicators

Technology badges or labels for:
- Flutter/Dart
- REST API
- OneSignal
- Native Platform Integration (Android/iOS)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Mobile["Mobile Application"]
        subgraph UI["Presentation Layer"]
            Screens["Screens"]:::ui
            Widgets["Common Widgets"]:::ui
            Auth["Authentication Screens"]:::ui
            MainScreens["Main Screens"]:::ui
            AdminScreens["Admin Screens"]:::ui
        end

        subgraph BL["Business Logic Layer"]
            Models["Data Models"]:::logic
            UserModels["User Management"]:::logic
            AttendanceModels["Attendance Models"]:::logic
            LeaveModels["Leave Management"]:::logic
            NotifModels["Notification Models"]:::logic
            ReportModels["Report Models"]:::logic
            Repository["Data Repository"]:::logic
        end

        subgraph DL["Data Layer"]
            APIService["API Service"]:::network
            APIEndpoints["API Endpoints"]:::network
            NetworkUtils["Network Utilities"]:::network
        end

        subgraph Utils["Utilities"]
            AppConst["Constants"]:::util
            ViewUtil["View Utilities"]:::util
            FileUtil["File Utilities"]:::util
            Extensions["Extensions"]:::util
        end
    end

    subgraph External["External Services"]
        Backend["Backend Server"]:::external
        Database["Database"]:::external
        OneSignal["OneSignal Service"]:::external
    end

    %% Relationships
    Screens --> Auth & MainScreens & AdminScreens
    Screens --> Widgets
    BL --> DL
    DL <--> Backend
    Backend <--> Database
    Backend <--> OneSignal
    UI --> BL
    Models --> UserModels & AttendanceModels & LeaveModels & NotifModels & ReportModels

    %% Click Events
    click Screens "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/tree/master/lib/screen/"
    click Auth "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/screen/login_screen.dart"
    click MainScreens "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/screen/home_screen.dart"
    click AdminScreens "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/screen/employee_list_screen.dart"
    click Widgets "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/tree/master/lib/widgets/"
    click UserModels "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/models/user.dart"
    click AttendanceModels "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/models/presence.dart"
    click LeaveModels "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/models/paid_leave.dart"
    click NotifModels "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/models/notification.dart"
    click ReportModels "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/tree/master/lib/models/report/"
    click APIService "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/network/api_service.dart"
    click APIEndpoints "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/network/api.dart"
    click Repository "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/repositories/data_repository.dart"
    click AppConst "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/utils/app_const.dart"
    click ViewUtil "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/utils/view_util.dart"
    click FileUtil "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/utils/file_util.dart"
    click Extensions "https://github.com/ryanaidilp/sistem_absensi_pegawai_app/blob/master/lib/utils/extensions.dart"

    %% Styling
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef logic fill:#2ecc71,stroke:#27ae60,color:white
    classDef network fill:#9b59b6,stroke:#8e44ad,color:white
    classDef util fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef external fill:#e67e22,stroke:#d35400,color:white

    %% Legend
    subgraph Legend
        UI_Component["UI Components"]:::ui
        Logic_Component["Business Logic"]:::logic
        Network_Component["Network Layer"]:::network
        Util_Component["Utilities"]:::util
        External_Component["External Services"]:::external
    end
```
