How jackfrt/minimarket-alpha works
Minimarket is a small HTTP application for managing products and suppliers. A user sends requests to the API, which serves a home page and handles product and supplier reads, creates, updates, and deletes; product cloning is an additional operation. The application service validates and assigns identities for writes, while a JSON-backed repository persists the records. The sampled source shows startup wiring and these API paths; it does not establish further behavior for the unsampled HTML or deployment configuration.
Main entry points: interfaz_http.go HTTP routes · repositorio_json.go JSON repository adapter · principal.go HTTP server setup · servicio.go Product and supplier service
Components 8
Startup and HTTP
- HTTP server setup
cmd/api/principal.go - HTTP routes
internal/presentation/interfaz_http.go - Home page
internal/presentation/pagina.html
Application logic
- Product and supplier service
internal/application/servicio.go
Domain model
- Product and supplier entities
internal/domain/entidades.go
JSON persistence
- JSON repository adapter
internal/infrastructure/repositorio_json.go - JSON data file
Other components
- API user
Connections 9
- API user → HTTP server setup: sends HTTP
cmd/api/principal.go - HTTP server setup → HTTP routes: configures routes
cmd/api/principal.go - HTTP server setup → JSON repository adapter: creates repository
cmd/api/principal.go - HTTP routes → Home page: serves page
internal/presentation/interfaz_http.go - HTTP routes → Product and supplier service: calls service
internal/presentation/interfaz_http.go - HTTP routes → JSON repository adapter: reads and deletes
internal/presentation/interfaz_http.go - Product and supplier service → JSON repository adapter: saves and loads
internal/application/servicio.go - Product and supplier service → Product and supplier entities: validates and clones
internal/application/servicio.go - JSON repository adapter → JSON data file: reads and writes
internal/infrastructure/repositorio_json.go