# luissflores/test-tecnico architecture

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

- Interactive diagram: https://gitdiagram.com/luissflores/test-tecnico
- Repository: https://github.com/luissflores/test-tecnico

## Overview

##### Project Type and Purpose
- This is a hybrid project containing two distinct parts:
a. A set of standalone JavaScript exercises under logico-matematico (logical-mathematical problems).
b. A full-stack “practicos” test implementation:
- A Node.js/Express backend providing a simple Tasks CRUD API.
- A Nuxt (Vue) frontend consuming that API to display and edit tasks.

##### File Structure Analysis
- Top level:
- logico-matematico/ – JS exercise scripts (ejercicio_*.js).
- practicos/ – practical test: subdivided into backend/ and frontend/.
- practicos/backend:
- index.js – entry point, likely sets up Express app.
- controllers/task.controller.js – business logic for tasks.
- models/tasks.model.js – Task schema or data-access layer.
- routes/task.routes.js & routes/index.js – HTTP route definitions.
- middleware.js – custom Express middleware (e.g., logging or auth).
- .env – environment variables (DB_URI, PORT, etc.).
- practicos/frontend:
- nuxt.config.ts – Nuxt configuration.
- pages/ – page components (index.vue, new.vue, edit.vue).
- components/taskCard.vue – UI card for single task.
- composables/userTask.ts & stores/tasks.ts – Composition API hooks and Pinia store.
- public/ – static assets.
- No explicit database folder, so model likely uses an external service (e.g., MongoDB via Mongoose in .env).

##### README Insights
- Confirms two exercise sets (logic/math vs. full-stack).
- Practicos frontend wasn’t fully finished due to time.
- .env is present for ease of use.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Standalone Scripts
    Scripts["Math Logic Scripts"]:::scripts

    %% Backend Tier
    subgraph "Backend Tier"
        direction TB
        indexJS["API Entry Point\nindex.js"]:::backend
        middleware["Express Middleware\nmiddleware.js"]:::backend
        routesIndex["Route Definitions\nroutes/index.js"]:::backend
        taskRoutes["Task Routes\nroutes/task.routes.js"]:::backend
        controllers["Task Controller\ncontrollers/task.controller.js"]:::backend
        model["Task Model\nmodels/tasks.model.js"]:::backend
        env["Environment (.env)"]:::backend
    end

    %% Database
    db["MongoDB\nExternal DB"]:::database

    %% Frontend Tier
    subgraph "Frontend Tier"
        direction TB
        nuxtConfig["Nuxt Config\nnuxt.config.ts"]:::frontend
        appShell["App Shell\napp.vue"]:::frontend
        pagesList["Task List Page\npages/index.vue"]:::frontend
        pagesNew["New Task Page\npages/new.vue"]:::frontend
        pagesEdit["Edit Task Page\npages/edit.vue"]:::frontend
        component["Task Card Component\ncomponents/taskCard.vue"]:::frontend
        composables["Composable Hook\ncomposables/userTask.ts"]:::frontend
        store["Pinia Store\ntasks.ts"]:::frontend
        staticAssets["Static Assets\npublic/"]:::frontend
        apiClient["HTTP Client\n$fetch/axios"]:::frontend
    end

    %% Connections - Backend
    Scripts -.->|isolated| Scripts
    env --> indexJS
    indexJS --> middleware
    middleware --> routesIndex
    routesIndex --> taskRoutes
    taskRoutes --> controllers
    controllers --> model
    model --> db

    %% Connections - Frontend
    nuxtConfig --> appShell
    appShell --> pagesList
    appShell --> pagesNew
    appShell --> pagesEdit
    pagesList --> component
    pagesList --> composables
    pagesNew --> composables
    pagesEdit --> composables
    composables --> store
    store --> apiClient
    apiClient -->|HTTP CRUD| indexJS

    %% Click Events
    click Scripts "https://github.com/luissflores/test-tecnico/tree/main/logico-matematico/"
    click indexJS "https://github.com/luissflores/test-tecnico/blob/main/practicos/backend/index.js"
    click middleware "https://github.com/luissflores/test-tecnico/blob/main/practicos/backend/middleware.js"
    click controllers "https://github.com/luissflores/test-tecnico/blob/main/practicos/backend/controllers/task.controller.js"
    click model "https://github.com/luissflores/test-tecnico/blob/main/practicos/backend/models/tasks.model.js"
    click routesIndex "https://github.com/luissflores/test-tecnico/blob/main/practicos/backend/routes/index.js"
    click taskRoutes "https://github.com/luissflores/test-tecnico/blob/main/practicos/backend/routes/task.routes.js"
    click env "https://github.com/luissflores/test-tecnico/blob/main/practicos/backend/.env"
    click nuxtConfig "https://github.com/luissflores/test-tecnico/blob/main/practicos/frontend/nuxt.config.ts"
    click appShell "https://github.com/luissflores/test-tecnico/blob/main/practicos/frontend/app.vue"
    click pagesList "https://github.com/luissflores/test-tecnico/blob/main/practicos/frontend/pages/index.vue"
    click pagesNew "https://github.com/luissflores/test-tecnico/blob/main/practicos/frontend/pages/new.vue"
    click pagesEdit "https://github.com/luissflores/test-tecnico/blob/main/practicos/frontend/pages/edit.vue"
    click component "https://github.com/luissflores/test-tecnico/blob/main/practicos/frontend/components/taskCard.vue"
    click composables "https://github.com/luissflores/test-tecnico/blob/main/practicos/frontend/composables/userTask.ts"
    click store "https://github.com/luissflores/test-tecnico/blob/main/practicos/frontend/stores/tasks.ts"
    click staticAssets "https://github.com/luissflores/test-tecnico/tree/main/practicos/frontend/public/"

    %% Styles
    classDef frontend fill:#bbdefb,stroke:#333,stroke-width:1px
    classDef backend fill:#c8e6c9,stroke:#333,stroke-width:1px
    classDef database fill:#ffe0b2,stroke:#333,stroke-width:1px
    classDef scripts fill:#e0e0e0,stroke:#333,stroke-width:1px
```
