# ibtasam-98/trippy-go architecture

> Architecture diagram of the GitHub repository ibtasam-98/trippy-go, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ibtasam-98/trippy-go
- Repository: https://github.com/ibtasam-98/trippy-go

## Overview

##### Project type and purpose
- TrippyGo is a cross-platform mobile and web application built with Flutter. Its primary purpose is to enable travel planning and booking, with separate feature sets for administrators (user and accommodation management) and end-users (search, booking, review).

##### File structure
- Top-level “android”, “ios”, “linux”, “macos”, “windows”, “web” folders: platform embedding for Flutter.
- “lib/app” subdivided into:
- config (theme, sizing)
- controllers (business logic, per screen, split by admin and user)
- views (UI pages, split by admin, auth, user)
- widgets (reusable components)
- “firebase.json” and “firebase_options.dart”: integration with Firebase services (Auth, Firestore, Storage).
- pubspec.yaml: Flutter dependencies (likely firebase_auth, cloud_firestore, getx or provider).
- build scripts and manifests under each platform.

##### README for additional insights
- Confirms feature sets: admin (user & accommodation CRUD), user (booking CRUD, search, reviews).
- No on-prem backend folder, implying reliance on Firebase or a managed backend.

##### Detailed steps for the engineer
2. Inside the client block, subdivide into three horizontal layers: UI (top), Controllers (middle), Services (bottom).
3. On the right, place Firebase services grouped (Auth, Firestore DB, Storage).
– UI → Controllers
– Controllers → Services
– Services ↔ Firebase (data flow)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Platform Shells"
        Android["Android Shell"]:::shell
        iOS["iOS Shell"]:::shell
        Web["Web Shell"]:::shell
        Linux["Linux Shell"]:::shell
        macOS["macOS Shell"]:::shell
        Windows["Windows Shell"]:::shell
    end

    Android --> MainEntry
    iOS --> MainEntry
    Web --> MainEntry
    Linux --> MainEntry
    macOS --> MainEntry
    Windows --> MainEntry

    MainEntry["Main Entry Point\n(lib/main.dart)"]:::entry

    MainEntry --> UI

    subgraph "Flutter UI Layer"
        Views["Views"]:::ui
        Widgets["Widgets"]:::ui
    end

    UI["Flutter UI\n(Views & Widgets)"]:::ui
    UI --> Views
    UI --> Widgets

    Views --> Controllers
    Widgets --> Controllers

    subgraph "Controllers Layer"
        AdminCtrl["Admin Controllers"]:::controller
        UserCtrl["User Controllers"]:::controller
    end

    Controllers["Controllers"]:::controller
    Views --> AdminCtrl
    Views --> UserCtrl
    Widgets --> AdminCtrl
    Widgets --> UserCtrl

    AdminCtrl --> Config
    UserCtrl --> Config

    subgraph "Configuration Layer"
        AppColors["Theme & Colors"]:::config
        AppSized["Sizing"]:::config
    end

    Config["Configuration"]:::config
    Config --> AppColors
    Config --> AppSized

    AdminCtrl --> Service
    UserCtrl --> Service
    Config --> Service

    Service["Firebase SDK Options"]:::service
    Service --> Firebase

    Firebase["Firebase Services\n(Auth, Firestore, Storage)"]:::external

    Firebase -->|Responses| Service
    Service -->|Data & Auth Calls| Controllers
    Controllers -->|UI Updates| UI

    click MainEntry "https://github.com/ibtasam-98/trippy-go/blob/main/lib/main.dart"
    click Views "https://github.com/ibtasam-98/trippy-go/tree/main/lib/app/views"
    click Widgets "https://github.com/ibtasam-98/trippy-go/tree/main/lib/app/widgets"
    click AdminCtrl "https://github.com/ibtasam-98/trippy-go/tree/main/lib/app/controllers/admin"
    click UserCtrl "https://github.com/ibtasam-98/trippy-go/tree/main/lib/app/controllers/user"
    click AppColors "https://github.com/ibtasam-98/trippy-go/blob/main/lib/app/config/app_colors.dart"
    click AppSized "https://github.com/ibtasam-98/trippy-go/blob/main/lib/app/config/app_sized_box.dart"
    click Service "https://github.com/ibtasam-98/trippy-go/blob/main/lib/firebase_options.dart"
    click Android "https://github.com/ibtasam-98/trippy-go/blob/main/android/app/src/main/java/com/quantumbyte/trippygo/MainActivity.java"
    click iOS "https://github.com/ibtasam-98/trippy-go/blob/main/ios/Runner/AppDelegate.swift"
    click Web "https://github.com/ibtasam-98/trippy-go/blob/main/web/index.html"
    click Linux "https://github.com/ibtasam-98/trippy-go/blob/main/linux/runner/main.cc"
    click macOS "https://github.com/ibtasam-98/trippy-go/blob/main/macos/Runner/MainFlutterWindow.swift"
    click Windows "https://github.com/ibtasam-98/trippy-go/blob/main/windows/runner/main.cpp"

    classDef shell fill:#eeeeee,stroke:#888888
    classDef entry fill:#bbdefb,stroke:#42a5f5
    classDef ui fill:#bbdefb,stroke:#42a5f5
    classDef controller fill:#bbdefb,stroke:#42a5f5
    classDef config fill:#c5cae9,stroke:#3949ab
    classDef service fill:#c8e6c9,stroke:#2e7d32
    classDef external fill:#ffe0b2,stroke:#ef6c00
```
