# shua24/penicillisolver-mobile architecture

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

- Interactive diagram: https://gitdiagram.com/shua24/penicillisolver-mobile
- Repository: https://github.com/shua24/penicillisolver-mobile

## Overview

##### Main Components Identification

a) Client-Side (Mobile Application)
- UI Layer
- Separate modules for each main screen (MainMenu, Login, Register, Settings, etc.)
- Camera functionality (camera_page.dart)
- Theme management (theme.dart)

b) Authentication & User Management
- Login/Register flow
- Account verification (VerifikasiNewAccount.dart)
- Password recovery (lupa.dart)

c) Data Layer
- Local storage (database_helper.dart)
- Firebase integration (indicated by firebase_options.dart and google-services.json)

##### Architecture Representation

TOP LAYER (Presentation):
**┌─────────────────────────────────────────────────────┐**
- UI Components                     │
- ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐    │
- Login  │ │Register │ │Settings │ │  Camera │    │
- ┘ └─────────┘ └─────────┘ └─────────┘    │
- ┘

MIDDLE LAYER (Business Logic):
**┌─────────────────────────────────────────────────────┐**
- Service Layer                        │
- ┌─────────────────┐      ┌────────────────────┐    │
- Authentication  │      │   Data Management   │    │
- ┘      └────────────────────┘    │
- ┘

BOTTOM LAYER (Data):
**┌─────────────────────────────────────────────────────┐**
- Data Sources                         │
- ┌─────────────────┐      ┌────────────────────┐    │
- Firebase     │      │   Local Database   │    │
- ┘      └────────────────────┘    │
- ┘

##### Platform Support Indication

A section showing supported platforms:
- iOS (ios/)
- Android (android/)
- Web (web/)
- Desktop (windows/, linux/, macos/)

##### Notes for Implementation Details

Annotations for:
- Firebase configuration requirements
- Database schema references
- Platform-specific considerations
- Security implementation points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "UI Layer"
        UI_Main["Main Menu"]:::ui
        UI_Login["Login Screen"]:::ui
        UI_Register["Register Screen"]:::ui
        UI_Settings["Settings Screen"]:::ui
        UI_Camera["Camera Interface"]:::ui
        UI_Theme["Theme Management"]:::ui
        UI_Account["Account Settings"]:::ui
    end

    subgraph "Authentication Layer"
        Auth_Verify["Account Verification"]:::auth
        Auth_Recovery["Password Recovery"]:::auth
        Auth_Lookup["Lookup System"]:::auth
    end

    subgraph "Data Layer"
        Data_Local["Local Database"]:::data
        Data_Firebase["Firebase Config"]:::data
        Data_FirebaseSetup["Firebase Setup"]:::data
    end

    subgraph "Platform Support"
        Platform_Android["Android"]:::platform
        Platform_iOS["iOS"]:::platform
        Platform_Web["Web"]:::platform
        Platform_Linux["Linux"]:::platform
        Platform_Windows["Windows"]:::platform
        Platform_MacOS["MacOS"]:::platform
    end

    subgraph "Asset Management"
        Assets_Main["Assets Directory"]:::asset
        Assets_Icons["Icons"]:::asset
    end

    Main_Entry["Main Application"]:::entry

    %% Connections
    Main_Entry --> UI_Main
    UI_Main --> UI_Login
    UI_Main --> UI_Register
    UI_Main --> UI_Settings
    UI_Main --> UI_Camera
    UI_Settings --> UI_Account
    UI_Theme --> UI_Main

    UI_Login --> Auth_Verify
    UI_Register --> Auth_Verify
    UI_Login --> Auth_Recovery
    Auth_Verify --> Auth_Lookup

    Auth_Verify --> Data_Firebase
    Auth_Recovery --> Data_Firebase
    Auth_Lookup --> Data_Local
    
    Data_Firebase --> Data_FirebaseSetup
    
    Main_Entry --> Platform_Android
    Main_Entry --> Platform_iOS
    Main_Entry --> Platform_Web
    Main_Entry --> Platform_Linux
    Main_Entry --> Platform_Windows
    Main_Entry --> Platform_MacOS

    UI_Main --> Assets_Main
    Assets_Main --> Assets_Icons

    %% Click Events
    click UI_Main "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/MainMenu.dart"
    click UI_Login "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/login.dart"
    click UI_Register "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/register.dart"
    click UI_Settings "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/setting.dart"
    click UI_Camera "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/camera_page.dart"
    click UI_Theme "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/theme.dart"
    click UI_Account "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/pengaturan_akun.dart"
    click Auth_Verify "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/VerifikasiNewAccount.dart"
    click Auth_Recovery "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/lupa.dart"
    click Auth_Lookup "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/lookup.dart"
    click Data_Local "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/database_helper.dart"
    click Data_Firebase "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/firebase_options.dart"
    click Data_FirebaseSetup "https://github.com/shua24/penicillisolver-mobile/blob/main/android/app/google-services.json"
    click Platform_Android "https://github.com/shua24/penicillisolver-mobile/tree/main/android/"
    click Platform_iOS "https://github.com/shua24/penicillisolver-mobile/tree/main/ios/"
    click Platform_Web "https://github.com/shua24/penicillisolver-mobile/tree/main/web/"
    click Platform_Linux "https://github.com/shua24/penicillisolver-mobile/tree/main/linux/"
    click Platform_Windows "https://github.com/shua24/penicillisolver-mobile/tree/main/windows/"
    click Platform_MacOS "https://github.com/shua24/penicillisolver-mobile/tree/main/macos/"
    click Main_Entry "https://github.com/shua24/penicillisolver-mobile/blob/main/lib/main.dart"
    click Assets_Main "https://github.com/shua24/penicillisolver-mobile/tree/main/assets/"
    click Assets_Icons "https://github.com/shua24/penicillisolver-mobile/tree/main/assets/icon/"

    %% Styles
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef auth fill:#e74c3c,stroke:#c0392b,color:white
    classDef data fill:#f1c40f,stroke:#f39c12,color:black
    classDef platform fill:#2ecc71,stroke:#27ae60,color:white
    classDef asset fill:#9b59b6,stroke:#8e44ad,color:white
    classDef entry fill:#34495e,stroke:#2c3e50,color:white

    %% Legend
    subgraph Legend
        L_UI["UI Component"]:::ui
        L_Auth["Authentication Component"]:::auth
        L_Data["Data Component"]:::data
        L_Platform["Platform Component"]:::platform
        L_Asset["Asset Component"]:::asset
        L_Entry["Entry Point"]:::entry
    end
```
