# shirleyzmj/singapore-sharing-ppt architecture

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

- Interactive diagram: https://gitdiagram.com/shirleyzmj/singapore-sharing-ppt
- Repository: https://github.com/shirleyzmj/singapore-sharing-ppt

## Overview

##### Main Components
- Client-Side Presentation Layer: Represented by the Next.js application and its page components in the ‘ppt/src/app’ directory. This is your core entry point.
- Slide Components: All slide-related components in ‘ppt/src/components’ (especially in the ‘slides’ subdirectory). List each significant slide type such as TitleSlide, HousingSlide, TransportationSlide, etc.
- Assets & Static Files: The ‘ppt/public’ directory, which contains images and other static content, and the global styles in ‘ppt/src/app/globals.css’.
- Styling & Configurations: Represent configuration files (tailwind.config.js, postcss.config.js) and the overall build setup (package.json, next.config.js) as they define styling and app behavior.
- External Libraries/Frameworks: Include Next.js (for the application framework), Tailwind CSS (for styling), recharts.js (for any graphical data visualizations), and Reveal.js (to support slide transitions, navigation and presentation features).

##### Relationships and Interactions
- Data Flow: Start with the main entry (layout.js and page.js in the app directory), which then loads and orchestrates slide components from the ‘components/slides’ directory.

##### Architectural Patterns and Design Principles
- Component-Based Architecture: Break down the presentation into reusable slide components with independent functionalities.
- Separation of Concerns: Distinguish between presentation logic (slide components), global styling (CSS and Tailwind configuration), and static assets.
- Routing and Layout: Illustrate how Next.js’s file-based routing drives the display of the presentation and how the app’s global layout wraps all slide components.
- Extensibility: Note that new slides are added by creating new components in ‘src/components/slides’ and updating the main slide order in ‘src/app/page.js’.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Configuration & Build"
        CFG1["Tailwind Config (tailwind.config.js)"]:::configStyle
        CFG2["PostCSS Config (postcss.config.js)"]:::configStyle
        CFG3["Next.js Config (next.config.js)"]:::configStyle
        CFG4["Package (package.json)"]:::configStyle
    end

    subgraph "External Libraries"
        EXT1["Next.js"]:::externalStyle
        EXT2["Tailwind CSS"]:::externalStyle
        EXT3["Recharts.js"]:::externalStyle
        EXT4["Reveal.js"]:::externalStyle
    end

    subgraph "Application Core"
        AppEntry["Next.js App Entry (src/app)"]:::appLayer
        Layout["Layout & Page (layout.js & page.js)"]:::appLayer
        GS["Global Styles (globals.css)"]:::assetsStyle
    end

    subgraph "Slide Components"
        TS["TitleSlide"]:::slideStyle
        HS["HousingSlide"]:::slideStyle
        TS2["TransportationSlide"]:::slideStyle
        OS["Other Slides"]:::slideStyle
    end

    subgraph "Assets"
        SA["Static Assets (Images)"]:::assetsStyle
    end

    %% Relationships
    CFG1 --> AppEntry
    CFG2 --> AppEntry
    CFG3 --> AppEntry
    CFG4 --> AppEntry

    AppEntry -->|"loads"| Layout
    AppEntry --> GS
    Layout -->|"includes"| TS
    Layout -->|"includes"| HS
    Layout -->|"includes"| TS2
    Layout -->|"includes"| OS
    TS -->|"references"| SA
    HS -->|"references"| SA
    TS2 -->|"references"| SA
    OS -->|"references"| SA

    AppEntry --> EXT1
    AppEntry --> EXT2
    AppEntry --> EXT3
    AppEntry --> EXT4

    %% Click Events
    click AppEntry "https://github.com/shirleyzmj/singapore-sharing-ppt/tree/main/ppt/src/app"
    click GS "https://github.com/shirleyzmj/singapore-sharing-ppt/blob/main/ppt/src/app/globals.css"
    click TS "https://github.com/shirleyzmj/singapore-sharing-ppt/blob/main/ppt/src/components/slides/TitleSlide.js"
    click HS "https://github.com/shirleyzmj/singapore-sharing-ppt/blob/main/ppt/src/components/slides/HousingSlide.js"
    click TS2 "https://github.com/shirleyzmj/singapore-sharing-ppt/blob/main/ppt/src/components/slides/TransportationSlide.js"
    click SA "https://github.com/shirleyzmj/singapore-sharing-ppt/tree/main/ppt/public/images"
    click CFG1 "https://github.com/shirleyzmj/singapore-sharing-ppt/blob/main/ppt/tailwind.config.js"
    click CFG2 "https://github.com/shirleyzmj/singapore-sharing-ppt/blob/main/ppt/postcss.config.js"
    click CFG3 "https://github.com/shirleyzmj/singapore-sharing-ppt/blob/main/ppt/next.config.js"
    click CFG4 "https://github.com/shirleyzmj/singapore-sharing-ppt/blob/main/ppt/package.json"

    %% Styles
    classDef appLayer fill:#CDE,stroke:#036,stroke-width:2px;
    classDef slideStyle fill:#DFD,stroke:#090,stroke-width:2px;
    classDef assetsStyle fill:#FFEBB3,stroke:#B37,stroke-width:2px;
    classDef configStyle fill:#FDD,stroke:#D33,stroke-width:2px;
    classDef externalStyle fill:#FCD,stroke:#840,stroke-width:2px;
```
