# dilanbernal/captured architecture

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

- Interactive diagram: https://gitdiagram.com/dilanbernal/captured
- Repository: https://github.com/dilanbernal/captured

## Overview

Based on your file tree and the README, this is clearly a full‐stack application with three main segments:
##### The frontend is based on Angular (located under Captured_UI).
2. The backend API is built with Spring Boot (under Captured_API – note the extensive Java packages with controllers, services, repositories/DAOs, and security configuration using JWT).
3. There’s an additional module (Admin_App) written in Python that includes modules for configuration, database connectivity (db_mysql.py), models, and utilities. This module likely serves as an administration or management tool that interfaces with the same data store or operations as the rest of the system.

##### COMPONENT IDENTIFICATION
- Frontend Component: Highlight Captured_UI. Indicate that it is an Angular-based web client, responsible for user interactions.
- Controller Layer (e.g., AuthController, ProductController, OrderController, etc.)
- Service Layer (business logic including authentication, order processing, coupon management)
- Data Access Layer (DAO/Repository interfaces and implementations)
- Security and JWT Handling (SecurityConfig, JwtAuthenticationFilter)
- Persistence configuration (e.g., persistence.xml) likely linking to a database.

##### RELATIONSHIPS & INTERACTIONS
- Optionally, note external services (if any) such as external authentication or payment gateways if they become relevant.

##### ARCHITECTURAL PATTERNS & DESIGN PRINCIPLES
- Separation of concerns: The Angular frontend is completely decoupled from the business logic and persistence layers residing in the Spring Boot backend.
- Layered architecture (Controller → Service → DAO) in the Spring Boot backend.
- The use of JWT for authentication is a key architectural detail; ensure you highlight the security module and JWT filter.
- The Admin_App (Python) can be shown as an auxiliary or side-system that manages or monitors administrative tasks.

##### TECHNOLOGIES & FRAMEWORKS
- Mention Angular CLI for the frontend with its scaffolded components, routes, and services.
- For the backend, list Spring Boot, Java, Maven (noting the presence of Maven wrapper files like mvnw, pom.xml), JPA/Hibernate style data access, and Spring Security with JWT.
- For the Admin_App, mention Python and its libraries related to database connectivity and utility functions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Group
    subgraph "Frontend"
        FE["Angular Frontend"]:::frontend
    end

    %% Backend API Group
    subgraph "Backend API"
        Controllers["Controllers"]:::backend
        Services["Services"]:::backend
        DAOs["Data Access Layer"]:::backend
        SecurityConfig["Security Config (JWT)"]:::backend
        JwtModule["JWT Module"]:::backend
        Persistence["Persistence Configuration"]:::backend
    end

    %% Administration/Management Group
    subgraph "Admin/Management"
        AdminConfig["Configuration"]:::admin
        AdminDB["Database Connectivity"]:::admin
        AdminModels["Models"]:::admin
        AdminUtils["Utilities"]:::admin
    end

    %% Database Node
    Database["RDBMS (MySQL)"]:::database

    %% Connections between components
    FE -->|"RESTcalls"| Controllers
    Controllers -->|"calls"| Services
    Services -->|"queries"| DAOs
    DAOs -->|"accesses"| Database
    SecurityConfig -.->|"secures"| Controllers
    JwtModule -.->|"validates"| Controllers

    AdminConfig -->|"initializes"| AdminDB
    AdminModels --> AdminDB
    AdminUtils --> AdminDB
    AdminDB -->|"operates on"| Database

    %% Click Events
    click FE "https://github.com/dilanbernal/captured/tree/main/Captured_UI"
    click Controllers "https://github.com/dilanbernal/captured/tree/main/Captured_API/CapturedStyles/src/main/java/co/edu/ue/controller"
    click Services "https://github.com/dilanbernal/captured/tree/main/Captured_API/CapturedStyles/src/main/java/co/edu/ue/service"
    click DAOs "https://github.com/dilanbernal/captured/tree/main/Captured_API/CapturedStyles/src/main/java/co/edu/ue/dao"
    click SecurityConfig "https://github.com/dilanbernal/captured/blob/main/Captured_API/CapturedStyles/src/main/java/co/edu/ue/config/SecurityConfig.java"
    click JwtModule "https://github.com/dilanbernal/captured/tree/main/Captured_API/CapturedStyles/src/main/java/co/edu/ue/Jwt"
    click Persistence "https://github.com/dilanbernal/captured/blob/main/Captured_API/CapturedStyles/src/main/java/META-INF/persistence.xml"
    click AdminConfig "https://github.com/dilanbernal/captured/blob/main/Admin_App/config.py"
    click AdminDB "https://github.com/dilanbernal/captured/blob/main/Admin_App/db_mysql.py"
    click AdminModels "https://github.com/dilanbernal/captured/tree/main/Admin_App/models"
    click AdminUtils "https://github.com/dilanbernal/captured/tree/main/Admin_App/util"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef admin fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef database fill:#FFD700,stroke:#000,stroke-width:2px;
```
