# a-n-i-a/base-conversion-and-time-controllers architecture

> Architecture diagram of the GitHub repository a-n-i-a/base-conversion-and-time-controllers, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/a-n-i-a/base-conversion-and-time-controllers
- Repository: https://github.com/a-n-i-a/base-conversion-and-time-controllers

## Overview

##### Project type and purpose
- From the file tree and README, this is a small Spring Boot–based monolithic web application (“Tpo5Application.java” + “application.yml”), exposing two REST endpoints (BaseConversionController and TimeController) and serving a simple static HTML/CSS frontend (index.html + stylesheets). Its purpose is to provide base‐conversion and time‐conversion services via HTTP.

##### File structure
- Top‐level files:
- Tpo5Application.java: the Spring Boot main class
- application.yml: Spring Boot configuration
- index.html + stylesheets/: static frontend assets served from “resources/static”
- controller/: contains two REST controllers
- BaseConversionController.java
- TimeController.java
- No persistence layer or external integrations are visible—this is purely compute + web.

##### README
- The README simply names the project (“base‑conversion‑and‑time‑controllers”) but offers no extra architectural details. We infer an MVC pattern with Controller → internal conversion logic.

## Diagram (Mermaid)

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

    %% Configuration
    Config["Configuration\n(application.yml)"]:::config

    %% Spring Boot Application
    subgraph "Spring Boot Application"
        direction TB
        Tpo5App["Tpo5Application.java\n(Main)"]:::runtime
        Dispatcher["DispatcherServlet\n(Embedded Web Server)"]:::runtime
        subgraph "Controllers"
            direction TB
            BaseCtrl["BaseConversionController"]:::runtime
            TimeCtrl["TimeController"]:::runtime
        end
        Logic["Conversion Logic Module"]:::runtime
        StaticHandler["Static Resource Handler"]:::runtime
    end

    %% Static Frontend
    subgraph "Static Assets"
        direction TB
        Index["index.html"]:::static
        StylesCss["styles.css"]:::static
        Styles2["styles2.css"]:::static
    end

    %% Flows
    Browser -->|"HTTP GET /"| StaticHandler
    StaticHandler -->|"serves index.html"| Index
    Index -->|"loads CSS"| StylesCss
    Index -->|"loads CSS"| Styles2
    Browser -->|"HTTP GET /convert/base"| Dispatcher
    Browser -->|"HTTP GET /convert/time"| Dispatcher
    Dispatcher -->|"routes to BaseConversionController"| BaseCtrl
    Dispatcher -->|"routes to TimeController"| TimeCtrl
    BaseCtrl -->|"invokes conversion logic"| Logic
    TimeCtrl -->|"invokes conversion logic"| Logic
    Logic -->|"returns result"| BaseCtrl
    Logic -->|"returns result"| TimeCtrl
    BaseCtrl -->|"responds JSON"| Browser
    TimeCtrl -->|"responds JSON"| Browser
    Config -->|"loaded by Spring Boot"| Tpo5App
    Tpo5App -->|starts| Dispatcher

    %% Click Events
    click Tpo5App "https://github.com/a-n-i-a/base-conversion-and-time-controllers/blob/main/Tpo5Application.java"
    click Config "https://github.com/a-n-i-a/base-conversion-and-time-controllers/blob/main/application.yml"
    click BaseCtrl "https://github.com/a-n-i-a/base-conversion-and-time-controllers/blob/main/controller/BaseConversionController.java"
    click TimeCtrl "https://github.com/a-n-i-a/base-conversion-and-time-controllers/blob/main/controller/TimeController.java"
    click Index "https://github.com/a-n-i-a/base-conversion-and-time-controllers/blob/main/index.html"
    click StylesCss "https://github.com/a-n-i-a/base-conversion-and-time-controllers/blob/main/stylesheets/styles.css"
    click Styles2 "https://github.com/a-n-i-a/base-conversion-and-time-controllers/blob/main/stylesheets/styles2.css"

    %% Styles
    classDef runtime fill:#D0E8FF,stroke:#0366D6,stroke-width:1px;
    classDef static fill:#E2F0CB,stroke:#6B8E23,stroke-width:1px;
    classDef config fill:#FFF5BA,stroke:#D4A017,stroke-width:1px;
    classDef client fill:#FFE2E2,stroke:#D62828,stroke-width:1px;
```
