# shifaabarham/event-planner-system architecture

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

- Interactive diagram: https://gitdiagram.com/shifaabarham/event-planner-system
- Repository: https://github.com/shifaabarham/event-planner-system

## Overview

##### Project type and purpose
- This is a standalone Java “Event-planner-system” console application (not a web app).
- It implements user authentication, event creation/editing/deletion/search, booking/payment, and notification delivery.
- Persistence is file-based (UserFile.txt, EventFile.txt) with simple repositories.

##### File structure
Top-level
- pom.xml → Maven build & dependencies
- cases/ → Cucumber feature files (Gherkin) covering authentication, event planning, notifications
- src/main/java/
– components/ → service-layer classes (UserComponent, EventComponent, Checker, ImageUploader, SendMail)
– repositories/ → data access classes (UserRepository, EventRepository)
– special/event/ → domain model + orchestration (Event, User, Place, Notification, BookingSystem, Main)
- src/main/resources/ → file storage (EventFile.txt, UserFile.txt) + images
- src/test/java/ → acceptance & unit tests against the domain
Deployment & CI
- .github/workflows/main.yml → GitHub Actions pipeline
- target/ → Maven build output

##### (minimal) README
- Confirms the project name but has no additional architectural guidance.

##### Elements
e.g., Main → BookingSystem → UserComponent → UserRepository → UserFile.txt
→ Checker for validation → SendMail → SMTP Service
- Presentation (light blue)
- Service components (green)
- Domain model (yellow)
- Repositories/persistence (orange)
- External systems (gray)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        Main["Main (CLI)"]:::presentation
    end

    %% Orchestration
    BookingSystem["BookingSystem"]:::orchestration

    Main -->|"bootstrap()"| BookingSystem

    %% Domain Model
    subgraph "Domain Model"
        User["User"]:::domain
        Event["Event"]:::domain
        Place["Place"]:::domain
        Notification["Notification"]:::domain
    end

    BookingSystem -->|"orchestrate()"| UserComponent
    BookingSystem -->|"orchestrate()"| EventComponent
    Notification -->|"trigger()"| SendMail
    UserComponent -->|"useEntity"| User
    EventComponent -->|"useEntity"| Event
    BookingSystem -->|"useEntity"| Place

    %% Service Layer
    subgraph "Service Layer"
        UserComponent["UserComponent"]:::service
        EventComponent["EventComponent"]:::service
        Checker["Checker"]:::service
        ImageUploader["ImageUploader"]:::service
        SendMail["SendMail"]:::service
    end

    UserComponent -->|"validate()"| Checker
    EventComponent -->|"validate()"| Checker
    EventComponent -->|"uploadImage()"| ImageUploader
    Checker -->|"ok?"| UserComponent
    Checker -->|"ok?"| EventComponent

    %% Data Access Layer
    subgraph "Data Access Layer"
        UserRepository["UserRepository"]:::repository
        EventRepository["EventRepository"]:::repository
    end

    UserComponent -->|"readUser()/writeUser()"| UserRepository
    EventComponent -->|"readEvent()/writeEvent()"| EventRepository

    %% Persistence Files
    UserRepository -->|"I/O"| UserFile["UserFile.txt"]:::file
    EventRepository -->|"I/O"| EventFile["EventFile.txt"]:::file
    ImageUploader -->|"storeImage()"| Images["images/"]:::file
    SendMail -->|"sendEmail()"| SMTPService["SMTP Service"]:::external

    %% Testing & CI
    subgraph "Testing & CI"
        Features["Cucumber Feature Files"]:::infra
        Tests["Acceptance & Unit Tests"]:::infra
        CI["GitHub Actions"]:::infra
        POM["pom.xml"]:::infra
    end

    Features -->|run| Tests
    Tests -->|validate build| CI
    CI -->|uses| POM

    %% Click Events
    click Main "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/special/event/Main.java"
    click BookingSystem "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/special/event/BookingSystem.java"
    click UserComponent "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/components/UserComponent.java"
    click EventComponent "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/components/EventComponent.java"
    click Checker "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/components/Checker.java"
    click ImageUploader "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/components/ImageUploader.java"
    click SendMail "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/components/SendMail.java"
    click UserRepository "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/repositories/UserRepository.java"
    click EventRepository "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/repositories/EventRepository.java"
    click User "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/special/event/User.java"
    click Event "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/special/event/Event.java"
    click Place "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/special/event/Place.java"
    click Notification "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/java/special/event/Notification.java"
    click UserFile "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/resources/UserFile.txt"
    click EventFile "https://github.com/shifaabarham/event-planner-system/blob/main/src/main/resources/EventFile.txt"
    click Images "https://github.com/shifaabarham/event-planner-system/tree/main/src/main/resources/images/"
    click Features "https://github.com/shifaabarham/event-planner-system/tree/main/cases/"
    click Tests "https://github.com/shifaabarham/event-planner-system/tree/main/src/test/java/special/event/"
    click CI "https://github.com/shifaabarham/event-planner-system/blob/main/.github/workflows/main.yml"
    click POM "https://github.com/shifaabarham/event-planner-system/blob/main/pom.xml"

    %% Styles
    classDef presentation fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef orchestration fill:#b3e6b3,stroke:#333,stroke-width:1px
    classDef service fill:#d9f2d9,stroke:#333,stroke-width:1px
    classDef repository fill:#ffe6cc,stroke:#333,stroke-width:1px
    classDef file fill:#fff5cc,stroke:#333,stroke-width:1px
    classDef domain fill:#ffffcc,stroke:#333,stroke-width:1px
    classDef external fill:#e6e6e6,stroke:#333,stroke-width:1px
    classDef infra fill:#f2f2f2,stroke:#333,stroke-width:1px
```
