# prashanth7993/project-d1 architecture

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

- Interactive diagram: https://gitdiagram.com/prashanth7993/project-d1
- Repository: https://github.com/prashanth7993/project-d1

## Overview

##### Main Components
- Frontend: Represent the React application (event-management-dashboard) that provides the user interface. Highlight that it uses components (like AttendeeManagement, EventManagement, Navbar, TaskTracker) and communicates with backend services through REST APIs.
- Backend: Emphasize the Spring Boot application built in Java, organized using standard packages (controllers, services, repositories, models, and configuration). Indicate the API endpoints for events, attendees, and tasks as key interaction points.
- Database: Although the README mentions MySQL, the file tree configuration and properties also note PostgreSQL as an option – but for this project, based on the instructions, assume a relational database (MySQL) is in use to persist events, attendees, and task data.
- Infrastructure & Deployment: Include Docker (Dockerfiles for both backend and frontend) and Kubernetes configuration files (YAML manifests for deploying both the Java Spring Boot service and the React service, as well as for database and storage resources). Additionally, mention the Jenkinsfile to show CI/CD integration.

##### Relationships and Interactions
- CI/CD: Illustrate the pipeline by including a Jenkins component that triggers builds (possibly container builds via Docker) and deployments to Kubernetes.
- Deployment & Orchestration: Represent how Docker images are deployed using Kubernetes resources (deployments, services, persistent volumes) for both Java and React services.

##### Architectural Patterns and Design Principles
- Separation of Concerns: The frontend is decoupled from the backend’s business logic. Each layer is cleanly defined in its own directory (e.g., React components/services vs. Spring Boot controllers/services/ repositories).
- MVC Pattern in the Backend: Identify the Model-View-Controller (MVC) paradigm by showing models, controllers (handling REST requests), and services (encapsulating business logic).
- RESTful APIs: Emphasize that the backend layer provides REST endpoints for managing events, attendees, and tasks, designed with standard HTTP methods.
- Containerization & Orchestration: Mention Docker for building isolated environments and Kubernetes for deployment and scaling.

##### Relevant Technologies and Frameworks
- Frontend: React, Node.js (npm), and related tooling.
- Backend: Java 8, Spring Boot, Maven (with a pom.xml for dependency management).
- Database: MySQL (as specified in the README).
- CI/CD & Deployment: Jenkins (Jenkinsfile), Docker, and Kubernetes (with YAML files for various resources).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Section
    subgraph "Frontend"
        React_Frontend("React Frontend"):::frontend
        AttendeeManagement("AttendeeManagement"):::frontend
        EventManagement("EventManagement"):::frontend
        Navbar("Navbar"):::frontend
        TaskTracker("TaskTracker"):::frontend
        Frontend_API("API Service"):::frontend
    end

    %% Backend & Infrastructure Section
    subgraph "Backend & Infrastructure"
        %% Backend Components Subgraph
        subgraph "Backend Components"
            Backend("Spring Boot Backend"):::backend
            %% Dummy group nodes for layered architecture
            B_CONT("Controllers"):::backend
            B_SERV("Services"):::backend
            B_REPO("Repositories"):::backend
            Models("Models"):::backend

            %% Controllers
            AttendeeController("AttendeeController"):::backend
            EventController("EventController"):::backend
            TaskController("TaskController"):::backend

            %% Services
            AttendeeService("AttendeeService"):::backend
            EventService("EventService"):::backend
            TaskService("TaskService"):::backend

            %% Repositories
            AttendeeRepository("AttendeeRepository"):::backend
            EventRepository("EventRepository"):::backend
            TaskRepository("TaskRepository"):::backend

            %% Models
            Attendee("Attendee"):::backend
            Event("Event"):::backend
            Task("Task"):::backend

            %% Database
            MySQL_DB("MySQL Database"):::database
        end

        %% Deployment & CI/CD Subgraph
        subgraph "Deployment & CI/CD"
            Jenkins("Jenkins Pipeline"):::infra
            Docker_Backend("Backend Docker Config"):::infra
            Docker_Frontend("Frontend Docker Config"):::infra

            subgraph "Kubernetes Cluster"
                K8s_Java_Deployment("Java Spring Boot Deployment"):::infra
                K8s_Java_Service("Java Spring Boot Service"):::infra
                K8s_React_Deployment("React Frontend Deployment"):::infra
                K8s_React_Service("React Frontend Service"):::infra
                K8s_MySQL_Dep("MySQL Deployment"):::infra
                K8s_MySQL_Service("MySQL Service"):::infra
                K8s_PV("Persistent Volume"):::infra
                K8s_PVC("Persistent Volume Claim"):::infra
            end
        end
    end

    %% Relationships in Frontend
    React_Frontend -->|"includes"| AttendeeManagement
    React_Frontend -->|"includes"| EventManagement
    React_Frontend -->|"includes"| Navbar
    React_Frontend -->|"includes"| TaskTracker
    React_Frontend -->|"uses"| Frontend_API

    %% Frontend to Backend REST API Call
    React_Frontend -->|"HTTP REST API calls"| Backend

    %% Backend Layered Architecture
    Backend -->|"routesTo"| B_CONT
    Backend -->|"processes"| B_SERV
    Backend -->|"dataAccess"| B_REPO

    %% Controllers connections
    B_CONT --> AttendeeController
    B_CONT --> EventController
    B_CONT --> TaskController

    %% Services connections
    B_SERV --> AttendeeService
    B_SERV --> EventService
    B_SERV --> TaskService

    %% Repositories connections
    B_REPO --> AttendeeRepository
    B_REPO --> EventRepository
    B_REPO --> TaskRepository

    %% Models grouping
    Models --> Attendee
    Models --> Event
    Models --> Task

    %% Data persistence connection
    B_REPO -->|"CRUD operations"| MySQL_DB

    %% CI/CD Pipeline and Deployment Flow
    Jenkins -->|"triggers"| Docker_Backend
    Jenkins -->|"triggers"| Docker_Frontend

    Docker_Backend -->|"builds"| K8s_Java_Deployment
    Docker_Backend -->|"builds"| K8s_Java_Service
    Docker_Frontend -->|"builds"| K8s_React_Deployment
    Docker_Frontend -->|"builds"| K8s_React_Service

    %% Kubernetes Database Deployment linking to Database
    K8s_MySQL_Service -->|"connects"| MySQL_DB

    %% Class definitions for color coding
    classDef frontend fill:#f9e79f,stroke:#000,stroke-width:2px;
    classDef backend fill:#aed6f1,stroke:#000,stroke-width:2px;
    classDef database fill:#c3f6b4,stroke:#000,stroke-width:2px;
    classDef infra fill:#f5b7b1,stroke:#000,stroke-width:2px;

    %% Click Events for Frontend Components
    click React_Frontend "https://github.com/prashanth7993/project-d1/tree/main/Frontend-ReactJs/event-management-dashboard/"
    click AttendeeManagement "https://github.com/prashanth7993/project-d1/tree/main/Frontend-ReactJs/event-management-dashboard/src/components/"
    click EventManagement "https://github.com/prashanth7993/project-d1/tree/main/Frontend-ReactJs/event-management-dashboard/src/components/"
    click Navbar "https://github.com/prashanth7993/project-d1/tree/main/Frontend-ReactJs/event-management-dashboard/src/components/"
    click TaskTracker "https://github.com/prashanth7993/project-d1/tree/main/Frontend-ReactJs/event-management-dashboard/src/components/"
    click Frontend_API "https://github.com/prashanth7993/project-d1/blob/main/Frontend-ReactJs/event-management-dashboard/src/services/api.js"

    %% Click Events for Backend Components
    click Backend "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/"
    click AttendeeController "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/Controllers/"
    click EventController "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/Controllers/"
    click TaskController "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/Controllers/"
    click AttendeeService "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/service/"
    click EventService "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/service/"
    click TaskService "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/service/"
    click AttendeeRepository "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/Repository/"
    click EventRepository "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/Repository/"
    click TaskRepository "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/Repository/"
    click Attendee "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/model/"
    click Event "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/model/"
    click Task "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/src/main/java/com/EventManagment/model/"

    %% Click Events for Docker Configurations
    click Docker_Backend "https://github.com/prashanth7993/project-d1/tree/main/Backend-Java/Event_Managment/Dockerfile"
    click Docker_Frontend "https://github.com/prashanth7993/project-d1/tree/main/Frontend-ReactJs/event-management-dashboard/Dockerfile"

    %% Click Events for Kubernetes Manifests
    click K8s_Java_Deployment "https://github.com/prashanth7993/project-d1/blob/main/Kubernetes/springboot-deploy.yaml"
    click K8s_Java_Service "https://github.com/prashanth7993/project-d1/blob/main/Kubernetes/java-springboot-service.yaml"
    click K8s_React_Deployment "https://github.com/prashanth7993/project-d1/blob/main/Kubernetes/react-event-deploy.yaml"
    click K8s_React_Service "https://github.com/prashanth7993/project-d1/blob/main/Kubernetes/react-event-service.yaml"
    click K8s_MySQL_Dep "https://github.com/prashanth7993/project-d1/blob/main/Kubernetes/mysql-deploy.yaml"
    click K8s_MySQL_Service "https://github.com/prashanth7993/project-d1/blob/main/Kubernetes/mysql-service.yaml"
    click K8s_PV "https://github.com/prashanth7993/project-d1/blob/main/Kubernetes/pv.yaml"
    click K8s_PVC "https://github.com/prashanth7993/project-d1/blob/main/Kubernetes/pvc.yaml"

    %% Click Event for CI/CD Pipeline
    click Jenkins "https://github.com/prashanth7993/project-d1/tree/main/Jenkinsfile"
```
