# dan-nobre/educasexo architecture

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

- Interactive diagram: https://gitdiagram.com/dan-nobre/educasexo
- Repository: https://github.com/dan-nobre/educasexo

## Overview

##### Main architectural components
- App Entry Point: Mark the main starting point of the app (EducaSexoApp.swift), which initializes the application and sets up any necessary environment or state.
- Presentation Layer (Views): Identify the various view files – for example, SplashScreenView, LoginView, TabBarView, ExploreView, MapView variations (MapsView, MapsSearchView), ProfileView, QuestionsView, ArtView, AskView, etc. These represent the screens and user interface interactions.
- Component Library: Include a block for the “Componentes” folder. Components like AnswerQuestionCard, AskCardView, ButtonsView, CardArtigoView, ScrollArtigoView, and others are reusable UI pieces that come together in the view layer.
- Project Infrastructure: Although not a software “layer” per se, include an element for the Xcode project configuration (the .xcodeproj files) and entitlements that define app capabilities.
- Testing: Represent the EducaSexoTests and EducaSexoUITests folders to indicate the existence of unit tests and UI tests that ensure app quality.

##### Relationships and interactions
- Flow from the App’s entry (EducaSexoApp.swift) to the different major UI flows. For instance, after the splash screen comes the login view which then transitions into the main TabBarView.
- How the reusable components (from the “Componentes” folder) are integrated into these individual screens for consistency and modular design.

##### Important design patterns and principles
- Separation of Concerns: Stress how views are kept clean by offloading common UI elements to the Components folder.
- Reusability: Emphasize the modular design of custom components (e.g., cards for questions, articles, buttons) that aid in consistent UI and code reusability.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% App Entry
    subgraph "App Entry"
        A["EducaSexoApp.swift"]:::app
    end

    %% Presentation Layer (Views)
    subgraph "Presentation Layer (Views)"
        S["SplashScreenView"]:::views
        L["LoginView"]:::views
        T["TabBarView"]:::views
        E["ExploreView"]:::views
        M["MapsView"]:::views
        MS["MapsSearchView"]:::views
        P["ProfileView"]:::views
        Q["QuestionsView"]:::views
        AA["ArtView"]:::views
        AR["ArtigoView"]:::views
        ASK["AskView"]:::views
    end

    %% Component Library
    subgraph "Component Library"
        C["Reusable UI Components"]:::components
    end

    %% Assets and Resources
    subgraph "Assets and Resources"
        AM["Assets.xcassets (Main)"]:::assets
        AS["Assets.xcassets (Subproject)"]:::assets
    end

    %% Project Infrastructure
    subgraph "Project Infrastructure"
        XP1["EducaSexo.xcodeproj"]:::infra
        XP2["EducaSexo.xcodeproj (Subproject)"]:::infra
        EN1["EducaSexo.entitlements"]:::infra
        EN2["EducaSexo.entitlements (Subproject)"]:::infra
    end

    %% Testing
    subgraph "Testing"
        UT["EducaSexoTests"]:::tests
        UIT["EducaSexoUITests"]:::tests
    end

    %% Connections within Presentation Layer (Views)
    A -->|"start"| S
    S -->|"next"| L
    L -->|"next"| T
    T -->|"navigate-to"| E
    T -->|"navigate-to"| M
    T -->|"navigate-to"| MS
    T -->|"navigate-to"| P
    T -->|"navigate-to"| Q
    T -->|"navigate-to"| AA
    T -->|"navigate-to"| AR
    T -->|"navigate-to"| ASK

    %% Connections between Layers
    T -->|"integrates"| C
    C -->|"styled-by"| AM
    C -->|"styled-by"| AS

    A -->|"configured-with"| XP1
    XP1 -->|"unit-tests"| UT
    XP1 -->|"ui-tests"| UIT

    %% Class Styles
    classDef app fill:#f9c,stroke:#333,stroke-width:2px;
    classDef views fill:#bbf,stroke:#333,stroke-width:2px;
    classDef components fill:#afa,stroke:#333,stroke-width:2px;
    classDef assets fill:#ff9,stroke:#333,stroke-width:2px;
    classDef infra fill:#fcc,stroke:#333,stroke-width:2px;
    classDef tests fill:#cfc,stroke:#333,stroke-width:2px;

    %% Click Events
    click A "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/EducaSexoApp.swift"
    click S "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/SplashScreenView.swift"
    click L "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/LoginView.swift"
    click T "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/TabBarView.swift"
    click E "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/ExploreView.swift"
    click M "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/MapsView.swift"
    click MS "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/MapsSearchView.swift"
    click P "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/ProfileView.swift"
    click Q "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/QuestionsView.swift"
    click AA "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/ArtView.swift"
    click AR "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/ArtigoView.swift"
    click ASK "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/AskView.swift"
    click C "https://github.com/dan-nobre/educasexo/tree/main/EducaSexo/Componentes"
    click AM "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/Assets.xcassets"
    click AS "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/EducaSexo/Assets.xcassets"
    click XP1 "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo.xcodeproj"
    click XP2 "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/EducaSexo.xcodeproj"
    click EN1 "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/EducaSexo.entitlements"
    click EN2 "https://github.com/dan-nobre/educasexo/blob/main/EducaSexo/EducaSexo/EducaSexo.entitlements"
    click UT "https://github.com/dan-nobre/educasexo/tree/main/EducaSexo/EducaSexoTests"
    click UIT "https://github.com/dan-nobre/educasexo/tree/main/EducaSexo/EducaSexoUITests"
```
