# goravel/framework architecture

> Architecture diagram of the GitHub repository goravel/framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/goravel/framework
- Repository: https://github.com/goravel/framework

## Overview

Goravel is a Laravel-inspired Go web application framework. Its principal web workflow accepts an HTTP request, routes it through middleware and validation to application handling, then returns a response; surrounding modules provide persistence, identity, and other application services. The graph also preserves major README capabilities as independent framework subsystems. Wiring is based on the documented product role and available tree; sampled source specifically confirms validation execution and session-driver behavior, not every subsystem’s internal calls.

Main entry points: [`http/runners.go`](https://github.com/goravel/framework/blob/master/http/runners.go) (HTTP server), [`http/middleware`](https://github.com/goravel/framework/tree/master/http/middleware) (HTTP middleware), [`route/route.go`](https://github.com/goravel/framework/blob/master/route/route.go) (Routing), [`validation/validation.go`](https://github.com/goravel/framework/blob/master/validation/validation.go) (Request validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_app["Application bootstrap<br/>[application.go]"]
  node_config["Configuration<br/>[application.go]"]
end

subgraph group_web["Web handling"]
  node_http["HTTP server<br/>[runners.go]"]
  node_routing["Routing<br/>[route.go]"]
  node_middleware["HTTP middleware"]
  node_validation["Request validation<br/>[validation.go]"]
  node_response["HTTP response<br/>[context.go]"]
end

subgraph group_data["Data and state"]
  node_database["Database and ORM<br/>[orm.go]"]
  node_schema["Schema and migrations<br/>[schema.go]"]
  node_cache["Cache<br/>[driver.go]"]
  node_session["Sessions<br/>[manager.go]"]
  node_filesystem["File storage<br/>[application.go]"]
end

subgraph group_services["Application services"]
  node_auth["Authentication<br/>[auth.go]"]
  node_authorization["Authorization gates<br/>[gate.go]"]
  node_queue["Background queue<br/>[worker.go]"]
  node_scheduler["Task scheduling<br/>[application.go]"]
  node_events["Events<br/>[application.go]"]
  node_mail["Mail delivery<br/>[mail.go]"]
  node_notifications["Notifications<br/>[notification.go]"]
  node_grpc["gRPC<br/>[application.go]"]
end

subgraph group_operations["Operations and insight"]
  node_artisan["Artisan CLI<br/>[application.go]"]
  node_telemetry["Telemetry<br/>[application.go]"]
  node_logging["Logging<br/>[application.go]"]
  node_process["Process pipelines<br/>[pipeline.go]"]
end

node_developer(("Application user"))

node_developer -->|"runs commands"| node_artisan
node_developer -->|"sends request"| node_http
node_app -->|"loads settings"| node_config
node_http -->|"dispatches request"| node_routing
node_routing -->|"applies middleware"| node_middleware
node_middleware -->|"validates input"| node_validation
node_middleware -->|"checks identity"| node_auth
node_auth -->|"checks access"| node_authorization
node_validation -->|"returns result"| node_response
node_http -->|"sends response"| node_response
node_database -->|"uses schema"| node_schema
node_session -.->|"stores sessions"| node_filesystem
node_scheduler -.->|"dispatches jobs"| node_queue
node_events -.->|"queues listeners"| node_queue
node_notifications -.->|"delivers mail"| node_mail

click node_app "https://github.com/goravel/framework/blob/master/foundation/application.go"
click node_config "https://github.com/goravel/framework/blob/master/config/application.go"
click node_artisan "https://github.com/goravel/framework/blob/master/console/application.go"
click node_http "https://github.com/goravel/framework/blob/master/http/runners.go"
click node_routing "https://github.com/goravel/framework/blob/master/route/route.go"
click node_middleware "https://github.com/goravel/framework/tree/master/http/middleware"
click node_validation "https://github.com/goravel/framework/blob/master/validation/validation.go"
click node_response "https://github.com/goravel/framework/blob/master/http/context.go"
click node_auth "https://github.com/goravel/framework/blob/master/auth/auth.go"
click node_authorization "https://github.com/goravel/framework/blob/master/auth/access/gate.go"
click node_database "https://github.com/goravel/framework/blob/master/database/orm/orm.go"
click node_schema "https://github.com/goravel/framework/blob/master/database/schema/schema.go"
click node_cache "https://github.com/goravel/framework/blob/master/cache/driver.go"
click node_session "https://github.com/goravel/framework/blob/master/session/manager.go"
click node_filesystem "https://github.com/goravel/framework/blob/master/filesystem/application.go"
click node_queue "https://github.com/goravel/framework/blob/master/queue/worker.go"
click node_scheduler "https://github.com/goravel/framework/blob/master/schedule/application.go"
click node_events "https://github.com/goravel/framework/blob/master/event/application.go"
click node_mail "https://github.com/goravel/framework/blob/master/mail/mail.go"
click node_notifications "https://github.com/goravel/framework/blob/master/notification/notification.go"
click node_grpc "https://github.com/goravel/framework/blob/master/grpc/application.go"
click node_telemetry "https://github.com/goravel/framework/blob/master/telemetry/application.go"
click node_logging "https://github.com/goravel/framework/blob/master/log/application.go"
click node_process "https://github.com/goravel/framework/blob/master/process/pipeline.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_config,node_developer toneBlue
class node_http,node_routing,node_middleware,node_validation,node_response toneAmber
class node_database,node_schema,node_cache,node_session,node_filesystem toneMint
class node_auth,node_authorization,node_queue,node_scheduler,node_events,node_mail,node_notifications,node_grpc toneRose
class node_artisan,node_telemetry,node_logging,node_process toneIndigo
```

## Components

### Application runtime

- [Application bootstrap](https://github.com/goravel/framework/blob/master/foundation/application.go): `foundation/application.go`
- [Configuration](https://github.com/goravel/framework/blob/master/config/application.go): `config/application.go`

### Web handling

- [HTTP server](https://github.com/goravel/framework/blob/master/http/runners.go): `http/runners.go`
- [Routing](https://github.com/goravel/framework/blob/master/route/route.go): `route/route.go`
- [HTTP middleware](https://github.com/goravel/framework/tree/master/http/middleware): `http/middleware`
- [Request validation](https://github.com/goravel/framework/blob/master/validation/validation.go): `validation/validation.go`
- [HTTP response](https://github.com/goravel/framework/blob/master/http/context.go): `http/context.go`

### Data and state

- [Database and ORM](https://github.com/goravel/framework/blob/master/database/orm/orm.go): `database/orm/orm.go`
- [Schema and migrations](https://github.com/goravel/framework/blob/master/database/schema/schema.go): `database/schema/schema.go`
- [Cache](https://github.com/goravel/framework/blob/master/cache/driver.go): `cache/driver.go`
- [Sessions](https://github.com/goravel/framework/blob/master/session/manager.go): `session/manager.go`
- [File storage](https://github.com/goravel/framework/blob/master/filesystem/application.go): `filesystem/application.go`

### Application services

- [Authentication](https://github.com/goravel/framework/blob/master/auth/auth.go): `auth/auth.go`
- [Authorization gates](https://github.com/goravel/framework/blob/master/auth/access/gate.go): `auth/access/gate.go`
- [Background queue](https://github.com/goravel/framework/blob/master/queue/worker.go): `queue/worker.go`
- [Task scheduling](https://github.com/goravel/framework/blob/master/schedule/application.go): `schedule/application.go`
- [Events](https://github.com/goravel/framework/blob/master/event/application.go): `event/application.go`
- [Mail delivery](https://github.com/goravel/framework/blob/master/mail/mail.go): `mail/mail.go`
- [Notifications](https://github.com/goravel/framework/blob/master/notification/notification.go): `notification/notification.go`
- [gRPC](https://github.com/goravel/framework/blob/master/grpc/application.go): `grpc/application.go`

### Operations and insight

- [Artisan CLI](https://github.com/goravel/framework/blob/master/console/application.go): `console/application.go`
- [Telemetry](https://github.com/goravel/framework/blob/master/telemetry/application.go): `telemetry/application.go`
- [Logging](https://github.com/goravel/framework/blob/master/log/application.go): `log/application.go`
- [Process pipelines](https://github.com/goravel/framework/blob/master/process/pipeline.go): `process/pipeline.go`

### Other components

- **Application user**

## Connections

- Application user → Artisan CLI: runs commands
- Application user → HTTP server: sends request
- Application bootstrap → Configuration: loads settings
- HTTP server → Routing: dispatches request
- Routing → HTTP middleware: applies middleware
- HTTP middleware → Request validation: validates input
- HTTP middleware → Authentication: checks identity
- Authentication → Authorization gates: checks access
- Request validation → HTTP response: returns result
- HTTP server → HTTP response: sends response
- Database and ORM → Schema and migrations: uses schema
- Sessions → File storage: stores sessions
- Task scheduling → Background queue: dispatches jobs
- Events → Background queue: queues listeners
- Notifications → Mail delivery: delivers mail
