# sanskartakkamore/hackfest-dil architecture

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

- Interactive diagram: https://gitdiagram.com/sanskartakkamore/hackfest-dil
- Repository: https://github.com/sanskartakkamore/hackfest-dil

## Overview

##### Main Components
- Backend Service: Located under apps/backend, this component is built on NestJS. It includes several modules such as the core app module, configuration, feedback, and project modules. It also contains utility files (e.g., email.service.ts and jira.service.ts) that likely interact with external services like email systems and JIRA.
- Frontend Client: Found under apps/frontend, this is a Next.js application using the new App directory structure. It contains pages and features like a feedback form, and it reads data from JSON files and components from a shared UI package.
- Shared Packages: These include:
– packages/ui: A library of reusable UI components that the frontend uses (e.g., buttons, cards, nav elements).
– packages/eslint-config and packages/typescript-config: Tools that provide standardized configurations across the monorepo.
- DevOps/Monorepo Infrastructure: Turborepo-related files (turbo.json, .turbo folders) indicate that the project is managed as a monorepo, with built‑in support for caching, build orchestration, and dependency management.

##### Relationships and Interactions
- The Frontend communicates with the Backend via REST API calls to submit and retrieve feedback and project-related data.
- Within the Backend, different modules (feedback and project) encapsulate specific functionalities (e.g., schema definitions, controllers, and services), and they might share common configuration and utility modules.
- External integrations are represented by the utility services that manage emails and JIRA interactions.
- The shared UI package is consumed by the frontend to render consistent, reusable components.
- The monorepo’s configuration packages (ESLint, TypeScript) ensure consistency in development and build processes, but they are not part of the runtime system. Instead, they support developer productivity and code quality.

##### Architectural Patterns and Design Principles
- Separation of Concerns: Clearly divided responsibilities among frontend (user interface), backend (business logic and API orchestration) and shared libraries.
- Modularized Backend: Use of NestJS modules such as feedback and project that isolate different application domains.
- Reusable UI Components: A dedicated package for UI components emphasizes the DRY principle and reusability across the Next.js frontend.
- Monorepo Structure: Encourages consistency and simplifies dependency management and deployment using Turborepo.

##### Specific Elements
- Clear Labels: Each component must be labeled (e.g., “Frontend (Next.js)”; “Backend (NestJS)” with its internal modules like “Feedback Module” and “Project Module”; “Shared UI Components”; “Turborepo Monorepo”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Top‑Level Monorepo Node
    MONO["Monorepo (Turborepo)"]:::devops

    %% Backend (NestJS) Subgraph
    subgraph "Backend (NestJS)"
        direction TB
        BA["Core App Module"]:::backend
        BB["Configuration Module"]:::backend
        BC["Feedback Module"]:::backend
        BD["Project Module"]:::backend
        BE["Utility Services (Email & JIRA)"]:::backend
    end

    %% Frontend (Next.js) Subgraph
    subgraph "Frontend (Next.js)"
        direction TB
        FA["App Directory & Routes"]:::frontend
        FB["Feedback Features"]:::frontend
        FC["Shared Data File"]:::frontend
    end

    %% Shared Packages Subgraph
    subgraph "Shared Packages"
        direction TB
        SA["Shared UI Components"]:::shared
        SB["ESLint Configuration"]:::shared
        SC["TypeScript Configuration"]:::shared
    end

    %% DevOps & Build Tools Subgraph
    subgraph "DevOps & Build Tools"
        direction TB
        DA["Turborepo Config"]:::devops
    end

    %% External Systems
    EX1["Email System"]:::external
    EX2["JIRA System"]:::external

    %% Connections from Monorepo to Group Entry Points
    MONO -->|"contains"| BA
    MONO -->|"contains"| FA
    MONO -->|"contains"| SA
    MONO -->|"contains"| DA

    %% Frontend to Backend API Call
    FA -->|"calls_API"| BA

    %% Frontend uses Shared UI Components
    FA -->|"uses_UI"| SA

    %% Backend Internal Interactions
    BA -->|"uses_config"| BB
    FB -->|"submits_feedback"| BA
    BC -->|"integrates_with"| BE
    BD -->|"integrates_with"| BE

    %% Utility Services External Interactions
    BE -->|"sends_mail"| EX1
    BE -->|"updates"| EX2

    %% Click Events for Backend
    click BA "https://github.com/sanskartakkamore/hackfest-dil/blob/main/apps/backend/src/app.module.ts"
    click BB "https://github.com/sanskartakkamore/hackfest-dil/tree/main/apps/backend/src/config"
    click BC "https://github.com/sanskartakkamore/hackfest-dil/tree/main/apps/backend/src/feedback"
    click BD "https://github.com/sanskartakkamore/hackfest-dil/tree/main/apps/backend/src/project"
    click BE "https://github.com/sanskartakkamore/hackfest-dil/tree/main/apps/backend/src/utils"

    %% Click Events for Frontend
    click FA "https://github.com/sanskartakkamore/hackfest-dil/tree/main/apps/frontend/src/app"
    click FB "https://github.com/sanskartakkamore/hackfest-dil/tree/main/apps/frontend/src/app/feedback"
    click FC "https://github.com/sanskartakkamore/hackfest-dil/blob/main/apps/frontend/src/app/data.json"

    %% Click Events for Shared Packages
    click SA "https://github.com/sanskartakkamore/hackfest-dil/tree/main/packages/ui"
    click SB "https://github.com/sanskartakkamore/hackfest-dil/tree/main/packages/eslint-config"
    click SC "https://github.com/sanskartakkamore/hackfest-dil/tree/main/packages/typescript-config"

    %% Click Event for DevOps
    click DA "https://github.com/sanskartakkamore/hackfest-dil/blob/main/turbo.json"

    %% Styles
    classDef backend fill:#A0E7A0,stroke:#333,stroke-width:2px;
    classDef frontend fill:#A0C4FF,stroke:#333,stroke-width:2px;
    classDef shared fill:#FFD966,stroke:#333,stroke-width:2px;
    classDef devops fill:#FAD7A0,stroke:#333,stroke-width:2px;
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:2px;
```
