How jorgesaurio/mercado-publico-kit works
Mercado Público Kit provides a web/mobile procurement browser, a ticket-protecting REST backend, and a reusable TypeScript SDK for ChileCompra’s public API. Users search listings, orders, suppliers, and buyers; open record details; and can save favorites locally. The backend validates and routes requests through cached data services to either the real SDK client or mock data. The graph preserves the documented OpenAPI and offline/favorites capabilities. Some wiring and page implementations were not excerpted, so uncertain links are omitted; edges cite only shown or indexed evidence.
Main entry points: App.tsx App routing · api.ts Web API client · client.ts Mercado Público client · index.ts Backend startup
Components 26
Web application
- App routing
apps/web/src/App.tsx - Home search
apps/web/src/pages/Inicio.tsx - Tender search
apps/web/src/pages/Licitaciones.tsx - Tender details
apps/web/src/pages/LicitacionDetalle.tsx - Order search
apps/web/src/pages/Ordenes.tsx - Order details
apps/web/src/pages/OrdenDetalle.tsx - Supplier lookup
apps/web/src/pages/Proveedores.tsx - Buyer search
apps/web/src/pages/Compradores.tsx - Favorites view
apps/web/src/pages/Favoritos.tsx - Web API client
apps/web/src/api.ts - UI components
apps/web/src/components.tsx - Favorites storage
apps/web/src/favoritos.ts - Display formatting
apps/web/src/formato.ts
Backend API
- REST routes
apps/api/src/app.ts - Query services
apps/api/src/servicio.ts - TTL cache
apps/api/src/cache.ts - Data source contract
apps/api/src/fuente.ts - Backend startup
apps/api/src/index.ts - Mock data
apps/api/src/mock.ts - OpenAPI specification
apps/api/src/openapi.ts
SDK and source
- Mercado Público client
packages/sdk/src/client.ts - SDK errors
packages/sdk/src/errors.ts - SDK utilities
packages/sdk/src/utils.ts - API constants
packages/sdk/src/constants.ts
Other components
- Web user
- ChileCompra API
Connections 35
- Web user → App routing: uses
README.md - App routing → Home search: routes to
apps/web/src/App.tsx - App routing → Tender search: routes to
apps/web/src/App.tsx - App routing → Tender details: routes to
apps/web/src/App.tsx - App routing → Order search: routes to
apps/web/src/App.tsx - App routing → Order details: routes to
apps/web/src/App.tsx - App routing → Supplier lookup: routes to
apps/web/src/App.tsx - App routing → Buyer search: routes to
apps/web/src/App.tsx - App routing → Favorites view: routes to
apps/web/src/App.tsx - App routing → Web API client: reads status
apps/web/src/App.tsx - Home search → Web API client: requests data
apps/web/src/pages/Inicio.tsx - Tender search → Web API client: requests data
apps/web/src/pages/Licitaciones.tsx - Tender details → Web API client: requests detail
apps/web/src/pages/LicitacionDetalle.tsx - Order search → Web API client: requests data
apps/web/src/pages/Ordenes.tsx - Order details → Web API client: requests detail
apps/web/src/pages/OrdenDetalle.tsx - Supplier lookup → Web API client: requests data
apps/web/src/pages/Proveedores.tsx - Buyer search → Web API client: requests data
apps/web/src/pages/Compradores.tsx - Favorites view → Favorites storage: reads favorites
apps/web/src/pages/Favoritos.tsx - Tender details → UI components: renders with
apps/web/src/pages/LicitacionDetalle.tsx - Order details → UI components: renders with
apps/web/src/pages/OrdenDetalle.tsx - UI components → Favorites storage: updates favorites
apps/web/src/components.tsx - UI components → Display formatting: formats dates
apps/web/src/components.tsx - Web API client → REST routes: HTTP requests
apps/web/src/api.ts - REST routes → Query services: dispatches queries
apps/api/src/app.ts - REST routes → OpenAPI specification: serves specification
apps/api/src/app.ts - Query services → TTL cache: reads and writes
apps/api/src/servicio.ts - Query services → Data source contract: queries source
apps/api/src/servicio.ts - Backend startup → REST routes: starts routes
apps/api/src/index.ts - Backend startup → Query services: constructs service
apps/api/src/index.ts - Backend startup → Mock data: selects mock
apps/api/src/index.ts - Backend startup → Mercado Público client: configures client
apps/api/src/index.ts - Mercado Público client → ChileCompra API: calls endpoints
README.md - Mercado Público client → SDK errors: uses errors
packages/sdk/src/client.ts - Mercado Público client → SDK utilities: uses utilities
packages/sdk/src/client.ts - Mercado Público client → API constants: uses constants
packages/sdk/src/client.ts