# omku415/eventconnect architecture

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

- Interactive diagram: https://gitdiagram.com/omku415/eventconnect
- Repository: https://github.com/omku415/eventconnect

## Overview

##### Main Components
- Frontend Component:
- Built using React (observing files with .jsx extension) and managed with Vite (vite.config.js).
- Organized into multiple UI components (e.g., AboutUs, ContactUs, Footer, Header, Home, Login, Register) to serve different pages and functionalities.
- Uses Redux for state management (authSlice.js and store.js in the Redux folder) indicating a well-structured client-side state handling.
- Assets (CSS, public folder) and a centralized layout (Layout.jsx) to ensure consistency throughout the application.
- Backend Component:
- Contains a server initialization file (server.js) and configurations (config/db.js) which connect to a database (as supported by sql/schema.sql).
- Implements routes (such as attendeeRoute.js) suggesting a RESTful API design for handling client requests.
- Package files (package.json) indicate usage of Node.js and associated libraries/dependencies for creating the API endpoints.
- Database:
- The SQL folder with schema.sql suggests that the project uses a relational database to store data such as events, users, and registrations.
- External Interfaces:
- Labeling interactions like client API calls from the Frontend to the Backend.
- Optionally, include external services connected to the backend if your environment plans to integrate services such as authentication providers or third-party event APIs (even if not explicit in the file tree, these might be part of the broader ecosystem).

##### Relationships and Interactions
- Frontend ↔ Backend:
- Backend ↔ Database:
- How the server connects to the database using configurations from config/db.js, and possibly additional data management operations.
- Intra-Frontend Structure:
- Connections between the top-level layout and individual components, with clear depiction of state management via Redux.
- Optionally, demonstrate user flows (e.g., how a user registers, logs in, browses events) by mapping out interactions across components.

##### Important Architectural Patterns & Tools
- For the Frontend:
- Component-based architecture (React) and state management (Redux).
- Use of Vite as the build tool.
- For the Backend:
- Mention usage of Node.js (implied by package.json and server.js) and a RESTful API design.
- Separation of configuration, routing, and business logic.
- Design principles:
- Separation of concerns (frontend UI vs. backend application logic).
- Modularity (separate directories for components, routes, and configuration).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        FE("React App (Frontend)"):::frontend
        VT("Vite Config"):::frontend
        LY("Centralized Layout"):::frontend
        
        subgraph "UI Components"
            AU("AboutUs"):::component
            CU("ContactUs"):::component
            FT("Footer"):::component
            HD("Header"):::component
            HM("Home"):::component
            LN("Login"):::component
            RG("Register"):::component
        end

        subgraph "Redux State Management"
            RS("Redux Slice (auth)"):::redux
            RED("Redux Store"):::redux
        end
    end

    %% Backend Layer
    subgraph "Backend Layer"
        BE("API Server"):::backend
        AR("API Routes (Attendee)"):::backend
        DB_CONF("DB Configuration"):::backend
        BP("Backend Package"):::backend
    end

    %% Database
    DB("Relational Database"):::database

    %% Relationships
    FE -->|"HTTP_API_Call"| BE
    BE -->|"Uses_Routes"| AR
    BE -->|"Uses_Config"| DB_CONF
    BE -->|"Query_DB"| DB
    AR -->|"Query_DB"| DB

    LY -->|"Renders"| AU
    LY -->|"Renders"| CU
    LY -->|"Renders"| FT
    LY -->|"Renders"| HD
    LY -->|"Renders"| HM
    LY -->|"Renders"| LN
    LY -->|"Renders"| RG

    FE -->|"Manages_State"| RS
    RS -->|"Attached_To"| RED

    %% Click Events for Frontend Components
    click FE "https://github.com/omku415/eventconnect/tree/main/Frontend/src"
    click AU "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Component/AboutUs/AboutUs.jsx"
    click CU "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Component/ContactUs/ContactUs.jsx"
    click FT "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Component/Footer/Footer.jsx"
    click HD "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Component/Header/MainNavbar.jsx"
    click HM "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Component/Home/Home.jsx"
    click LN "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Component/Login/Login.jsx"
    click RG "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Component/Register/Register.jsx"
    click RS "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Redux/authSlice.js"
    click RED "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Redux/store.js"
    click LY "https://github.com/omku415/eventconnect/blob/main/Frontend/src/Layout.jsx"
    click VT "https://github.com/omku415/eventconnect/blob/main/Frontend/vite.config.js"

    %% Click Events for Backend Components
    click BE "https://github.com/omku415/eventconnect/blob/main/Backend/server.js"
    click AR "https://github.com/omku415/eventconnect/blob/main/Backend/routes/attendeeRoute.js"
    click DB_CONF "https://github.com/omku415/eventconnect/blob/main/Backend/config/db.js"
    click BP "https://github.com/omku415/eventconnect/blob/main/Backend/package.json"

    %% Click Events for Database Schema
    click DB "https://github.com/omku415/eventconnect/blob/main/Backend/sql/schema.sql"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef database fill:#FFD700,stroke:#000,stroke-width:2px,stroke-dasharray: 5 5;
    classDef redux fill:#FFA07A,stroke:#000,stroke-width:2px;
    classDef component fill:#E0FFFF,stroke:#000,stroke-width:2px;
```
