How goravel/example works
This repository is a Goravel example web application demonstrating framework capabilities. Its main user workflow is an HTTP request routed to an application controller, which may validate input, use authentication or persistence, and return a response. Separate branches demonstrate gRPC, GraphQL, WebSockets, localization, views, and Swagger. Bootstrap explicitly wires the route sets and event listeners; unsampled route implementations limit claims about which controller each route dispatches to.
Main entry points: app.go Bootstrap · auth_controller.go Authentication · graphql.go GraphQL routes · facades Framework facades
Components 22
Application wiring
- Bootstrap
bootstrap/app.go - Service providers
bootstrap/providers.go
HTTP features
- Web routes
routes/web.go - API routes
routes/api.go - Authentication
app/http/controllers/auth_controller.go - Validation
app/http/controllers/validation_controller.go - Validation request
app/http/requests/validation_create.go - Database example
app/http/controllers/db_controller.go - WebSocket example
app/http/controllers/websocket_controller.go - Swagger example
app/http/controllers/swagger_controller.go
Application services
- User service
app/services/user.go - User model
app/models/user.go - Framework facades
app/facades - Order events
app/events - Shipment listener
app/listeners/send_shipment_notification.go
Other protocols
- gRPC routes
routes/grpc.go - gRPC user service
app/grpc/controllers/user_controller.go - GraphQL routes
routes/graphql.go - GraphQL resolvers
graph/schema.resolvers.go - Localization
lang_fs/fs.go - WebSocket client
packages/websocket_client/main.go
Other components
- HTTP client
Connections 15
- HTTP client → Bootstrap: requests service
- Bootstrap → Web routes: registers routes
bootstrap/app.go - Bootstrap → API routes: registers routes
bootstrap/app.go - Bootstrap → gRPC routes: registers routes
bootstrap/app.go - Bootstrap → GraphQL routes: registers routes
bootstrap/app.go - Bootstrap → Service providers: loads providers
bootstrap/app.go - Bootstrap → Order events: registers events
bootstrap/app.go - Bootstrap → Shipment listener: registers listener
bootstrap/app.go - Authentication → Framework facades: uses auth and ORM
app/http/controllers/auth_controller.go - Authentication → User model: loads user
app/http/controllers/auth_controller.go - Validation → Validation request: validates request
app/http/controllers/validation_controller.go - Database example → Framework facades: uses framework services
- gRPC user service → HTTP client: returns user data
app/grpc/controllers/user_controller.go - GraphQL routes → GraphQL resolvers: serves GraphQL
- WebSocket client → HTTP client: connects to WebSocket
packages/websocket_client/main.go