Fiber Recipes Cookbook: Go Fiber examples
Fiber Recipes Cookbook is a collection of runnable example applications built with the Go Fiber web framework, covering everything from a plain Hello World to authentication, database, and deployment setups. It's a reference to copy from, not a library to install. Reach for it when you're wiring up a specific Fiber feature and want working code instead of documentation; skip it if you're not already building with Fiber.
What is the Fiber Recipes Cookbook?
Fiber Recipes Cookbook is the official companion repository for the Go Fiber web framework, maintained under the gofiber GitHub organization. It holds dozens of small, focused Go projects, each wired to one feature, database, or deployment target, meant to be read and copied rather than run as a single app. The README calls it the official Fiber cookbook and links each entry to its own folder.
Why Developers Need Practical Go Fiber Examples
Fiber's own documentation explains the framework's API, but it doesn't show how to wire JWT auth through Docker and Postgres, or how to run Fiber behind Nginx with load balancing, or how to choose between deploying to Cloud Run and Elastic Beanstalk. Fiber Recipes Cookbook exists specifically to close that gap. Each recipe pairs Fiber with one concrete piece of infrastructure or a specific pattern, so you don't have to piece together how GORM, JWT, and Docker fit together from three separate sets of docs.
What the Fiber Recipes Collection Covers
- ✓Deployment recipes for AWS Elastic Beanstalk, AWS SAM Container, Google Cloud Run, Heroku, Kubernetes, Vercel, Seenode, and a Fiber v3 app running inside Cloudflare Container Workers.
- ✓Database integrations for PostgreSQL, MySQL, MongoDB, Neo4j, and Memgraph, plus ORM and query-builder recipes built on GORM, Entgo, Sqlboiler, and Sqlc.
- ✓Authentication and authorization recipes: JWT, GitHub OAuth2, Google OAuth2, Firebase Authentication, and CSRF protection with and without session support.
- ✓Real-time and messaging patterns, including WebSocket chat, a Socket.IO chatroom, Server-Sent Events, RabbitMQ publishing, and background jobs processed with Asynq.
- ✓Architecture recipes covering Clean Architecture, Hexagonal Architecture, Clean Code conventions, and dependency injection with Parsley.
- ✓Frontend pairings with React, Svelte (both a Netlify deploy and a Sveltekit-embedded build), and Bootstrap, plus a full single-page app combining React with a Go backend.
- ✓API tooling recipes for OpenAPI 3 documentation, Swagger docs, input validation with go-playground/validator, and both GraphQL and gRPC servers.
- ✓Operational recipes for graceful shutdown, prefork mode, TLS via autocert or PKCS12, server timing headers, and unit testing a Fiber application.
Common Application Patterns and Integrations
- •Standing up JWT or OAuth2 authentication, GitHub or Google, without reading through Fiber's middleware documentation from scratch.
- •Connecting Fiber to a specific database, whether that's PostgreSQL, MySQL, MongoDB, or a graph database like Neo4j or Memgraph, using a working GORM, Entgo, Sqlboiler, or Sqlc example.
- •Deploying a Fiber app to a specific target such as Vercel, Heroku, Kubernetes, AWS, Google Cloud Run, or Cloudflare Container Workers.
- •Building a real-time feature like WebSocket chat, Socket.IO, or Server-Sent Events, where a working example gets you started faster than the protocol docs alone.
- •Adopting an architecture style, such as Clean Architecture or Hexagonal Architecture, in a new Go service before the codebase grows unwieldy.
Strengths
- ✓Breadth: the table of contents lists dozens of separate recipes spanning databases, auth, deployment, and real-time features, more categories than a single getting-started guide would cover.
- ✓Each recipe lives in its own folder with its own README, so you can pull just the file tree you need instead of untangling it from one large demo app.
- ✓Maintained under the official gofiber GitHub organization rather than a third-party fork, and released under the permissive MIT license.
- ✓Infrastructure-specific pairings, like Docker with Postgres and JWT, or Docker with MariaDB and Clean Architecture, that show a full stack instead of a Fiber snippet in isolation.
- ✓Tagged with the hacktoberfest topic on GitHub, which suggests the project accepts community-contributed recipes.
Considerations for Using These Recipes
- △Each recipe is a self-contained example, not a maintained library; the README doesn't state a testing or CI policy for keeping every recipe working against the newest Fiber release.
- △The top-level README has no version number, last-updated date, or changelog, so there's no documented way to tell how current any individual recipe is.
- △It's organized as a flat table of contents with one-line descriptions, not a guided course. There's no documented learning path from Hello World to a production deployment.
- △This is a companion repository. It assumes you already have Go and the Fiber framework installed, and it won't teach you Fiber's core API, only how to combine it with something else.
- △No search or filtering is documented beyond scanning the README's table of contents by hand.
Other Go Web Framework Example Resources
Frequently Asked Questions
GitHub lists the gofiber/recipes repository under the MIT license, which covers the example code in Fiber Recipes Cookbook.
Fiber Recipes Cookbook covers databases (PostgreSQL, MySQL, MongoDB, Neo4j, Memgraph), authentication (JWT, OAuth2, Firebase), deployment targets (AWS, Google Cloud, Kubernetes, Vercel), and real-time features like WebSockets and Server-Sent Events.
Deployment is covered directly: the table of contents lists recipes for AWS Elastic Beanstalk, AWS SAM Container, Google Cloud Run, Heroku, Kubernetes, and Vercel.
The README says new recipes are welcome as a pull request to gofiber/recipes, and accepted recipes get added to both the repository and the docs.gofiber.io website.
Fiber Recipes Cookbook includes dedicated recipes for JWT auth, GitHub OAuth2, Google OAuth2, Firebase Authentication, and CSRF protection with and without sessions.
Database recipes cover PostgreSQL, MySQL, MongoDB, Neo4j, and Memgraph, plus ORM-specific examples built on GORM, Entgo, Sqlboiler, and Sqlc.
Who should try it — and who should skip
Try Fiber Recipes Cookbook if you're already building with Go Fiber and want a working starting point for one specific integration, whether that's JWT auth, a particular database, or a deployment target, instead of writing that wiring from scratch. Skip it if you haven't chosen Fiber yet, since every recipe assumes the framework as a given rather than making a case for it. Skip it too if you want one tutorial that walks start to finish; this is a table of independent recipes, not a course.
Related repositories
Still deciding about recipes?
One click hands the question to an AI along with this page — see what it says about recipes.
