How tony11montana/expressdelivery-api- works
ExpressDelivery is a small web-based delivery-ordering system: browser pages interact with a Go REST API, which authenticates users and handles products, couriers, and orders backed by MySQL. Order creation selects an employee and courier, allocates warehouse stock, and records order items. The README documents Docker-based startup and service ports, but not additional product behavior. The frontend login and order-creation page implementations were not sampled, so those details and their wiring are omitted.
Main entry points: handlers.go REST handlers · mysql-data MySQL database · main.go HTTP server and routes · scriptm.js Page interactions
Components 12
Web interface
- Delivery pages
frontend/orders-index.html - Page interactions
frontend/js/scriptm.js - Login page
frontend/login.html
REST API
- HTTP server and routes
backend/main.go - REST handlers
backend/rest/handlers.go
Delivery domain
- User authentication
backend/models_db/auth.go - Order processing
backend/models_db/order.go - Product catalog
backend/models_db/product.go - Courier management
backend/models_db/courier.go
Persistence
- Database connection
backend/models_db/db.go - MySQL database
database/mysql-data
Other components
- Browser user
Connections 13
- Browser user → Delivery pages: uses
- Page interactions → HTTP server and routes: fetches API
frontend/js/scriptm.js - HTTP server and routes → REST handlers: routes requests
backend/main.go - REST handlers → User authentication: checks credentials
backend/rest/handlers.go - REST handlers → Order processing: reads and creates
backend/rest/handlers.go - REST handlers → Product catalog: reads and adds
backend/rest/handlers.go - REST handlers → Courier management: reads and adds
backend/rest/handlers.go - HTTP server and routes → Database connection: initializes
backend/main.go - User authentication → MySQL database: queries and writes
backend/models_db/auth.go - Order processing → MySQL database: queries and writes
backend/models_db/order.go - Product catalog → MySQL database: queries and writes
backend/models_db/product.go - Courier management → MySQL database: queries and writes
backend/models_db/courier.go - Login page → Page interactions: uses interactions