How abeja01/ecommerce-grupo3-go works
This is a modular e-commerce application: users manage a product catalog of simple products and composites, maintain promotions, and request decorated price quotes. The React UI calls a Go HTTP API, whose product and promotion modules provide the documented CRUD and pricing capabilities, backed by PostgreSQL or an in-memory fallback. The graph preserves the documented domain stages, but source excerpts do not establish most internal backend call relationships; those links are omitted. The separate referencia-companeros/ examples are not part of the documented product workflow.
Main entry points: main.go Go API server · App.tsx Catalog and admin UI · api.ts REST client · postgres.go PostgreSQL connection
Components 17
Customer interface
- Catalog and admin UI
frontend/src/App.tsx - REST client
frontend/src/services/api.ts - Product contracts
frontend/src/types/product.ts - Promotion contracts
frontend/src/types/promotion.ts
HTTP application
- Go API server
backend/cmd/api/main.go - Runtime configuration
backend/internal/config/config.go
Product catalog
- Product endpoints
backend/internal/products/handler.go - Product models
backend/internal/products/model.go - Composite pricing
backend/internal/products/composite.go - Product repository
backend/internal/products/repository.go
Promotion pricing
- Promotion endpoints
backend/internal/promotions/handler.go - Promotion models
backend/internal/promotions/model.go - Discount decorators
backend/internal/promotions/decorator.go - Promotion repository
backend/internal/promotions/repository.go
Persistence
- PostgreSQL connection
backend/internal/database/postgres.go - PostgreSQL
Other components
- User
Connections 6
- User → Catalog and admin UI: uses
README.md - Catalog and admin UI → REST client: invokes
frontend/src/App.tsx - REST client → Go API server: HTTP requests
frontend/src/services/api.ts - Go API server → Product endpoints: routes requests
README.md - Go API server → Promotion endpoints: routes requests
README.md - PostgreSQL connection → PostgreSQL: connects
README.md