# manavarya09/homestuco architecture

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

- Interactive diagram: https://gitdiagram.com/manavarya09/homestuco
- Repository: https://github.com/manavarya09/homestuco

## Overview

##### Project type and purpose
- This is a single-page, static web application built with React (Vite + TypeScript) and styled with Tailwind CSS.
- Its purpose is to showcase the BITS Pilani Dubai Campus Student Council: landing sections, member profiles, announcements, events, and a contact form that sends data to a Google Apps Script endpoint (which logs submissions to Google Sheets).

##### File structure
- Top-level files:
- package.json / package-lock.json: npm dependencies & scripts
- vite.config.ts, tsconfig*.json: build and TypeScript configuration
- tailwind.config.ts, postcss.config.js: styling pipeline
- public/: static assets (robots.txt, index.html is top-level)
- src/:
- main.tsx: application entry point, mounts App.tsx
- App.tsx / App.css: top-level component and global styles
- assets/: council photos and images
- components/: UI library (accordion, button, dialog, etc.) + page sections (HeroSection, AnnouncementSection, CouncilSection) + Navigation
- hooks/: custom React hooks (use-mobile, use-toast)
- lib/utils.ts: shared utility functions
- pages/: React Router pages (Index, About, Events, Merch, Contact with form, NotFound)
- There is no dedicated backend code in this repository; the only backend integration is the contact form’s external endpoint.

##### README for additional insights
- Contact form details: submits to a Google Apps Script endpoint; mentions CORS and proxy usage for production
- Deployment targets: Vercel, Netlify, or any static-hosting service with an optional proxy for the form

##### Detail without over-splitting
- Major components and interactions listed above
- Avoid drawing every single UI component file separately; group them logically (e.g., “UI Component Library”)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer & Build/CI/CD Tier
    subgraph "Build/CI/CD Tier"
        Developer["Developer & Git"]:::build
        ViteDev["Vite Dev Server & Bundler\n(vite.config.ts)"]:::build
        TSCompiler["TypeScript Compiler\n(tsconfig.json,\ntsconfig.app.json,\ntsconfig.node.json)"]:::build
        Tailwind["Tailwind CSS & PostCSS Pipeline\n(tailwind.config.ts,\npostcss.config.js)"]:::build
    end

    %% Hosting Tier
    subgraph "Hosting Tier"
        Host["Static Asset Host\n(public/, index.html)"]:::hosting
    end

    %% Client Browser & Frontend Tier
    subgraph "Client Browser"
        Browser["User's Browser"]:::frontend
        subgraph "React SPA (Frontend Modules)"
            Entry["Application Entry Point\n(src/main.tsx)"]:::frontend
            App["Root App & Global Styles\n(src/App.tsx,\nsrc/App.css)"]:::frontend
            subgraph "React Pages"
                Index["Home/Landing\n(src/pages/Index.tsx)"]:::frontend
                About["About\n(src/pages/About.tsx)"]:::frontend
                Events["Events\n(src/pages/Events.tsx)"]:::frontend
                Merch["Merch\n(src/pages/Merch.tsx)"]:::frontend
                Contact["Contact (with form)\n(src/pages/Contact.tsx)"]:::frontend
                NotFound["404 Not Found\n(src/pages/NotFound.tsx)"]:::frontend
            end
            subgraph "Page Sections"
                HeroSection["Hero Section\n(src/components/sections/HeroSection.tsx)"]:::frontend
                AnnouncementSection["Announcement Section\n(src/components/sections/AnnouncementSection.tsx)"]:::frontend
                CouncilSection["Council Section\n(src/components/sections/CouncilSection.tsx)"]:::frontend
            end
            Navigation["Navigation\n(src/components/Navigation.tsx)"]:::frontend
            UIlib["Shared UI Component Library\n(src/components/ui/)"]:::frontend
            subgraph "Hooks & Utils"
                UseMobile["use-mobile Hook\n(src/hooks/use-mobile.tsx)"]:::frontend
                UseToast["use-toast Hook\n(src/hooks/use-toast.ts)"]:::frontend
                Utils["Utility Functions\n(src/lib/utils.ts)"]:::frontend
            end
            Assets["Static Images & Council Photos\n(src/assets/)"]:::frontend
        end
    end

    %% External Backend Tier
    subgraph "External Services"
        AppsScript["Google Apps Script Endpoint"]:::external
        Sheets["Google Sheets Data Store"]:::external
    end

    %% Connections
    Developer --> ViteDev
    Developer --> TSCompiler
    Developer --> Tailwind
    ViteDev --> Host
    TSCompiler --> Host
    Tailwind --> Host
    Host --> Browser
    Browser --> Entry
    Entry --> App
    App --> Index
    App --> About
    App --> Events
    App --> Merch
    App --> Contact
    App --> NotFound
    App --> HeroSection
    App --> AnnouncementSection
    App --> CouncilSection
    App --> Navigation
    App --> UIlib
    App --> UseMobile
    App --> UseToast
    App --> Utils
    App --> Assets

    Contact -->|"POST form data"| AppsScript
    AppsScript -->|"Write data"| Sheets
    Sheets -->|"Response"| Contact

    %% Click Events
    click ViteDev "https://github.com/manavarya09/homestuco/blob/main/vite.config.ts"
    click TSCompiler "https://github.com/manavarya09/homestuco/blob/main/tsconfig.json"
    click TSCompiler "https://github.com/manavarya09/homestuco/blob/main/tsconfig.app.json"
    click TSCompiler "https://github.com/manavarya09/homestuco/blob/main/tsconfig.node.json"
    click Tailwind "https://github.com/manavarya09/homestuco/blob/main/tailwind.config.ts"
    click Tailwind "https://github.com/manavarya09/homestuco/blob/main/postcss.config.js"
    click Host "https://github.com/manavarya09/homestuco/tree/main/public/"
    click Host "https://github.com/manavarya09/homestuco/blob/main/index.html"
    click Entry "https://github.com/manavarya09/homestuco/blob/main/src/main.tsx"
    click App "https://github.com/manavarya09/homestuco/blob/main/src/App.tsx"
    click App "https://github.com/manavarya09/homestuco/blob/main/src/App.css"
    click Index "https://github.com/manavarya09/homestuco/blob/main/src/pages/Index.tsx"
    click About "https://github.com/manavarya09/homestuco/blob/main/src/pages/About.tsx"
    click Events "https://github.com/manavarya09/homestuco/blob/main/src/pages/Events.tsx"
    click Merch "https://github.com/manavarya09/homestuco/blob/main/src/pages/Merch.tsx"
    click Contact "https://github.com/manavarya09/homestuco/blob/main/src/pages/Contact.tsx"
    click NotFound "https://github.com/manavarya09/homestuco/blob/main/src/pages/NotFound.tsx"
    click HeroSection "https://github.com/manavarya09/homestuco/blob/main/src/components/sections/HeroSection.tsx"
    click AnnouncementSection "https://github.com/manavarya09/homestuco/blob/main/src/components/sections/AnnouncementSection.tsx"
    click CouncilSection "https://github.com/manavarya09/homestuco/blob/main/src/components/sections/CouncilSection.tsx"
    click Navigation "https://github.com/manavarya09/homestuco/blob/main/src/components/Navigation.tsx"
    click UIlib "https://github.com/manavarya09/homestuco/tree/main/src/components/ui/"
    click UseMobile "https://github.com/manavarya09/homestuco/blob/main/src/hooks/use-mobile.tsx"
    click UseToast "https://github.com/manavarya09/homestuco/blob/main/src/hooks/use-toast.ts"
    click Utils "https://github.com/manavarya09/homestuco/blob/main/src/lib/utils.ts"
    click Assets "https://github.com/manavarya09/homestuco/tree/main/src/assets/"

    %% Styles
    classDef build fill:#ccffcc,stroke:#333,stroke-width:1px
    classDef hosting fill:#dddddd,stroke:#333,stroke-width:1px
    classDef frontend fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef external fill:#ffddb3,stroke:#333,stroke-width:1px
```
