# conietchepare/ingenier-a-de-software-i architecture

> Architecture diagram of the GitHub repository conietchepare/ingenier-a-de-software-i, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/conietchepare/ingenier-a-de-software-i
- Repository: https://github.com/conietchepare/ingenier-a-de-software-i

## Overview

Trotamundos is a travel-itinerary system documented through architecture iterations and represented by a small Go proof of concept. Its intended workflow includes asynchronous email ingestion, itinerary management and storage, plus integrations with external travel agencies; the prototype currently exposes a synchronous GET endpoint returning mock itineraries. The graph preserves these documented capabilities, but several are design-stage stubs. Dashed, uncited links indicate relationships suggested by comments or documentation rather than demonstrated calls.

Main entry points: [`cmd/apigateway/main.go`](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/cmd/apigateway/main.go) (HTTP Gateway), [`internal/agencias/router.go`](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/agencias/router.go) (Agency Router), [`internal/core/itinerarios.go`](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/core/itinerarios.go) (Itinerary Service), [`api/asyncapi.yaml`](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/api/asyncapi.yaml) (Async Contract)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gateway["API Gateway"]
  node_gateway_runtime["HTTP Gateway<br/>[main.go]"]
  node_rest_contract["REST Contract<br/>[openapi.yaml]"]
end

subgraph group_itinerary["Itinerary Management"]
  node_itinerary_service["Itinerary Service<br/>[itinerarios.go]"]
  node_itinerary_store[("Transactional Store")]
end

subgraph group_ingestion["Email Ingestion"]
  node_async_contract["Async Contract<br/>[asyncapi.yaml]"]
  node_event_bus["Event Bus"]
  node_parser["Email Parser<br/>[parser.go]"]
end

subgraph group_integrations["Agency Integration"]
  node_agency_router["Agency Router<br/>[router.go]"]
  node_agency_config["Agency Configuration<br/>[agencias.json]"]
end

node_client(("API Client"))
node_email(("Email Source"))
node_external_agencies(("Travel Agencies"))

node_client -->|"requests itineraries"| node_gateway_runtime
node_gateway_runtime -->|"returns mock JSON"| node_client
node_gateway_runtime -.->|"implements endpoints"| node_rest_contract
node_email -.->|"provides messages"| node_event_bus
node_event_bus -.->|"reads events"| node_parser
node_async_contract -.->|"specifies events"| node_event_bus
node_itinerary_service -.->|"uses storage"| node_itinerary_store
node_agency_router -.->|"adapts agency access"| node_external_agencies
node_agency_config -.->|"configures agencies"| node_agency_router

click node_gateway_runtime "https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/cmd/apigateway/main.go"
click node_rest_contract "https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/api/openapi.yaml"
click node_async_contract "https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/api/asyncapi.yaml"
click node_parser "https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/ingesta/parser.go"
click node_itinerary_service "https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/core/itinerarios.go"
click node_agency_router "https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/agencias/router.go"
click node_agency_config "https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/config/agencias.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gateway_runtime,node_rest_contract,node_client toneBlue
class node_itinerary_service,node_itinerary_store toneAmber
class node_async_contract,node_event_bus,node_parser toneMint
class node_agency_router,node_agency_config toneRose
class node_email,node_external_agencies toneIndigo
```

## Components

### API Gateway

- [HTTP Gateway](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/cmd/apigateway/main.go): `cmd/apigateway/main.go`
- [REST Contract](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/api/openapi.yaml): `api/openapi.yaml`

### Itinerary Management

- [Itinerary Service](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/core/itinerarios.go): `internal/core/itinerarios.go`
- **Transactional Store**

### Email Ingestion

- [Async Contract](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/api/asyncapi.yaml): `api/asyncapi.yaml`
- **Event Bus**
- [Email Parser](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/ingesta/parser.go): `internal/ingesta/parser.go`

### Agency Integration

- [Agency Router](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/agencias/router.go): `internal/agencias/router.go`
- [Agency Configuration](https://github.com/conietchepare/ingenier-a-de-software-i/blob/main/internal/config/agencias.json): `internal/config/agencias.json`

### Other components

- **API Client**
- **Email Source**
- **Travel Agencies**

## Connections

- API Client → HTTP Gateway: requests itineraries (evidence: `README.md`)
- HTTP Gateway → API Client: returns mock JSON (evidence: `cmd/apigateway/main.go`)
- HTTP Gateway → REST Contract: implements endpoints (evidence: `README.md`)
- Email Source → Event Bus: provides messages
- Event Bus → Email Parser: reads events (evidence: `internal/ingesta/parser.go`)
- Async Contract → Event Bus: specifies events (evidence: `README.md`)
- Itinerary Service → Transactional Store: uses storage (evidence: `internal/core/itinerarios.go`)
- Agency Router → Travel Agencies: adapts agency access (evidence: `internal/agencias/router.go`)
- Agency Configuration → Agency Router: configures agencies
