# darshanchaudharii/nextgen_exam_portal architecture

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

- Interactive diagram: https://gitdiagram.com/darshanchaudharii/nextgen_exam_portal
- Repository: https://github.com/darshanchaudharii/nextgen_exam_portal

## Overview

##### Project Type & Purpose
- This is a full-stack, AI-powered online exam and assessment platform.
- Frontend: Angular 17+ SPA for student/admin UIs (exam scheduling, proctoring, analytics).
- Backend: Java 17 Spring Boot monolith providing RESTful APIs, JWT-based security, service layer with adaptive testing logic.
- Persistence: MySQL via Spring Data JPA/Hibernate.
- DevOps: Dockerized containers deployed to Kubernetes, CI/CD via Jenkins.

##### File Structure Analysis
- Top-level “Backend_Server” folder: Spring Boot project structured by Maven, with standard layers:
- src/main/java/com/example/ExamPortal/config (security, JWT utilities)
- controller (REST endpoints)
- service (business logic)
- repository (data access)
- examModels & models (domain entities, request/response DTOs)
- “Frontend” folder: Angular CLI project with:
- src/app/Components & pages (UI components for admin & user workflows)
- Services (HTTP clients, guards, interceptors)
- assets/environments (config for API base URLs)
- Config/build artifacts: angular.json, pom.xml, Dockerfiles (implied), Jenkinsfiles (in docs or root), k8s manifests (in docs).

##### README Insights
- Highlights JWT + Spring Security, adaptive testing engine, real-time analytics with Chart.js, basic webcam proctoring & logging.
- Mentions external docs: /docs/api-spec.yaml and Postman collection, Docker/Kubernetes, Jenkins CI/CD.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Frontend Layer
    subgraph "Frontend Client"
        direction TB
        Angular["Angular Client"]:::frontend
        subgraph "Components & Services"
            HTTPServices["HTTP Clients & Helpers"]:::frontend
            AuthInterceptor["Auth Interceptor"]:::frontend
            AdminGuard["Admin Guard"]:::frontend
            UserGuard["User Guard"]:::frontend
        end
    end

    %% Backend Layer
    subgraph "Backend API"
        direction TB
        EntryPoint["Application Entry Point"]:::backend
        Config["Security Config & JWT Utilities"]:::backend
        Controllers["REST API Controllers"]:::backend
        Services["Business Logic / Adaptive Testing Engine"]:::backend
        Repos["Data Access Layer (Repositories)"]:::backend
        ModelsDomain["Domain Entities"]:::backend
        ModelsDTO["Request/Response DTOs"]:::backend
    end

    %% Database
    DB["MySQL Database"]:::database

    %% External Services
    ExternalPS["Proctoring & Logging Service"]:::external

    %% CI/CD and Infrastructure
    subgraph "CI/CD & Infra"
        direction TB
        Jenkins["Jenkins CI/CD"]:::infra
        DockerRegistry["Docker Registry"]:::infra
        K8s["Kubernetes Cluster"]:::infra
    end

    %% Relationships
    Angular --> HTTPServices
    Angular --> AuthInterceptor
    Angular --> AdminGuard
    Angular --> UserGuard
    Angular -->|HTTPS| Controllers

    Controllers -->|uses| Config
    Controllers -->|calls| Services
    Services -->|uses| ModelsDomain
    Services -->|uses| ModelsDTO
    Services -->|calls| Repos
    Repos -->|JDBC| DB
    Controllers -->|logs/actions| ExternalPS

    Jenkins -->|builds/pushes images| DockerRegistry
    DockerRegistry -->|pulls images| K8s
    K8s -->|deploys| Angular
    K8s -->|deploys| Controllers

    %% Click Events
    click Angular "https://github.com/darshanchaudharii/nextgen_exam_portal/tree/main/Frontend/src/app"
    click HTTPServices "https://github.com/darshanchaudharii/nextgen_exam_portal/tree/main/Frontend/src/app/Services"
    click AuthInterceptor "https://github.com/darshanchaudharii/nextgen_exam_portal/blob/main/Frontend/src/app/Services/Auth and helper/auth.interceptor.ts"
    click AdminGuard "https://github.com/darshanchaudharii/nextgen_exam_portal/blob/main/Frontend/src/app/Services/Admin Gurd/admin.guard.ts"
    click UserGuard "https://github.com/darshanchaudharii/nextgen_exam_portal/blob/main/Frontend/src/app/Services/User Gurd/user.guard.ts"
    click Controllers "https://github.com/darshanchaudharii/nextgen_exam_portal/tree/main/Backend_Server/src/main/java/com/example/ExamPortal/controller"
    click Services "https://github.com/darshanchaudharii/nextgen_exam_portal/tree/main/Backend_Server/src/main/java/com/example/ExamPortal/service"
    click Repos "https://github.com/darshanchaudharii/nextgen_exam_portal/tree/main/Backend_Server/src/main/java/com/example/ExamPortal/repository"
    click Config "https://github.com/darshanchaudharii/nextgen_exam_portal/tree/main/Backend_Server/src/main/java/com/example/ExamPortal/config"
    click ModelsDomain "https://github.com/darshanchaudharii/nextgen_exam_portal/tree/main/Backend_Server/src/main/java/com/example/ExamPortal/examModels"
    click ModelsDTO "https://github.com/darshanchaudharii/nextgen_exam_portal/tree/main/Backend_Server/src/main/java/com/example/ExamPortal/models"
    click EntryPoint "https://github.com/darshanchaudharii/nextgen_exam_portal/blob/main/Backend_Server/src/main/java/com/example/ExamPortal/ExamPortalServerBackendJwtAuthenticationApplication.java"
    click Config "https://github.com/darshanchaudharii/nextgen_exam_portal/blob/main/Backend_Server/src/main/resources/application.properties"
    click Jenkins "https://github.com/darshanchaudharii/nextgen_exam_portal/blob/main/README.md"

    %% Styles
    classDef frontend fill:#eef,stroke:#6699cc,stroke-width:2px
    classDef backend fill:#ffe8cc,stroke:#cc9900,stroke-width:2px
    classDef database fill:#e8ffe8,stroke:#28a428,stroke-width:2px
    classDef external fill:#f0e8ff,stroke:#8041b0,stroke-width:2px
    classDef infra fill:#f2f2f2,stroke:#999999,stroke-width:2px
```
