# ketul-prajapati/fms-springboot architecture

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

- Interactive diagram: https://gitdiagram.com/ketul-prajapati/fms-springboot
- Repository: https://github.com/ketul-prajapati/fms-springboot

## Overview

##### Project Type and Purpose
- The system is a full-stack web application that targets educational institutions by providing modules for Admin, Faculty, and Students. Its purpose is to streamline administrative and academic management.
- The backend is built in Spring Boot (Java) and the frontend in React.js with Redux for state management. MongoDB is used as the database, and Firebase is leveraged for storage.

##### Main Components
a. Frontend Client:
– Built with React.js (with separate directories for different user roles: Admin, Faculty, Student).
– Handles user interface and interactions.
– Communicates with the backend via API calls.
b. Backend Server:
– Implemented using Spring Boot, following a layered architecture (controllers, services, repositories, models).
– Organized by feature domains (admin, faculty, student, and other academic resources like marks, materials, notifications, timetables, subjects).
– Exposes RESTful APIs for client consumption.
c. Database:
– MongoDB is used to store the application data (users, notices, timetables, academic records, etc.).
d. External Storage:
– Firebase is used for storing file-based resources (e.g., materials, possibly images or other media).
e. Supporting Services:
– Dockerfile is provided for the backend, which suggests containerization for deployment, and Maven (with Maven Wrapper) is used for build management.

##### Relationships and Interactions
- The Backend interacts with the MongoDB database for CRUD operations involving user data and academic records.
- The Backend also integrates with Firebase to manage storage of files and materials.
- In addition, there are internal relationships within the backend: controllers receive requests, services contain business logic, and repositories abstract database interactions.

##### Architectural Patterns and Design Principles
- Layered Architecture (presentation, service, persistence layers) within the backend.
- Modular approach by roles, with controllers and services separated by modules (admin, faculty, student, and others).
- Use of MVC paradigm in the backend controllers.
- Clear separation of concerns between frontend and backend.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Section
    subgraph "Frontend Layer"
        FE["React Frontend"]:::frontend
        FE_Admin["Admin Module"]:::frontend
        FE_Faculty["Faculty Module"]:::frontend
        FE_Student["Student Module"]:::frontend
        Redux["Redux State Management"]:::frontend
        FE_Firebase["Firebase Integration"]:::frontend
    end

    %% Backend Section
    subgraph "Backend Layer"
        BS["Spring Boot Backend"]:::backend
        Application["Application Starter"]:::backend
        subgraph "Controller Layer"
            C_Admin["Admin Controllers"]:::backend
            C_Faculty["Faculty Controllers"]:::backend
            C_Student["Student Controllers"]:::backend
            C_Other["Other Controllers"]:::backend
        end
        subgraph "Service Layer"
            S_Admin["Admin Services"]:::backend
            S_Faculty["Faculty Services"]:::backend
            S_Student["Student Services"]:::backend
            S_Other["Other Services"]:::backend
        end
        subgraph "Repository Layer"
            R_Admin["Admin Repositories"]:::backend
            R_Faculty["Faculty Repositories"]:::backend
            R_Student["Student Repositories"]:::backend
            R_Other["Other Repositories"]:::backend
        end
        subgraph "Model Layer"
            M_Admin["Admin Models"]:::backend
            M_Faculty["Faculty Models"]:::backend
            M_Student["Student Models"]:::backend
            M_Other["Other Models"]:::backend
        end
        Infra["Infrastructure (Docker & Maven)"]:::backend
    end

    %% External Components
    DB["MongoDB Database"]:::database
    Firebase["Firebase Storage"]:::firebase

    %% Connections between Frontend and Backend
    FE -->|"API_calls"| BS
    BS --> Application

    %% Internal Backend Flow (Controllers -> Services)
    C_Admin -->|"calls"| S_Admin
    C_Faculty -->|"calls"| S_Faculty
    C_Student -->|"calls"| S_Student
    C_Other -->|"calls"| S_Other

    %% Internal Backend Flow (Services -> Repositories)
    S_Admin -->|"CRUD"| R_Admin
    S_Faculty -->|"CRUD"| R_Faculty
    S_Student -->|"CRUD"| R_Student
    S_Other -->|"CRUD"| R_Other

    %% Database interactions
    R_Admin --> DB
    R_Faculty --> DB
    R_Student --> DB
    R_Other --> DB

    %% Service interactions with Firebase Storage for file handling
    S_Admin -->|"files"| Firebase
    S_Faculty -->|"files"| Firebase
    S_Student -->|"files"| Firebase
    S_Other -->|"files"| Firebase

    %% Frontend internal connections
    FE --> FE_Admin
    FE --> FE_Faculty
    FE --> FE_Student
    FE --> Redux
    FE --> FE_Firebase

    %% Click Events for Frontend components
    click FE "https://github.com/ketul-prajapati/fms-springboot/tree/main/frontend/"
    click FE_Admin "https://github.com/ketul-prajapati/fms-springboot/tree/main/frontend/src/Screens/Admin"
    click FE_Faculty "https://github.com/ketul-prajapati/fms-springboot/tree/main/frontend/src/Screens/Faculty"
    click FE_Student "https://github.com/ketul-prajapati/fms-springboot/tree/main/frontend/src/Screens/Student"
    click Redux "https://github.com/ketul-prajapati/fms-springboot/tree/main/frontend/src/redux"
    click FE_Firebase "https://github.com/ketul-prajapati/fms-springboot/blob/main/frontend/src/firebase/config.js"

    %% Click Event for Backend Application starter
    click Application "https://github.com/ketul-prajapati/fms-springboot/blob/main/backend/src/main/java/me/csproconnect/backend/BackendApplication.java"

    %% Click Events for Controller Layer
    click C_Admin "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/controller/admincontroller"
    click C_Faculty "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/controller/facultycontroller"
    click C_Student "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/controller/studentcontroller"
    click C_Other "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/controller/othercontroller"

    %% Click Events for Service Layer
    click S_Admin "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/service/adminservice"
    click S_Faculty "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/service/facultyservice"
    click S_Student "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/service/studentservice"
    click S_Other "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/service/otherservice"

    %% Click Events for Repository Layer
    click R_Admin "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/repository/adminrepo"
    click R_Faculty "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/repository/facultyrepo"
    click R_Student "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/repository/studentrepo"
    click R_Other "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/repository/otherrepo"

    %% Click Events for Model Layer
    click M_Admin "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/model/adminmodel"
    click M_Faculty "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/model/facultymodel"
    click M_Student "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/model/studentmodel"
    click M_Other "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/src/main/java/me/csproconnect/backend/model/othermodel"

    %% Click Event for Infrastructure
    click Infra "https://github.com/ketul-prajapati/fms-springboot/tree/main/backend/Dockerfile"

    %% Class Definitions for Styling
    classDef frontend fill:#f9f,stroke:#333,stroke-width:2px;
    classDef backend fill:#bbf,stroke:#333,stroke-width:2px;
    classDef database fill:#cfc,stroke:#333,stroke-width:2px;
    classDef firebase fill:#fcf,stroke:#333,stroke-width:2px;
```
