# luislunaec/devradar architecture

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

- Interactive diagram: https://gitdiagram.com/luislunaec/devradar
- Repository: https://github.com/luislunaec/devradar

## Overview

##### Project type and purpose
- DevRadar is a full-stack web application with an auxiliary data-collection microservice.
- Purpose: Analyze the Ecuadorian IT job market by scraping job sites, storing listings, and exposing dashboards and AI-powered features (CV analysis, comparison, statistics) via a web UI.

##### File structure
- Top-level directories:
- backend: FastAPI service implementing REST endpoints, AI logic, database access.
- frontend: Vite + React + TypeScript + Tailwind UI for dashboards and pages.
- scraper: Standalone Python microservice that scrapes job portals and populates the database.
- .github/workflows: CI/CD (deploy.yml).
- docker-compose.yml: Orchestrates containers (frontend, backend, scraper, DB).
- Patterns:
- backend/app/routers ↔ HTTP API layer
- backend/app/services ↔ Business logic layer
- backend/app/llm & embeddings ↔ External AI integration
- scraper/db ↔ Data-access for Supabase/PostgreSQL
- Configuration & deployment:
- Dockerfiles in backend, frontend, scraper
- docs/DEPLOY.md

##### README
- Single-line description: “Análisis del mercado laboral ecuatoriano, enfocado en las habilidades más solicitadas de las TI.”

##### Putting it all together
- Connect:
- Browser → Frontend → Backend → Database
- Backend → External LLM API
- Scraper → Database
- Optionally, show GitHub Actions (under .github/workflows) triggering deploys or scraper runs.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Clients
    Browser["User’s Browser"]:::client
    ExternalLLMAPI["External LLM API"]:::external
    GHActions["GitHub Actions (deploy.yml)"]:::external
    Docs["Deployment Docs (DEPLOY.md)"]:::external

    subgraph "DevRadar Deployment (docker-compose)"
        direction TB

        subgraph "Frontend Service (React/Vite)" 
            direction TB
            FE_Main["main.tsx"]:::frontend
            FE_App["App.tsx"]:::frontend
            FE_Pages["pages/"]:::frontend
            FE_Components["components/"]:::frontend
            FE_API["services/api.ts"]:::frontend
            FE_Docker["Dockerfile"]:::frontend
            FE_Vite["vite.config.ts"]:::frontend
        end

        subgraph "Backend Service (FastAPI)"
            direction TB
            BE_Main["main.py"]:::backend
            BE_Routers["routers/"]:::backend
            BE_Services["services/"]:::backend
            BE_LLM["llm.py"]:::backend
            BE_Embeddings["embeddings.py"]:::backend
            BE_DBUtils["database.py & utils.py"]:::backend
            BE_Docker["Dockerfile"]:::backend
            BE_Reqs["requirements.txt"]:::backend
        end

        subgraph "Scraper Service"
            direction TB
            S_Main["main.py"]:::scraper
            S_Scrapers["scrapers/"]:::scraper
            S_Cleaner["limpiador_de_datos.py"]:::scraper
            S_DBHelpers["db/"]:::scraper
            S_Docker["Dockerfile"]:::scraper
            S_Reqs["requirements.txt"]:::scraper
        end

        Database["PostgreSQL Database"]:::database
    end

    %% Connections
    Browser -->|"HTTPS"| FE_Main
    FE_Main -->|"REST API calls"| BE_Main
    BE_Main -->|"SQL queries"| Database
    BE_Main -->|"HTTP to LLM"| ExternalLLMAPI
    S_Main -->|"INSERT jobs"| Database
    GHActions -->|"trigger deploy/run"| S_Main
    GHActions -->|"trigger deploy"| BE_Main

    Docs -->|"deployment guide"| GHActions

    %% Click events
    click FE_Main "https://github.com/luislunaec/devradar/blob/main/frontend/src/main.tsx"
    click FE_App "https://github.com/luislunaec/devradar/blob/main/frontend/src/App.tsx"
    click FE_Pages "https://github.com/luislunaec/devradar/tree/main/frontend/src/pages/"
    click FE_Components "https://github.com/luislunaec/devradar/tree/main/frontend/src/components/"
    click FE_API "https://github.com/luislunaec/devradar/blob/main/frontend/src/services/api.ts"
    click FE_Docker "https://github.com/luislunaec/devradar/tree/main/frontend/Dockerfile"
    click FE_Vite "https://github.com/luislunaec/devradar/blob/main/frontend/vite.config.ts"

    click BE_Main "https://github.com/luislunaec/devradar/blob/main/backend/main.py"
    click BE_Routers "https://github.com/luislunaec/devradar/tree/main/backend/app/routers/"
    click BE_Services "https://github.com/luislunaec/devradar/tree/main/backend/app/services/"
    click BE_LLM "https://github.com/luislunaec/devradar/blob/main/backend/app/llm.py"
    click BE_Embeddings "https://github.com/luislunaec/devradar/blob/main/backend/app/embeddings.py"
    click BE_DBUtils "https://github.com/luislunaec/devradar/blob/main/backend/app/database.py"
    click BE_DBUtils "https://github.com/luislunaec/devradar/blob/main/backend/app/utils.py"
    click BE_Docker "https://github.com/luislunaec/devradar/tree/main/backend/Dockerfile"
    click BE_Reqs "https://github.com/luislunaec/devradar/blob/main/backend/requirements.txt"

    click S_Main "https://github.com/luislunaec/devradar/blob/main/scraper/main.py"
    click S_Scrapers "https://github.com/luislunaec/devradar/tree/main/scraper/scrapers/"
    click S_Cleaner "https://github.com/luislunaec/devradar/blob/main/scraper/limpiador/limpiador_de_datos.py"
    click S_DBHelpers "https://github.com/luislunaec/devradar/tree/main/scraper/db/"
    click S_Docker "https://github.com/luislunaec/devradar/tree/main/scraper/Dockerfile"
    click S_Reqs "https://github.com/luislunaec/devradar/blob/main/scraper/requirements.txt"

    click Docs "https://github.com/luislunaec/devradar/blob/main/docs/DEPLOY.md"
    click GHActions "https://github.com/luislunaec/devradar/blob/main/.github/workflows/deploy.yml"

    %% Styles
    classDef client fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef frontend fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef backend fill:#ccffcc,stroke:#333,stroke-width:1px
    classDef scraper fill:#ffedcc,stroke:#333,stroke-width:1px
    classDef database fill:#fff3cd,stroke:#333,stroke-width:1px
    classDef external fill:#e0e0e0,stroke:#333,stroke-width:1px
```
