# shaswat2031/minor-project-university-connect architecture

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

- Interactive diagram: https://gitdiagram.com/shaswat2031/minor-project-university-connect
- Repository: https://github.com/shaswat2031/minor-project-university-connect

## Overview

##### Frontend Components
- User Interface (React components, e.g., App.jsx, pages for Home, Login, Register, Student Connect, Talent Marketplace, Certification, etc.).
- Client-side Routing (React Router, Protected Route component).
- API Calls (Axios/Fetch requests defined in src/api and services folders).
- Development and build tools (Vite, Tailwind CSS).

##### Backend Components
- Express Server: Include components such as routing, middleware (authMiddleware, authController), and server (server.js).
- API Endpoints: Group endpoints by function (authentication, profile management, student connect, certification, talent marketplace).
- Business Logic: Represent logical components like JWT authentication, certificate generation with pdfkit, and file storage for certificates.
- Mention that the backend is built on Node.js and Express.

##### Database
- A database component labeled “MongoDB (via Mongoose)” to represent persistent data storage.

##### Additional Infrastructure
- Environment/configuration management using .env files for both the frontend (if needed) and the backend.

##### Architectural Patterns & Design Principles
- Separation of concerns: the frontend solely handles the user interface (UI, client-side routing, state management) and delegates business logic and authentication to the backend.
- Mention that the backend follows a RESTful API design pattern, which organizes endpoints by function.
- JWT Authentication for securing API endpoints.
- Use of middleware layers that intercept API requests for authentication and authorization.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Frontend"
        F1("React Frontend"):::frontend
        F2("User Interface (React Components & Pages)"):::frontend
        F3("Client-side Routing & API Calls"):::frontend
        F4("Dev & Build Tools (Vite & Tailwind)"):::frontend
    end

    subgraph "Backend"
        B1("Express Server (Node.js+Express)"):::backend
        B2("API Endpoints & Routing"):::backend
        B3("Middleware & Business Logic (JWT,PDFKit)"):::backend
    end

    DB("MongoDB Database (Mongoose)"):::database
    EXT("CI/CD Pipeline (Azure Static Web Apps)"):::external

    F3 -->|"API_Calls/REST_Requests"| B1
    B1 -->|"Route_Handling"| B2
    B1 -->|"Utilizes_Middleware"| B3
    B1 -->|"Data_Operations"| DB
    EXT -->|"Deploys_Frontend"| F1
    EXT -->|"Deploys_Backend"| B1

    click F1 "https://github.com/shaswat2031/minor-project-university-connect/tree/main/frontend/"
    click F2 "https://github.com/shaswat2031/minor-project-university-connect/blob/main/frontend/src/App.jsx"
    click F3 "https://github.com/shaswat2031/minor-project-university-connect/blob/main/frontend/src/components/ProtectedRoute.jsx"
    click F4 "https://github.com/shaswat2031/minor-project-university-connect/blob/main/frontend/vite.config.js"
    click B1 "https://github.com/shaswat2031/minor-project-university-connect/blob/main/university-connect-backend/server.js"
    click B2 "https://github.com/shaswat2031/minor-project-university-connect/tree/main/university-connect-backend/routes/"
    click B3 "https://github.com/shaswat2031/minor-project-university-connect/tree/main/university-connect-backend/middleware/"
    click DB "https://github.com/shaswat2031/minor-project-university-connect/blob/main/university-connect-backend/config/db.js"
    click EXT "https://github.com/shaswat2031/minor-project-university-connect/blob/main/.github/workflows/azure-static-web-apps-lively-mushroom-08fa4ca1e.yml"

    classDef frontend fill:#a8d8ea,stroke:#000,stroke-width:2px
    classDef backend fill:#f9d56e,stroke:#000,stroke-width:2px
    classDef database fill:#c8e1c1,stroke:#000,stroke-width:2px
    classDef external fill:#d3b3ff,stroke:#000,stroke-width:2px
```
