# rajit-d/avenir-24-demo architecture

> Architecture diagram of the GitHub repository rajit-d/avenir-24-demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rajit-d/avenir-24-demo
- Repository: https://github.com/rajit-d/avenir-24-demo

## Overview

##### Main Components

A. Frontend Layer:
- Client-Side Components (React/Next.js)
- Main page routes (/events, /teams, /singleForm, /multipleForm)
- Component structure (LandingPage, EventsCard, TeamsCard, etc.)
- UI Components Library (custom components in /components/ui)
- Static Assets (/public/assets)

B. Application Layer:
- Next.js App Router (shown by the app directory structure)
- API Routes (if any are added in the future)
- Server Components (pages with server-side rendering)

C. External Services:
- Supabase Integration (indicated by utils/supabase.ts)
- File Storage System (suggested by FileUpload component)

##### Architectural Patterns to Highlight

- Next.js 13+ App Router architecture
- Demonstrate the component hierarchy
- Data flow between client and server components
- Interaction with Supabase

**[Frontend Layer]**
- ↓
**[Next.js App Router]**
- ↓
**[Server Components] ←→ [Client Components]**
- ↓
**[External Services]**
- Supabase
- File Storage

##### Implementation Details

**[Client Components]**
- ↓
**[App Router]**
- ↓
**[Server Components]**
- ↓
**[External Services]**

- Data flow direction
- Component dependencies
- API calls
- Database operations

- Component types
- Route types (dynamic vs static)
- Data flow patterns
- Integration points

Remember to include:
- Error handling flows
- Authentication paths (if implemented)
- File upload processes
- Real-time updates (if any)
- Component reuse patterns

This will provide a comprehensive view of the application's architecture while maintaining clarity and usefulness for development and maintenance purposes.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Frontend
        LP[Landing Page]
        EP[Events Page]
        TP[Teams Page]
        SF[Single Form]
        MF[Multiple Form]
        
        subgraph UILib[UI Components Library]
            direction TB
            BG[Background Gradient]
            SP[Sparkles]
            VX[Vortex]
            IN[Input]
            SL[Select]
        end
        
        subgraph Interactive[Interactive Features]
            direction TB
            BL[3D Blob]
            CL[Clock]
            MD[Modal]
        end
        
        subgraph Layout[Layout Components]
            direction TB
            NB[Navbar]
            FT[Footer]
        end
    end
    
    subgraph AppRouter[Next.js App Router]
        direction TB
        ER["/events"]
        TR["/teams"]
        SFR["/singleForm"]
        MFR["/multipleForm"]
    end
    
    subgraph External[External Services]
        direction TB
        SB[(Supabase)]
        FS[File Storage]
    end
    
    subgraph Assets[Static Assets]
        direction TB
        PA[Public Assets]
    end
    
    %% Connections
    LP --> ER
    EP --> ER
    TP --> TR
    SF --> SFR
    MF --> MFR
    
    AppRouter --> External
    FS --> SB
    
    %% Click events
    click LP "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/LandingPage/LandingPage.tsx"
    click EP "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/EventsPage/EventsPage.tsx"
    click TP "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/TeamsCard/TeamsCard.tsx"
    click SF "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/EventForm/SingleForm.tsx"
    click MF "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/EventForm/MultipleForm.tsx"
    click BG "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/ui/background-gradient.tsx"
    click SP "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/ui/sparkles.tsx"
    click VX "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/ui/vortex.tsx"
    click IN "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/ui/input.tsx"
    click SL "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/ui/select.tsx"
    click NB "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/Navbar/Navbar.tsx"
    click FT "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/Footer/Footer.tsx"
    click BL "https://github.com/Rajit-D/avenir-24-demo/tree/main/components/Blob"
    click CL "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/Clock/Clock.js"
    click MD "https://github.com/Rajit-D/avenir-24-demo/blob/main/components/Modal/Modal.tsx"
    click ER "https://github.com/Rajit-D/avenir-24-demo/tree/main/app/events"
    click TR "https://github.com/Rajit-D/avenir-24-demo/tree/main/app/teams"
    click SFR "https://github.com/Rajit-D/avenir-24-demo/tree/main/app/singleForm"
    click MFR "https://github.com/Rajit-D/avenir-24-demo/tree/main/app/multipleForm"
    click SB "https://github.com/Rajit-D/avenir-24-demo/blob/main/utils/supabase.ts"
    click PA "https://github.com/Rajit-D/avenir-24-demo/tree/main/public/assets"
    
    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef router fill:#2ecc71,stroke:#27ae60,color:white
    classDef external fill:#9b59b6,stroke:#8e44ad,color:white
    classDef assets fill:#95a5a6,stroke:#7f8c8d,color:white
    
    class LP,EP,TP,SF,MF,UILib,Interactive,Layout frontend
    class AppRouter,ER,TR,SFR,MFR router
    class External,SB,FS external
    class Assets,PA assets
```
