Les Gophers Volants
Discover Goravel
Server-side Go, the Laravel way: routes, controllers, views, validation, middleware and a database, by writing the API of a bike courier cooperative. Free, in the browser, nothing to install.
13 exercises 4 chapters 1,300 XP About 4 h 30 min of practice
Free
01
First pedal strokes
Free
Goravel's routes, JSON responses, a URL parameter, a controller and a view, with just enough Go.
- Exercise 1: In the saddle! Topics covered RouteJSON response
- Exercise 2: Courier of the day Topics covered Route parameterVariableString
- Exercise 3: A controller for the couriers Topics covered ControllerStructMethodSlice
- Exercise 4: The depot board Topics covered ViewTemplaterange
-
Chapter course notes
02
The round
🔒 Full track
Structs and slices for the deliveries, the query string, HTTP status codes, the request body and validation.
- Exercise 1: Today's round Topics covered StructJSON tagQuery stringfor rangeappend
- Exercise 2: One delivery at a time Topics covered Route parameterHTTP status code404
- Exercise 3: A new order Topics covered Request bodyPOST201
- Exercise 4: No orders for the Moon Topics covered Validation422Error handling
-
Chapter course notes
03
Locking up the depot
🔒 Full track
Group an API's routes under a prefix, then protect it with a middleware.
04
The logbook
🔒 Full track
Read, write and update a SQLite table with Goravel's query builder: facades.DB().
Discover Goravel by coding
Goravel is a web framework in Go that borrows Laravel's structure: routes, controllers, middleware, views, validation, facades. This free course lets you discover it by writing code, in the browser: Goravel really runs there, compiled to WebAssembly, and Go tests tell you whether each objective is met.
The story: the Flying Gophers, a bike courier cooperative in Lyon, France, need an API for their deliveries and a board to put up at the depot.
What you will learn
- routes and JSON responses, URL parameters and the query string;
- controllers, and a view with Go's templates;
- enough Go to find your way:
:=, structs and their JSON tags, slices,for … range,if err != nil; - HTTP status codes, the request body and validation;
- route groups and a middleware;
- Goravel's query builder on a SQLite database: read, write, update.
Who it is for
For developers who know a web framework, Laravel above all, and want to see what server-side Go looks like
without installing anything. No knowledge of Go is required: each exercise brings the small part of the language
it needs. The code keeps the French names of the original course (livraison for delivery, quartier for
neighborhood, coursier for courier), and every exercise explains the ones it introduces.