# sohamghadge24/event-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/sohamghadge24/event-management-system
- Repository: https://github.com/sohamghadge24/event-management-system

## Overview

##### Project Type and Purpose
- This is a front-end single-page application (SPA) built with React, TypeScript, Vite, Tailwind CSS, PostCSS, and ESLint.
- It doesn’t ship a backend; it either consumes external APIs or works against its own mock data.

##### File Structure
- Top-level build/config files:
–  vite.config.ts, tsconfig*.json, postcss.config.js, tailwind.config.js
–  ESLint config: eslint.config.js
- Public assets: public/ + index.html at root
- Source code under src/:
–  main.tsx + index.css – the SPA entry point
–  App.tsx + App.css – the root React component and styling
–  components/ – reusable UI elements, layout, dashboards, event & notification widgets
–  pages/ – route-level React components (HomePage, DashboardPage, etc.)
–  context/ – global React Context providers (AuthContext, EventContext, NotificationContext)
–  constants/, utils/, types/, assets/, Style/ – supporting code, mock data, helper functions, styling

##### README for Additional Insights
- Confirms use of Vite for HMR, Babel/SWC plug-in for fast refresh
- Mentions ESLint customization for TypeScript and React

##### Main Components
a. Build & Dev Tooling Layer
- Vite Dev Server (HMR)
- TypeScript → JavaScript compiler (tsc, SWC or Babel)
- PostCSS & Tailwind CSS processor
b. Runtime Browser Layer
- index.html → Mounts React App
- App Component → Wrapped by React Router (implied by pages/)
- Context Providers
–  AuthContext
–  EventContext
–  NotificationContext
- Pages (each corresponds to a route)
–  HomePage, DashboardPage, CalendarPage, etc.
- UI Components
–  Layout (Navigation, Footer)
–  EventList, EventCard, NotificationList, DashboardStats
–  Core primitives (Button, Card, Input, Badge, Textarea)
- Styling & Assets
–  Tailwind classes + App.css + homePage.css
–  Static assets from public/ and src/assets

##### Relationships & Data Flows
- Vite compiles/transforms code → serves bundle to browser
- Browser loads index.html → hydrates App component
- App wraps children within Context Providers
- Context Providers fetch or load data (from external API endpoints or mockData.ts)
- Pages subscribe to context state → pass data down to UI components
- UI components render lists, cards, badges, etc., raise events (e.g., click “Register”)

##### Architectural Patterns & Design Principles
- SPA with client-side routing (React Router)
- Composition over inheritance: small, reusable UI primitives in src/components/ui
- Context API for global state management, separated into domain contexts (Auth, Event, Notification)
- Tailwind + PostCSS for utility-first styling
- TypeScript for type safety, ESLint for linting rules

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Build & Tooling Layer
    subgraph "Build & Tooling" 
        direction TB
        Vite["Vite Dev Server & Build (HMR)"]:::build
        TSCompiler["TypeScript Compiler (tsc/SWC/Babel)"]:::build
        PostCSS["PostCSS Processor"]:::build
        Tailwind["Tailwind CSS Processor"]:::build
        ESLint["ESLint"]:::build
    end

    Vite -->|bundles/transforms| TSCompiler
    TSCompiler --> PostCSS
    PostCSS --> Tailwind
    Tailwind -->|final CSS| Vite
    Vite -->|"serves"| IndexHTML

    %% Public & Entry
    subgraph "Public & Entry" 
        direction TB
        IndexHTML["index.html"]:::runtime
        PublicAssets["public/"]:::runtime
    end

    IndexHTML -->|loads| Main
    PublicAssets -->|assets| IndexHTML

    %% SPA Entry Point
    Main["src/main.tsx"]:::runtime
    IndexCSS["src/index.css"]:::runtime

    Main -->|imports styles| IndexCSS
    Main -->|mounts| App

    %% App Shell
    App["src/App.tsx"]:::app
    AppCSS["src/App.css"]:::app

    App -->|styles| AppCSS
    App --> AuthContext
    App --> EventContext
    App --> NotificationContext
    App --> PagesGroup

    %% Context/Data Layer
    subgraph "Context Providers" 
        direction TB
        AuthContext["AuthContext"]:::context
        EventContext["EventContext"]:::context
        NotificationContext["NotificationContext"]:::context
    end

    %% Data Sources
    MockData["mockData.ts"]:::data
    ExternalAPI["External API"]:::data

    MockData --> AuthContext
    MockData --> EventContext
    MockData --> NotificationContext
    ExternalAPI -.-> AuthContext
    ExternalAPI -.-> EventContext
    ExternalAPI -.-> NotificationContext

    %% Pages
    subgraph "Pages (Routes)" 
        direction TB
        HomePage["HomePage"]:::pages
        DashboardPage["DashboardPage"]:::pages
        CalendarPage["CalendarPage"]:::pages
        EventDetailPage["EventDetailPage"]:::pages
        EventFormPage["EventFormPage"]:::pages
        ExplorePage["ExplorePage"]:::pages
        NotificationsPage["NotificationsPage"]:::pages
        LoginPage["LoginPage"]:::pages
        RegisterPage["RegisterPage"]:::pages
    end

    PagesGroup["Pages Container"]:::app --> HomePage
    PagesGroup --> DashboardPage
    PagesGroup --> CalendarPage
    PagesGroup --> EventDetailPage
    PagesGroup --> EventFormPage
    PagesGroup --> ExplorePage
    PagesGroup --> NotificationsPage
    PagesGroup --> LoginPage
    PagesGroup --> RegisterPage

    AuthContext --> PagesGroup
    EventContext --> PagesGroup
    NotificationContext --> PagesGroup

    %% UI Components
    subgraph "UI Components" 
        direction TB
        subgraph "Layout" 
            Navigation["Navigation"]:::ui
            Footer["Footer"]:::ui
        end
        subgraph "Domain Widgets" 
            DashboardStats["DashboardStats"]:::ui
            EventList["EventList"]:::ui
            EventCard["EventCard"]:::ui
            NotificationList["NotificationList"]:::ui
        end
        subgraph "Core Primitives" 
            Button["Button"]:::ui
            Card["Card"]:::ui
            Input["Input"]:::ui
            Badge["Badge"]:::ui
            Textarea["Textarea"]:::ui
        end
    end

    PagesGroup --> Navigation
    PagesGroup --> Footer
    PagesGroup --> DashboardStats
    PagesGroup --> EventList
    PagesGroup --> EventCard
    PagesGroup --> NotificationList
    PagesGroup --> Button
    PagesGroup --> Card
    PagesGroup --> Input
    PagesGroup --> Badge
    PagesGroup --> Textarea

    %% Supporting Modules
    subgraph "Supporting Modules" 
        direction TB
        MockData
        Utils["cn.ts"]:::support
        Types["index.ts"]:::support
        Assets["src/assets/"]:::support
        HomeStyle["src/Style/homePage.css"]:::support
    end

    Utils --> EventList
    Types --> App
    Assets --> EventCard
    HomeStyle --> HomePage

    %% Click Events
    click Vite "https://github.com/sohamghadge24/event-management-system/blob/main/vite.config.ts"
    click TSCompiler "https://github.com/sohamghadge24/event-management-system/blob/main/tsconfig.json"
    click PostCSS "https://github.com/sohamghadge24/event-management-system/blob/main/postcss.config.js"
    click Tailwind "https://github.com/sohamghadge24/event-management-system/blob/main/tailwind.config.js"
    click ESLint "https://github.com/sohamghadge24/event-management-system/blob/main/eslint.config.js"
    click IndexHTML "https://github.com/sohamghadge24/event-management-system/blob/main/index.html"
    click PublicAssets "https://github.com/sohamghadge24/event-management-system/tree/main/public/"
    click Main "https://github.com/sohamghadge24/event-management-system/blob/main/src/main.tsx"
    click IndexCSS "https://github.com/sohamghadge24/event-management-system/blob/main/src/index.css"
    click App "https://github.com/sohamghadge24/event-management-system/blob/main/src/App.tsx"
    click AppCSS "https://github.com/sohamghadge24/event-management-system/blob/main/src/App.css"
    click AuthContext "https://github.com/sohamghadge24/event-management-system/blob/main/src/context/AuthContext.tsx"
    click EventContext "https://github.com/sohamghadge24/event-management-system/blob/main/src/context/EventContext.tsx"
    click NotificationContext "https://github.com/sohamghadge24/event-management-system/blob/main/src/context/NotificationContext.tsx"
    click HomePage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/HomePage.tsx"
    click DashboardPage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/DashboardPage.tsx"
    click CalendarPage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/CalendarPage.tsx"
    click EventDetailPage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/EventDetailPage.tsx"
    click EventFormPage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/EventFormPage.tsx"
    click ExplorePage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/ExplorePage.tsx"
    click NotificationsPage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/NotificationsPage.tsx"
    click LoginPage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/LoginPage.tsx"
    click RegisterPage "https://github.com/sohamghadge24/event-management-system/blob/main/src/pages/RegisterPage.tsx"
    click Navigation "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/layout/Navigation.tsx"
    click Footer "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/layout/Footer.tsx"
    click DashboardStats "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/dashboard/DashboardStats.tsx"
    click EventList "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/events/EventList.tsx"
    click EventCard "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/events/EventCard.tsx"
    click NotificationList "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/notifications/NotificationList.tsx"
    click Button "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/ui/Button.tsx"
    click Card "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/ui/Card.tsx"
    click Input "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/ui/Input.tsx"
    click Badge "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/ui/Badge.tsx"
    click Textarea "https://github.com/sohamghadge24/event-management-system/blob/main/src/components/ui/Textarea.tsx"
    click MockData "https://github.com/sohamghadge24/event-management-system/blob/main/src/constants/mockData.ts"
    click Utils "https://github.com/sohamghadge24/event-management-system/blob/main/src/utils/cn.ts"
    click Types "https://github.com/sohamghadge24/event-management-system/blob/main/src/types/index.ts"
    click Assets "https://github.com/sohamghadge24/event-management-system/tree/main/src/assets/"
    click HomeStyle "https://github.com/sohamghadge24/event-management-system/blob/main/src/Style/homePage.css"

    %% Styles
    classDef build fill:#D0E8FF,stroke:#1E3A8A,color:#1E3A8A
    classDef runtime fill:#E6FFFA,stroke:#065F46,color:#065F46
    classDef app fill:#ECFDF5,stroke:#047857,color:#047857
    classDef context fill:#FFF7ED,stroke:#C2410C,color:#C2410C
    classDef data fill:#FAF3C0,stroke:#78350F,color:#78350F
    classDef pages fill:#F5F3FF,stroke:#6D28D9,color:#6D28D9
    classDef ui fill:#F0F5FF,stroke:#4338CA,color:#4338CA
    classDef support fill:#F3F4F6,stroke:#4B5563,color:#4B5563
```
