# colertrash1721/netolocker architecture

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

- Interactive diagram: https://gitdiagram.com/colertrash1721/netolocker
- Repository: https://github.com/colertrash1721/netolocker

## Overview

##### Project type and purpose
- This is a full-stack web application (“Seal Request and Tracking System”) for ESC-GROUP.
- Frontend: Next.js + Tailwind CSS for user interfaces (seal request form, real-time tracking, admin panel).
- Backend: NestJS REST (and potentially WebSocket) API for business logic, user/auth management, request processing.
- Infrastructure: Docker containers orchestrated via Docker-Compose, with NGINX as a reverse proxy.

##### (implied) file structure
Even though only README.md is listed, the README implies a typical layout:
- docker-compose.yml & .env (root)
- /frontend (Next.js + Tailwind)
- /backend (NestJS app)
- /nginx (NGINX config files, e.g. default.conf)
- /shared or /common (env files, utility scripts)
- .dockerignore, Dockerfile.frontend, Dockerfile.backend

##### README for additional insights
- Features: user roles (admin vs. regular), real-time location tracking, request forms, admin dashboard.
- Tech stack: Next.js, Tailwind CSS, NestJS, Docker, NGINX.
- Deployment: “docker-compose up --build” suggests multi-container setup with reverse proxy.

##### Final recommendations
– Capture all containers and their networking via Docker-Compose.
– Show module-level components inside NestJS (e.g., AuthModule, RequestModule).
– In the Frontend, illustrate pages/components for RequestForm, TrackingDashboard, AdminPanel.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    Browser["Browser"]:::client

    %% Edge Layer
    NGINX["NGINX Reverse Proxy"]:::edge

    %% Docker Network
    subgraph "Docker Network"
        direction TB

        %% Frontend Container
        subgraph "Next.js Frontend" 
            direction TB
            FrontendApp["Frontend Service"]:::app
            subgraph "UI Components"
                RequestFormPage["RequestForm Page"]:::app
                TrackingDashboardPage["TrackingDashboard Page"]:::app
                AdminPanelPage["AdminPanel Page"]:::app
            end
        end

        %% Backend Container
        subgraph "NestJS API"
            direction TB
            BackendApp["API Service"]:::app
            subgraph "Modules"
                AuthModule["AuthModule"]:::app
                RequestModule["RequestModule"]:::app
                TrackingModule["TrackingModule"]:::app
            end
        end

        %% Data Layer
        DB[(PostgreSQL Database)]:::data
    end

    %% Real-time WebSocket Gateway inside Backend
    WebSocket["WebSocket Gateway"]:::data

    %% Project Documentation
    ProjectDoc["Project Documentation"]:::doc

    %% Connections
    Browser -->|HTTPS| NGINX
    NGINX -->|serves SSR & static| FrontendApp
    NGINX -->|proxies /api| BackendApp
    Browser -->|client AJAX| FrontendApp
    Browser -->|REST calls /api| BackendApp
    BackendApp -->|SQL queries| DB
    BackendApp -->|push events| WebSocket
    WebSocket -->|real-time updates| Browser

    FrontendApp --> RequestFormPage
    FrontendApp --> TrackingDashboardPage
    FrontendApp --> AdminPanelPage

    BackendApp --> AuthModule
    BackendApp --> RequestModule
    BackendApp --> TrackingModule

    %% Click Events
    click ProjectDoc "https://github.com/colertrash1721/netolocker/blob/main/README.md"

    %% Styles
    classDef client fill:#a8df65,stroke:#333,stroke-width:1px
    classDef edge   fill:#58a6ff,stroke:#333,stroke-width:1px
    classDef app    fill:#f9d65c,stroke:#333,stroke-width:1px
    classDef data   fill:#ffa559,stroke:#333,stroke-width:1px
    classDef doc    fill:#cccccc,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
```
