# ahmed-badi/hackathon-student-hive architecture

> Architecture diagram of the GitHub repository ahmed-badi/hackathon-student-hive, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahmed-badi/hackathon-student-hive
- Repository: https://github.com/ahmed-badi/hackathon-student-hive

## Overview

##### Project type and purpose
- This is a full-stack, single-page web application built with Vite, TypeScript, and React.
- It uses shadcn-ui and Tailwind CSS for UI, and Supabase for backend services (authentication, database, and serverless functions).
- Its purpose is to present public pages (landing, FAQ, sponsors, schedule, register, feedback, etc.) and an admin portal for managing registrations, submissions, messages, teams, etc.

##### File structure
- Top-level files (package.json, tsconfig.json, vite.config.ts) configure the build/toolchain.
- public/ holds static assets (logos, robots.txt).
- src/ contains:
- pages/ – React page components mapped to routes (Index, About, Register, Admin, AdminAuth, etc.)
- components/ – reusable UI pieces subdivided by domain (admin, feedback, navbar, ui-library)
- integrations/supabase – Supabase client and type definitions
- lib – local utilities (state store, helpers)
- hooks – custom React hooks (mobile detection, toast, admin auth)
- main.tsx – React application entry point
- supabase/ holds Supabase config and Edge Functions (send-confirmation).

##### README for additional insights
- Confirms UI stack: Vite, TS, React, shadcn-ui, Tailwind.
- Mentions deployment via Lovable (automates hosting, domain management).

- Call out authentication flow separately (e.g., token exchange with GoTrue).
- Data flow for key user journeys: registration submission, admin dashboard data fetch, feedback form submission.
- Build/deploy pipeline: Vite → static assets → Lovable hosting → CDN.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Build & Config"
        VITE["Vite Config"]:::tool
        TAILWIND["Tailwind CSS Config"]:::tool
    end

    subgraph "Frontend Layer"
        CDN["Static Hosting / CDN (Lovable)"]:::cdn
        BROWSER["Browser (SPA Client)"]:::browser
        REACT["React SPA"]:::frontend
    end

    subgraph "Backend Layer (Supabase)"
        AUTH["Supabase Auth (GoTrue)"]:::backend
        DB["Supabase Postgres"]:::backend
        EDGE["Edge Function: send-confirmation"]:::backend
    end

    EXTERNAL["Email Service API"]:::external

    VITE --> REACT
    TAILWIND --> REACT

    CDN -->|"Serves index.html"| BROWSER
    BROWSER -->|"Loads SPA"| REACT
    REACT -->|"HTTPS Auth"| AUTH
    REACT -->|"HTTPS DB"| DB
    REACT -->|"Invoke Edge Fn"| EDGE
    EDGE -->|"HTTP Request"| EXTERNAL

    click VITE "https://github.com/ahmed-badi/hackathon-student-hive/blob/main/vite.config.ts"
    click TAILWIND "https://github.com/ahmed-badi/hackathon-student-hive/blob/main/tailwind.config.ts"
    click CDN "https://github.com/ahmed-badi/hackathon-student-hive/blob/main/index.html"
    click REACT "https://github.com/ahmed-badi/hackathon-student-hive/blob/main/src/main.tsx"
    click REACT "https://github.com/ahmed-badi/hackathon-student-hive/blob/main/src/App.tsx"
    click EDGE "https://github.com/ahmed-badi/hackathon-student-hive/blob/main/supabase/functions/send-confirmation/index.ts"
    click AUTH "https://github.com/ahmed-badi/hackathon-student-hive/blob/main/supabase/config.toml"

    classDef cdn fill:#cce5ff,stroke:#007bff,color:#004085
    classDef browser fill:#d1ecf1,stroke:#17a2b8,color:#0c5460
    classDef frontend fill:#d4edda,stroke:#28a745,color:#155724
    classDef backend fill:#fff3cd,stroke:#ffc107,color:#856404
    classDef external fill:#e2e3e5,stroke:#6c757d,color:#343a40
    classDef tool fill:#f8d7da,stroke:#dc3545,color:#721c24
```
