# team-when-will-we-meet/wwwm-react-fe architecture

> Architecture diagram of the GitHub repository team-when-will-we-meet/wwwm-react-fe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/team-when-will-we-meet/wwwm-react-fe
- Repository: https://github.com/team-when-will-we-meet/wwwm-react-fe

## Overview

##### Project Type and Purpose
- This is a single‐page web application (SPA) built with Create React App. It provides a client‐side calendar/appointment UI (month view, week view, time picker, etc.) and is deployed as a Progressive Web App (PWA) on Firebase Hosting.
- There is no custom backend code in the repo; all application logic lives in the React front end, and Firebase Hosting serves the static bundle.

##### High-Level Components
a. Developer Environment
- Local Source Code (GitHub repo)
- Node.js/NPM toolchain (npm start, build, test)
- CRACO for custom Webpack/PostCSS/Tailwind config
b. Continuous Integration / Deployment
- GitHub Actions workflows (firebase-hosting-pull-request.yml and firebase-hosting-merge.yml)
- On merge to main: run tests → run build → deploy to Firebase Hosting
c. Build Pipeline
- React (JSX/TSX) → Babel → Webpack → bundle
- Tailwind CSS / PostCSS → CSS bundle
- Output to build/ directory
d. Hosting & Runtime
- Firebase Hosting (serves index.html + static assets via CDN)
- Browser loads the PWA, registers service worker, hydrates React app
e. Application Modules (inside src/)
- Components (Button.tsx, TimePicker.tsx, Loading.js, LandingPage.js)
- Pages (MonthView, WeekView, AccountManagement, Invite, etc.)
- Utils (cn.js)
- Public assets (manifest.json, robots.txt, JSON animations in public/)

##### Interactions and Data Flow
- Developer → GitHub push
→ GitHub Actions CI → run tests + build
→ on success → deploy artifacts to Firebase Hosting
- Browser → HTTP GET to Firebase CDN → downloads index.html + JS/CSS bundles
→ React Router hydrates client-side routes
→ UI components render calendar views & pickers

##### Architectural Patterns and Principles
- Single-Page Application with client-side routing (React Router)
- Component-based UI (atomic design: shared components vs. page modules)
- Separation of concerns:
- Build configuration (craco.config.js, postcss.config.js, tailwind.config.js)
- Static assets (public/)
- Source logic & styling (src/)
- PWA best practices: manifest.json, service worker (via CRA), offline support

##### Technologies and Frameworks
- React, JSX/TSX
- CRACO for Webpack overrides
- Tailwind CSS + PostCSS
- GitHub Actions (CI/CD)
- Firebase Hosting (CDN)
- Create React App (build scripts, testing with Jest)

##### Detailed Elements
- Build step: label Webpack + Babel + PostCSS → build/
- Deployment step: label Firebase Hosting (with caching/CDN).
- PWA layer: service worker registration in the browser.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Environment
    subgraph "Developer Environment"
        direction TB
        DevLocal["IDE & npm scripts"]:::devCI
        CRACO["craco.config.js"]:::devCI
        PostCSS["postcss.config.js"]:::devCI
        TailwindCFG["tailwind.config.js"]:::devCI
    end

    %% Code Repository
    Repo["GitHub Repo"]:::devCI

    %% Continuous Integration
    subgraph "CI/CD (GitHub Actions)"
        direction TB
        PRWF["Pull Request Workflow"]:::devCI
        MergeWF["Merge to main Workflow"]:::devCI
    end

    %% Build Tools
    subgraph "Build Pipeline"
        direction TB
        BabelWebpack["Webpack + Babel"]:::build
        PostCSSBuild["Tailwind CSS + PostCSS"]:::build
        Bundle["build/ directory"]:::build
    end

    %% Hosting Configuration
    subgraph "Hosting Configuration"
        direction TB
        FirebaseJSON["firebase.json"]:::hosting
        Firebaserc[".firebaserc"]:::hosting
    end

    %% Firebase Hosting
    Hosting["Firebase Hosting (CDN)"]:::hosting

    %% Browser / Runtime
    subgraph "Browser PWA"
        direction TB
        IndexHTML["public/index.html"]:::public
        ServiceWorker["Service Worker"]:::hosting
        ReactApp["Hydrated React App"]:::hosting
        Router["React Router"]:::hosting
    end

    %% Application Modules
    subgraph "App Modules (src/)" 
        direction TB
        Entry["src/index.js"]:::app
        RootComp["src/App.js"]:::app

        subgraph "Components" 
            direction TB
            Button["Button.tsx"]:::app
            TimePicker["TimePicker.js"]:::app
            Loading["Loading.js"]:::app
            Landing["LandingPage.js"]:::app
        end

        subgraph "Pages"
            direction TB
            MonthView["MonthView.js/.css"]:::app
            WeekView["WeekView.js/.css"]:::app
            Account["AccountManagement.js/.css"]:::app
            Invite["invite.js/.css"]:::app
        end

        subgraph "Styles"
            direction TB
            IndexCSS["src/index.css"]:::app
            AppCSS["src/App.css"]:::app
            Color["color.ts/.css"]:::app
            Typography["typography.ts/.css"]:::app
        end

        Util["src/utils/cn.js"]:::app
        Tests["src/setupTests.js"]:::app
        Vitals["src/reportWebVitals.js"]:::app
    end

    %% Public Assets
    subgraph "Public Assets"
        direction TB
        Manifest["public/manifest.json"]:::public
        Robots["public/robots.txt"]:::public
        LoadingJSON["public/Loading.json"]:::public
        UpArrowJSON["public/upArrow.json"]:::public
    end

    %% Links / Data Flow
    DevLocal -->|push| Repo
    Repo -->|on PR| PRWF
    PRWF -->|tests| PRWF
    PRWF -->|build| PRWF
    Repo -->|on merge| MergeWF
    MergeWF -->|run tests & build| BabelWebpack
    MergeWF -->|config overrides| CRACO
    MergeWF -->|build CSS| PostCSSBuild
    BabelWebpack --> Bundle
    PostCSSBuild --> Bundle
    Bundle -->|deploy| Hosting

    Hosting -->|serves| IndexHTML
    Hosting -->|serves| Bundle
    IndexHTML -->|loads| ReactApp
    ReactApp -->|registers| ServiceWorker
    ReactApp -->|uses| Router
    Router -->|routes to| MonthView
    Router -->|routes to| WeekView
    Router -->|routes to| Account
    Router -->|routes to| Invite

    ReactApp --> Button
    ReactApp --> TimePicker
    ReactApp --> Loading
    ReactApp --> Landing
    ReactApp --> Util
    ReactApp --> Color
    ReactApp --> Typography
    ReactApp --> IndexCSS
    ReactApp --> AppCSS

    %% Click Events
    click CRACO "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/craco.config.js"
    click PostCSS "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/postcss.config.js"
    click TailwindCFG "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/tailwind.config.js"
    click PRWF "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/.github/workflows/firebase-hosting-pull-request.yml"
    click MergeWF "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/.github/workflows/firebase-hosting-merge.yml"
    click FirebaseJSON "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/firebase.json"
    click Firebaserc "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/.firebaserc"
    click IndexHTML "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/public/index.html"
    click Manifest "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/public/manifest.json"
    click Robots "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/public/robots.txt"
    click LoadingJSON "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/public/Loading.json"
    click UpArrowJSON "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/public/upArrow.json"
    click Entry "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/index.js"
    click RootComp "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/App.js"
    click IndexCSS "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/index.css"
    click AppCSS "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/App.css"
    click Button "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/components/Button.tsx"
    click TimePicker "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/components/TimePicker.js"
    click Loading "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/components/Loading.js"
    click Landing "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/components/LandingPage.js"
    click MonthView "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/pages/MonthView.js"
    click WeekView "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/pages/WeekView.js"
    click Account "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/pages/AccountManagement.js"
    click Invite "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/pages/invite.js"
    click Util "https://github.com/team-when-will-we-meet/wwwm-react-fe/blob/main/src/utils/cn.js"

    %% Styles
    classDef devCI fill:#e0f7fa,stroke:#006064,color:#004d40
    classDef build fill:#e8f5e9,stroke:#1b5e20,color:#2e7d32
    classDef hosting fill:#e3f2fd,stroke:#0d47a1,color:#1a237e
    classDef app fill:#fff9c4,stroke:#f57f17,color:#e65100
    classDef public fill:#f1f8e9,stroke:#33691e,color:#1b5e20
```
