# turbotime20/starcom-web architecture

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

- Interactive diagram: https://gitdiagram.com/turbotime20/starcom-web
- Repository: https://github.com/turbotime20/starcom-web

## Overview

##### Project type and purpose
- From the README we see this is “starcom-web,” a web application fronting StarCom’s intelligent security, connectivity, and management platform for homes, businesses, and industries.
- Key purpose: deliver a modern web UI/dashboard that interacts with back-end services, hardware/IoT devices (e.g., cameras, sensors), and data stores to provide real-time monitoring and control.

##### (current) file structure
- As only README.md is present, we’ll assume a typical full-stack web app layout, later confirmed once more files appear.
- Likely top-level dirs to expect:
- frontend/ or src/ui/
- backend/ or src/api/
- lib/ or services/ for shared modules
- config/, scripts/, Dockerfile, deployment manifests.

##### README for additional insights
- Mentions “soluciones tecnológicas integrales,” “seguridad,” “conectividad,” “gestión inteligente.”
- Implies integration with hardware/IoT, possibly external cloud services (e.g., AWS IoT, Azure).

a. Main components to include:
- Web Frontend (React, Angular, Vue, etc.)
- Backend/API Layer (Node.js/Express, Python/Django, Java/Spring, etc.)
- Database(s) (SQL, NoSQL, time-series DB)
- Message Broker or Event Bus (MQTT, Kafka) for IoT data ingest
- IoT Devices & Edge Gateways (cameras, sensors)
- External Services (authentication, SMS/Email alerts, cloud IoT platforms)
- DevOps & CI/CD pipelines (build, test, deploy)
b. Relationships & interactions:
- Frontend ↔ Backend over REST/GraphQL/WebSockets
- Backend ↔ Database for persistent storage
- Backend ↔ Broker for real-time telemetry
- Broker ↔ Edge Gateways ↔ IoT Devices
- Backend ↔ External Services for notifications and identity management
c. Architectural patterns:
- Separation of concerns: UI, API, Data, Messaging layers
- Microservices or modular monolith (depending on file layout)
- Pub/Sub for real-time device data
- Authentication & authorization at API gateway
d. Key technologies:
- Frontend framework (e.g., React)
- Backend runtime (e.g., Node.js + Express)
- MQTT or Kafka for IoT messaging
- PostgreSQL or MongoDB for storage
- Docker/Kubernetes for containerization
- CI/CD: GitHub Actions, Jenkins, etc.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interface Layer
    subgraph "User Interface" 
        direction TB
        WebApp["Web App (React)"]:::ui
    end

    %% Cloud Services Layer
    subgraph "Cloud Services"
        direction TB
        APIGateway["API Gateway\n(HTTPS, JWT)"]:::backend
        AuthService["Auth Service\n(OAuth2/JWT)"]:::backend
        WebAPI["Web API\n(Node.js/Express)"]:::backend
        IoTIngestion["IoT Ingestion Service\n(Node.js)"]:::backend
        MQTTBroker["MQTT Broker\n(Kafka/Mosquitto)"]:::broker
        Database["Database\n(PostgreSQL/MongoDB)"]:::database
        Notification["Notification Service\n(Email/SMS)"]:::external
    end

    %% On-Premise Devices Layer
    subgraph "On-Premise Devices"
        direction TB
        EdgeGateway["Edge Gateway"]:::edge
        IoTDevices["IoT Devices\n(Cameras, Sensors)"]:::device
    end

    %% External Services Layer
    subgraph "External Services"
        direction TB
        CloudIoT["Cloud IoT Platform"]:::external
        EmailSMS["Email/SMS Service"]:::external
    end

    %% DevOps & CI/CD Layer
    subgraph "DevOps & CI/CD"
        direction TB
        CICD["CI/CD Pipeline\n(GitHub Actions)"]:::devops
        DockerK8s["Docker/Kubernetes"]:::devops
    end

    %% Connections
    WebApp -->|HTTPS| APIGateway
    APIGateway -->|validate JWT| AuthService
    APIGateway -->|REST/GraphQL| WebAPI
    WebAPI -->|reads/writes| Database
    WebAPI -->|publishes| MQTTBroker
    MQTTBroker -->|push events| IoTIngestion
    IoTIngestion -->|writes| Database
    IoTIngestion -->|notifies| Notification

    IoTDevices -->|MQTT| EdgeGateway
    EdgeGateway -->|MQTT over TLS| MQTTBroker

    WebAPI -->|calls| CloudIoT
    Notification -->|via| EmailSMS

    CICD -->|deploys| DockerK8s
    DockerK8s -->|hosts| APIGateway
    DockerK8s -->|hosts| WebAPI
    DockerK8s -->|hosts| IoTIngestion
    DockerK8s -->|hosts| MQTTBroker

    %% Styles
    classDef ui fill:#D0E6FA,stroke:#0366D6,color:#0366D6;
    classDef backend fill:#D8F5D3,stroke:#28A745,color:#28A745;
    classDef database fill:#FFE5B4,stroke:#FF8C00,color:#FF8C00;
    classDef broker fill:#FFE5B4,stroke:#FF8C00,color:#FF8C00;
    classDef edge fill:#F0F0F0,stroke:#6A737D,color:#6A737D;
    classDef device fill:#F0F0F0,stroke:#6A737D,color:#6A737D;
    classDef external fill:#F5F5F5,stroke:#888888,color:#333333;
    classDef devops fill:#EAEAF2,stroke:#6F42C1,color:#6F42C1;
```
