# laravel/go architecture

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

- Interactive diagram: https://gitdiagram.com/laravel/go
- Repository: https://github.com/laravel/go

## Overview

This repository is a Laravel for Go starter application, not the framework itself. Its runtime boots a configured Go app, serves web/API routes, renders an Inertia welcome page with a WebGPU terrain effect, and wires framework facilities for persistence, jobs, scheduling, and events. The sampled code supports the boot, route, and page-rendering links; other README capabilities are represented as documented framework integrations, with evidence limits noted rather than inferred runtime calls.

Main entry points: [`bootstrap/app.go`](https://github.com/laravel/go/blob/0.x/bootstrap/app.go) (App configuration), [`database/seeders/seeders.go`](https://github.com/laravel/go/blob/0.x/database/seeders/seeders.go) (Database seeder), [`routes/web.go`](https://github.com/laravel/go/blob/0.x/routes/web.go) (Web routes), [`routes/api.go`](https://github.com/laravel/go/blob/0.x/routes/api.go) (API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Application boot"]
  node_main["Runtime entry<br/>[main.go]"]
  node_bootstrap["App configuration<br/>[app.go]"]
  node_services["Service container<br/>[services.go]"]
end

subgraph group_http["HTTP and pages"]
  node_web_routes["Web routes<br/>[web.go]"]
  node_api_routes["API routes<br/>[api.go]"]
  node_channel_routes["Channel routes<br/>[channels.go]"]
  node_welcome_handler["Welcome handler<br/>[welcome.go]"]
  node_inertia["Inertia middleware<br/>[app.go]"]
  node_api_response["Version endpoint<br/>[api.go]"]
end

subgraph group_data["Persistence"]
  node_user_model["User model<br/>[user.go]"]
  node_migrations["Schema migrations"]
  node_schema["Schema dump<br/>[schema.go]"]
  node_seeders["Database seeder<br/>[seeders.go]"]
  node_factory["User factory<br/>[user.go]"]
  node_database[("Database")]
end

subgraph group_async["Async facilities"]
  node_jobs["Job processing<br/>[jobs.go]"]
  node_scheduler["Task schedule<br/>[schedule.go]"]
  node_commands["Console commands<br/>[inspire.go]"]
  node_events["Event definition<br/>[example.go]"]
  node_listeners["Event listeners<br/>[example.go]"]
end

subgraph group_frontend["Frontend rendering"]
  node_assets["Embedded views<br/>[resources.go]"]
  node_app_shell["Inertia frontend<br/>[app.tsx]"]
  node_welcome_page["Welcome page<br/>[Welcome.tsx]"]
  node_terrain["WebGPU terrain<br/>[terrain.ts]"]
  node_shader["Terrain shader<br/>[terrain.wgsl]"]
end

node_user(("Browser user"))

node_main -->|"starts with"| node_bootstrap
node_bootstrap -->|"registers"| node_web_routes
node_bootstrap -->|"registers"| node_api_routes
node_bootstrap -->|"registers"| node_channel_routes
node_bootstrap -->|"configures"| node_inertia
node_bootstrap -->|"registers"| node_migrations
node_bootstrap -->|"registers"| node_schema
node_bootstrap -->|"registers"| node_seeders
node_bootstrap -->|"registers"| node_jobs
node_bootstrap -->|"registers"| node_scheduler
node_bootstrap -->|"registers"| node_listeners
node_bootstrap -->|"registers"| node_commands
node_bootstrap -->|"builds"| node_services
node_bootstrap -->|"sets views"| node_assets
node_user -.->|"requests page"| node_web_routes
node_web_routes -.->|"routes to"| node_welcome_handler
node_user -.->|"requests version"| node_api_routes
node_api_routes -->|"dispatches"| node_api_response
node_seeders -->|"creates through"| node_factory
node_factory -->|"builds"| node_user_model
node_seeders -.->|"writes"| node_database
node_migrations -.->|"changes schema"| node_database
node_welcome_page -->|"loads"| node_terrain
node_terrain -->|"uses"| node_shader
node_app_shell -.->|"renders"| node_welcome_page
node_welcome_handler -.->|"supplies page"| node_welcome_page

click node_main "https://github.com/laravel/go/blob/0.x/main.go"
click node_bootstrap "https://github.com/laravel/go/blob/0.x/bootstrap/app.go"
click node_web_routes "https://github.com/laravel/go/blob/0.x/routes/web.go"
click node_api_routes "https://github.com/laravel/go/blob/0.x/routes/api.go"
click node_channel_routes "https://github.com/laravel/go/blob/0.x/routes/channels.go"
click node_welcome_handler "https://github.com/laravel/go/blob/0.x/handlers/welcome/welcome.go"
click node_inertia "https://github.com/laravel/go/blob/0.x/bootstrap/app.go"
click node_api_response "https://github.com/laravel/go/blob/0.x/routes/api.go"
click node_user_model "https://github.com/laravel/go/blob/0.x/models/user.go"
click node_migrations "https://github.com/laravel/go/tree/0.x/database/migrations"
click node_schema "https://github.com/laravel/go/blob/0.x/database/schema/schema.go"
click node_seeders "https://github.com/laravel/go/blob/0.x/database/seeders/seeders.go"
click node_factory "https://github.com/laravel/go/blob/0.x/database/factories/user.go"
click node_jobs "https://github.com/laravel/go/blob/0.x/jobs/jobs.go"
click node_scheduler "https://github.com/laravel/go/blob/0.x/commands/schedule.go"
click node_commands "https://github.com/laravel/go/blob/0.x/commands/inspire.go"
click node_events "https://github.com/laravel/go/blob/0.x/events/example.go"
click node_listeners "https://github.com/laravel/go/blob/0.x/listeners/example.go"
click node_services "https://github.com/laravel/go/blob/0.x/services/services.go"
click node_assets "https://github.com/laravel/go/blob/0.x/resources/resources.go"
click node_app_shell "https://github.com/laravel/go/blob/0.x/resources/js/app.tsx"
click node_welcome_page "https://github.com/laravel/go/blob/0.x/resources/js/pages/Welcome.tsx"
click node_terrain "https://github.com/laravel/go/blob/0.x/resources/js/welcome/terrain.ts"
click node_shader "https://github.com/laravel/go/blob/0.x/resources/js/welcome/terrain.wgsl"

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_main,node_bootstrap,node_services,node_user toneBlue
class node_web_routes,node_api_routes,node_channel_routes,node_welcome_handler,node_inertia,node_api_response toneAmber
class node_user_model,node_migrations,node_schema,node_seeders,node_factory,node_database toneMint
class node_jobs,node_scheduler,node_commands,node_events,node_listeners toneRose
class node_assets,node_app_shell,node_welcome_page,node_terrain,node_shader toneIndigo
```

## Components

### Application boot

- [Runtime entry](https://github.com/laravel/go/blob/0.x/main.go): `main.go`
- [App configuration](https://github.com/laravel/go/blob/0.x/bootstrap/app.go): `bootstrap/app.go`
- [Service container](https://github.com/laravel/go/blob/0.x/services/services.go): `services/services.go`

### HTTP and pages

- [Web routes](https://github.com/laravel/go/blob/0.x/routes/web.go): `routes/web.go`
- [API routes](https://github.com/laravel/go/blob/0.x/routes/api.go): `routes/api.go`
- [Channel routes](https://github.com/laravel/go/blob/0.x/routes/channels.go): `routes/channels.go`
- [Welcome handler](https://github.com/laravel/go/blob/0.x/handlers/welcome/welcome.go): `handlers/welcome/welcome.go`
- [Inertia middleware](https://github.com/laravel/go/blob/0.x/bootstrap/app.go): `bootstrap/app.go`
- [Version endpoint](https://github.com/laravel/go/blob/0.x/routes/api.go): `routes/api.go`

### Persistence

- [User model](https://github.com/laravel/go/blob/0.x/models/user.go): `models/user.go`
- [Schema migrations](https://github.com/laravel/go/tree/0.x/database/migrations): `database/migrations`
- [Schema dump](https://github.com/laravel/go/blob/0.x/database/schema/schema.go): `database/schema/schema.go`
- [Database seeder](https://github.com/laravel/go/blob/0.x/database/seeders/seeders.go): `database/seeders/seeders.go`
- [User factory](https://github.com/laravel/go/blob/0.x/database/factories/user.go): `database/factories/user.go`
- **Database**

### Async facilities

- [Job processing](https://github.com/laravel/go/blob/0.x/jobs/jobs.go): `jobs/jobs.go`
- [Task schedule](https://github.com/laravel/go/blob/0.x/commands/schedule.go): `commands/schedule.go`
- [Console commands](https://github.com/laravel/go/blob/0.x/commands/inspire.go): `commands/inspire.go`
- [Event definition](https://github.com/laravel/go/blob/0.x/events/example.go): `events/example.go`
- [Event listeners](https://github.com/laravel/go/blob/0.x/listeners/example.go): `listeners/example.go`

### Frontend rendering

- [Embedded views](https://github.com/laravel/go/blob/0.x/resources/resources.go): `resources/resources.go`
- [Inertia frontend](https://github.com/laravel/go/blob/0.x/resources/js/app.tsx): `resources/js/app.tsx`
- [Welcome page](https://github.com/laravel/go/blob/0.x/resources/js/pages/Welcome.tsx): `resources/js/pages/Welcome.tsx`
- [WebGPU terrain](https://github.com/laravel/go/blob/0.x/resources/js/welcome/terrain.ts): `resources/js/welcome/terrain.ts`
- [Terrain shader](https://github.com/laravel/go/blob/0.x/resources/js/welcome/terrain.wgsl): `resources/js/welcome/terrain.wgsl`

### Other components

- **Browser user**

## Connections

- Runtime entry → App configuration: starts with (evidence: `main.go`)
- App configuration → Web routes: registers (evidence: `bootstrap/app.go`)
- App configuration → API routes: registers (evidence: `bootstrap/app.go`)
- App configuration → Channel routes: registers (evidence: `bootstrap/app.go`)
- App configuration → Inertia middleware: configures (evidence: `bootstrap/app.go`)
- App configuration → Schema migrations: registers (evidence: `bootstrap/app.go`)
- App configuration → Schema dump: registers (evidence: `bootstrap/app.go`)
- App configuration → Database seeder: registers (evidence: `bootstrap/app.go`)
- App configuration → Job processing: registers (evidence: `bootstrap/app.go`)
- App configuration → Task schedule: registers (evidence: `bootstrap/app.go`)
- App configuration → Event listeners: registers (evidence: `bootstrap/app.go`)
- App configuration → Console commands: registers (evidence: `bootstrap/app.go`)
- App configuration → Service container: builds (evidence: `bootstrap/app.go`)
- App configuration → Embedded views: sets views (evidence: `bootstrap/app.go`)
- Browser user → Web routes: requests page
- Web routes → Welcome handler: routes to
- Browser user → API routes: requests version
- API routes → Version endpoint: dispatches (evidence: `routes/api.go`)
- Database seeder → User factory: creates through (evidence: `database/seeders/seeders.go`)
- User factory → User model: builds (evidence: `database/factories/user.go`)
- Database seeder → Database: writes
- Schema migrations → Database: changes schema
- Welcome page → WebGPU terrain: loads (evidence: `resources/js/pages/Welcome.tsx`)
- WebGPU terrain → Terrain shader: uses (evidence: `resources/js/welcome/terrain.ts`)
- Inertia frontend → Welcome page: renders
- Welcome handler → Welcome page: supplies page
