# deltahacks/landing-12 architecture

> Architecture diagram of the GitHub repository deltahacks/landing-12, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/deltahacks/landing-12
- Repository: https://github.com/deltahacks/landing-12

## Overview

##### Project type and purpose
- This repository is a Next.js “T3 Stack” scaffold, but in its current form it’s being used as a static/SSR React website. It uses Next.js App Router (src/app), TypeScript, Tailwind CSS for styling, and PostHog for analytics. The site displays sections like Hero, AboutUs, Speakers, Sponsors, FAQ, and pulls data from local JSON files under src/data and public/assets.

##### File structure
- Top-level config and tooling:
- next.config.js, tsconfig.json, postcss.config.js, prettier.config.js, eslint.config.js, .github/workflows/main.yml.
- .env.example hints at environment variables (e.g. for PostHog, possible future backend).
- Public folder:
- public/assets – static images for speakers/sponsors, carousel graphics.
- public/memberPictures – uploaded profile pictures.
- src/app:
- layout.tsx, page.tsx — Next.js App Router root.
- src/components:
- src/sections:
- Page-specific grouping of components and data.
- src/data:
- JSON/TS data sources used at build time (e.g. speakersData.ts, sponsorsData.ts, members.json).
- src/lib & src/hooks:
- Utilities (PostHog initialization, helper functions) and custom hooks (accordion animations).

##### README for additional insights
- It references T3 Stack technologies (NextAuth, Prisma, Drizzle, tRPC) but they aren’t yet utilized here—this instance is purely a frontend site.

##### Main components and interactions
a. Frontend (Next.js App)
- Routes & SSR/SSG: layout.tsx/page.tsx serve HTML, hydrate React components.
- Components: Navbar, Hero, AboutUs, Carousel, Speakers, Sponsors, FAQ.
- Data sources: local JSON/TS modules (src/data) at build time or client side.
- Styles: Tailwind CSS via postcss.
- Assets: served from public/ folder over CDN.
b. Analytics service
- PostHog: initialized in PostHogProvider, captures page views, events.
c. Hosting & CDN
- Static and SSR endpoints deployed on Vercel or Netlify.
- CDN for public/ assets.

##### Architectural patterns & design principles
- Component-based UI architecture (React/Next.js).
- Separation of concerns:
- “sections” compose page layouts.
- “components” are reusable UI elements.
- “data” folder simulates a headless CMS/API return values.
- Static generation for performance: JSON data files loaded at build time.
- Analytics integration abstracted in a provider.

##### Detail & clarity
- Related items (data + assets under “Build/Deploy” cluster).
- Future/back-end placeholders: Prisma DB, tRPC API layer, NextAuth identity provider.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Layers
    subgraph "Browser (Client)"
        direction TB
        Browser["Browser"]:::frontend
    end

    subgraph "Next.js App Server (SSR/SSG)"
        direction TB
        subgraph "App Components"
            direction TB
            Layout["layout.tsx / page.tsx"]:::frontend
            Globals["globals.css"]:::frontend
            Navbar["Navbar.tsx"]:::frontend
            Hero["Hero.tsx"]:::frontend
            AboutUsSection["AboutUs.tsx"]:::frontend
            AboutUsCard["AboutUsCard.tsx"]:::frontend
            SpeakersSection["Speakers.tsx"]:::frontend
            SpeakerCard["SpeakerCard.tsx"]:::frontend
            SpeakerBg["SpeakerBackground.tsx"]:::frontend
            SponsorsSection["Sponsors.tsx"]:::frontend
            SponsorComp["Sponsor.tsx"]:::frontend
            FAQSection["FAQ.tsx"]:::frontend
            QuestionComp["Question.tsx"]:::frontend
            CarouselItem["CarouselItem.tsx"]:::frontend
            TeamCarousel["TeamCarousel.tsx"]:::frontend
            PostHogProv["PostHogProvider.tsx"]:::frontend
            PHUtil["posthog.ts"]:::frontend
            AccordionHook["useAccordionAnimation.ts"]:::frontend
            Utils["utils.ts"]:::frontend
        end
        subgraph "Build Data (Static JSON/TS)" 
            direction TB
            AboutData["aboutUsData.tsx"]:::data
            SpeakersData["speakersData.ts"]:::data
            SponsorsData["sponsorsData.ts"]:::data
            QuestionsData["questionData.ts"]:::data
        end
        subgraph "Static Assets CDN" 
            direction TB
            Assets["public/assets/*"]:::storage
            CarouselAssets["public/carousel"]:::storage
            MemberPics["public/memberPictures"]:::storage
        end
    end

    PostHog["PostHog Analytics"]:::external

    %% Connections
    Browser -->|"GET /"| Layout
    Layout -->|"render page"| Browser
    Browser -->|"GET assets"| Assets
    Browser -->|"GET carousel assets"| CarouselAssets
    Browser -->|"GET member pictures"| MemberPics
    Browser -->|"POST /capture event"| PostHog

    %% Click Events
    click Layout "https://github.com/deltahacks/landing-12/blob/main/src/app/layout.tsx"
    click Layout "https://github.com/deltahacks/landing-12/blob/main/src/app/page.tsx"
    click Globals "https://github.com/deltahacks/landing-12/blob/main/src/styles/globals.css"
    click Navbar "https://github.com/deltahacks/landing-12/blob/main/src/components/Navbar.tsx"
    click Hero "https://github.com/deltahacks/landing-12/blob/main/src/sections/Hero.tsx"
    click AboutUsSection "https://github.com/deltahacks/landing-12/blob/main/src/sections/AboutUs.tsx"
    click AboutUsCard "https://github.com/deltahacks/landing-12/blob/main/src/components/AboutUsCard.tsx"
    click SpeakersSection "https://github.com/deltahacks/landing-12/blob/main/src/sections/Speakers.tsx"
    click SpeakerCard "https://github.com/deltahacks/landing-12/blob/main/src/components/SpeakerCard.tsx"
    click SpeakerBg "https://github.com/deltahacks/landing-12/blob/main/src/components/SpeakerBackground.tsx"
    click SponsorsSection "https://github.com/deltahacks/landing-12/blob/main/src/sections/Sponsors.tsx"
    click SponsorComp "https://github.com/deltahacks/landing-12/blob/main/src/components/Sponsor.tsx"
    click FAQSection "https://github.com/deltahacks/landing-12/blob/main/src/sections/FAQ.tsx"
    click QuestionComp "https://github.com/deltahacks/landing-12/blob/main/src/components/Question.tsx"
    click CarouselItem "https://github.com/deltahacks/landing-12/blob/main/src/components/CarouselItem.tsx"
    click TeamCarousel "https://github.com/deltahacks/landing-12/blob/main/src/components/TeamCarousel.tsx"
    click PostHogProv "https://github.com/deltahacks/landing-12/blob/main/src/components/PostHogProvider.tsx"
    click PHUtil "https://github.com/deltahacks/landing-12/blob/main/src/lib/posthog.ts"
    click AccordionHook "https://github.com/deltahacks/landing-12/blob/main/src/hooks/useAccordionAnimation.ts"
    click Utils "https://github.com/deltahacks/landing-12/blob/main/src/lib/utils.ts"
    click AboutData "https://github.com/deltahacks/landing-12/blob/main/src/data/aboutUsData.tsx"
    click SpeakersData "https://github.com/deltahacks/landing-12/blob/main/src/data/speakersData.ts"
    click SponsorsData "https://github.com/deltahacks/landing-12/blob/main/src/data/sponsorsData.ts"
    click QuestionsData "https://github.com/deltahacks/landing-12/blob/main/src/data/questionData.ts"
    click Assets "https://github.com/deltahacks/landing-12/tree/main/public/assets/speakers"
    click Assets "https://github.com/deltahacks/landing-12/tree/main/public/assets/sponsors"
    click CarouselAssets "https://github.com/deltahacks/landing-12/tree/main/public/carousel"
    click MemberPics "https://github.com/deltahacks/landing-12/tree/main/public/memberPictures"

    %% Styles
    classDef frontend fill:#E0F2FE,stroke:#0369A1,stroke-width:1px;
    classDef storage fill:#DCFCE7,stroke:#166534,stroke-width:1px,stroke-dasharray: 5 2;
    classDef data fill:#CCFBF1,stroke:#0E7490,stroke-width:1px;
    classDef external fill:#FFEDD5,stroke:#C2410C,stroke-width:1px,stroke-dasharray: 5 2;
```
