# grape-tasting-acid/beentime-frontend architecture

> Architecture diagram of the GitHub repository grape-tasting-acid/beentime-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/grape-tasting-acid/beentime-frontend
- Repository: https://github.com/grape-tasting-acid/beentime-frontend

## Overview

##### Main Components Identification

The system should be represented as a client-side React application with the following key components:

a) Frontend Layer (React Application)
- Present this as the topmost layer
- Following sub-components:
- Pages Module (AttendanceEventPage, AttendanceListPage, CreateEventPage, Sharing)
- Components Module (AttendanceEvent, Footer)
- Styles Module (CSS Modules, Styled Components)
- Assets (Images, Fonts)

b) API Layer
- API instance configuration (from src/api/instance.js)
- Connection to Supabase (indicated by src/services/supabaseService.js)

**┌─────────────────────────────────────────────────────┐**
- React Application                   │

- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐   │
- Pages    │ │  Components │ │   Assets    │   │

- Attendance│ │ - Attendance│ │ - Images    │   │
- Events    │ │   Event     │ │ - Fonts     │   │
- Sharing   │ │             │ │             │   │
- ┬───┘ └─────────┬───┘ └─────────────┘   │

- ┌────────┴───────────────┴──────────┐            │
- Styling Layer            │            │
- CSS Modules                      │            │
- Styled Components               │            │
- ┬──────────────────┘            │

- ┌────────────────┴──────────────────┐            │
- API Layer                │            │
- API Instance                     │            │
- Supabase Service                │            │
- ┬──────────────────┘            │
- ┼──────────────────────────────┘

- ▼
- ┌─────────────────┐
- Supabase     │
- Backend      │
- ┘

##### Component Relationships

- Data flow between pages and components
- API calls from components to the backend
- Asset usage in components
- Styling application to components

##### Notes for Implementation

- The single-page application (SPA) architecture
- Component reusability
- Styling strategy (mix of CSS modules and styled-components)
- Integration with Supabase as the backend service
- Asset management strategy

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph React["React Application"]
        direction TB
        
        subgraph Pages["Pages Module"]
            direction TB
            AEP["Attendance Event Page"]
            ALP["Attendance List Page"]
            CEP["Create Event Page"]
            SP["Sharing Page"]
        end

        subgraph Components["Components Module"]
            direction TB
            AEC["Attendance Event Component"]
            FC["Footer Component"]
        end

        subgraph Assets["Assets Module"]
            direction TB
            Images["Images"]
            Fonts["Fonts"]
            FontStyles["Font Styles"]
        end

        subgraph Styling["Styling Layer"]
            direction TB
            Reset["Global Reset"]
            CompStyles["Component Styles"]
            StyledComp["Styled Components"]
        end

        subgraph Entry["Application Entry"]
            direction TB
            App["App Component"]
            Index["Root Entry"]
        end

        subgraph API["API Layer"]
            direction TB
            APIInstance["API Instance"]
            SupaService["Supabase Service"]
        end
    end

    Supabase[(Supabase Backend)]

    %% Relationships
    Entry --> Pages
    Entry --> Components
    Pages --> Components
    Components --> Styling
    Pages --> Styling
    Components --> Assets
    Pages --> API
    Components --> API
    API --> Supabase

    %% Click Events
    click AEP "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/page/AttendanceEventPage/AttendanceEventPage.jsx"
    click ALP "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/page/AttendanceListPage/AttendanceListPage.jsx"
    click CEP "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/page/CreateEventPage/CreateEventPage.jsx"
    click SP "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/page/Sharing/Sharing.jsx"
    click AEC "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/component/AttendanceEvent.jsx"
    click FC "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/component/footer/Footer.js"
    click Reset "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/styles/reset.js"
    click CompStyles "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/component/Style.module.css"
    click StyledComp "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/component/Style.js"
    click Images "https://github.com/grape-tasting-acid/beentime-frontend/tree/main/src/Img/"
    click Fonts "https://github.com/grape-tasting-acid/beentime-frontend/tree/main/src/Font/"
    click FontStyles "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/Font/css/noto-sans-korean.css"
    click APIInstance "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/api/instance.js"
    click SupaService "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/services/supabaseService.js"
    click App "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/App.js"
    click Index "https://github.com/grape-tasting-acid/beentime-frontend/blob/main/src/index.js"

    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef pages fill:#4a90e2,color:white
    classDef components fill:#4a90e2,color:white
    classDef assets fill:#2ecc71,color:white
    classDef styling fill:#9b59b6,color:white
    classDef api fill:#e67e22,color:white
    classDef entry fill:#3498db,color:white
    classDef external fill:#95a5a6,color:white

    class AEP,ALP,CEP,SP pages
    class AEC,FC components
    class Images,Fonts,FontStyles assets
    class Reset,CompStyles,StyledComp styling
    class APIInstance,SupaService api
    class App,Index entry
    class Supabase external
```
