How abhiram123897/restobill works
RestoBill is a Go/Gin restaurant billing API backed by PostgreSQL, with JWT authentication; the React frontend is described as future work. Its principal workflow is managing menu items and tables, creating orders, generating bills, and recording payments. The graph includes the documented domain areas and the sampled order/authentication behavior. Router wiring and most feature-specific service-to-repository calls were not shown, so those relationships are omitted rather than inferred.
Main entry points: order_service.go Order workflow · router.go API router · main.go HTTP server · auth_handler.go Authentication API
Components 20
Server runtime
- HTTP server
cmd/server/main.go - Configuration
internal/config/config.go
API and access
- API router
internal/router/router.go - JWT middleware
internal/middleware/auth.go - Authentication API
internal/handler/auth_handler.go - Authentication logic
internal/service/auth_service.go - API data objects
internal/dto
Restaurant operations
- Orders API
internal/handler/order_handler.go - Order workflow
internal/service/order_service.go - Menu management
internal/service/menu_item_service.go - Menu API
internal/handler/menu_item_handler.go - Categories
internal/service/category_service.go - Table management
internal/service/restaurant_table_service.go - Billing
internal/service/bill_service.go - Payment handling
internal/service/payment_service.go - Domain models
internal/domain
Persistence
- Data repositories
internal/repository - PostgreSQL client
internal/db/db.go - PostgreSQL
Other components
- Restaurant staff
Connections 17
- Restaurant staff → API router: uses API
README.md - HTTP server → Configuration: loads settings
cmd/server/main.go - HTTP server → PostgreSQL client: opens connection
cmd/server/main.go - HTTP server → API router: sets up
cmd/server/main.go - PostgreSQL client → PostgreSQL: connects to
internal/db/db.go - API router → Authentication API: routes to
- API router → Orders API: routes to
- Authentication API → Authentication logic: calls
internal/handler/auth_handler.go - Orders API → Order workflow: calls
internal/handler/order_handler.go - Menu API → Menu management: calls
internal/handler/menu_item_handler.go - Authentication logic → Data repositories: uses user repository
internal/service/auth_service.go - Order workflow → Data repositories: uses order repository
internal/service/order_service.go - Order workflow → Menu management: reads menu items
internal/service/order_service.go - Order workflow → Table management: updates table status
internal/service/order_service.go - Billing → Order workflow: reads and updates orders
internal/service/bill_service.go - Billing → Data repositories: uses bill repository
internal/service/bill_service.go - Authentication API → API data objects: binds requests
internal/handler/auth_handler.go