# jm160/sistema-ceara-cientifico-crede-07 architecture

> Architecture diagram of the GitHub repository jm160/sistema-ceara-cientifico-crede-07, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jm160/sistema-ceara-cientifico-crede-07
- Repository: https://github.com/jm160/sistema-ceara-cientifico-crede-07

## Overview

##### Project type and purpose
- From the README and file tree, this is a monolithic full‐stack PHP web application (“Sistema‐Ceara‐Cientifico‐Crede‐07”) for managing scoring and reports for a scientific fair.
- It uses HTML/PHP for views, PHP scripts for business logic and data access, MySQL (via SQL dump), and dompdf for PDF generation.

##### File structure
- Top‐level directories:
- assets/ (static files: images, JS, CSS)
- dompdf/ (PDF generation library)
- html/ (PHP/HTML view templates for admin & jurado)
- pdf/ (entry points for PDF report generation)
- php/ (business logic, CRUD controllers, authentication, Connect.php)
- sql/ (database schema dump)
- vendor/ & composer.json (PHP dependencies)
- No microservices—this is a single deployable unit.

##### Key README insights
- Project handles user roles (admin, jurado), CRUD of schools/judges/projects, evaluations, and report generation.
- dompdf is used to create PDF reports dynamically.

##### Elements
- Blue for client/UI
- Green for server‐side app
- Orange for data layer
- Purple for external libraries/services
- Rectangles for components

##### Putting it all together
- “Controllers & Business Logic” (php/)
- “View Templates” (html/)
- “PDF Generator (dompdf)” (dompdf/)

## Diagram (Mermaid)

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

    %% Server Layer
    WebServer["Web Server + PHP Runtime"]:::server

    subgraph "Application Layer"
        Controllers["Controllers & Business Logic (php/)"]:::server
        Views["View Templates (html/)"]:::server
        PDFGen["PDF Generation Engine (dompdf/)"]:::external
    end

    %% Static Assets Layer
    subgraph "Static Assets Server"
        Assets["Assets (assets/)"]:::server
        Bootstrap["Bootstrap Library (boostrap/)"]:::server
    end

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

    %% Connections
    Browser -->|"HTTP Request"| WebServer
    WebServer -->|"Routes to Controllers"| Controllers
    Controllers -->|"renders"| Views
    Controllers -->|"invokes"| PDFGen
    Controllers -->|"PHP MySQLi"| DB
    WebServer -->|"serves"| Assets
    WebServer -->|"serves"| Bootstrap
    Views -->|"HTML/CSS/JS"| Browser
    PDFGen -->|"PDF download"| Browser

    %% Click Events
    click Controllers "https://github.com/jm160/sistema-ceara-cientifico-crede-07/tree/main/php/"
    click Views "https://github.com/jm160/sistema-ceara-cientifico-crede-07/tree/main/html/"
    click PDFGen "https://github.com/jm160/sistema-ceara-cientifico-crede-07/tree/main/dompdf/"
    click Assets "https://github.com/jm160/sistema-ceara-cientifico-crede-07/tree/main/assets/"
    click Bootstrap "https://github.com/jm160/sistema-ceara-cientifico-crede-07/tree/main/boostrap/"
    click DB "https://github.com/jm160/sistema-ceara-cientifico-crede-07/blob/main/sql/SACC.sql"

    %% Styles
    classDef client fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef server fill:#90EE90,stroke:#333,stroke-width:1px
    classDef database fill:#FFD580,stroke:#333,stroke-width:1px
    classDef external fill:#D8BFD8,stroke:#333,stroke-width:1px
```
