go-web-frameworks
Example web application projects with top popular and recently active Go lang web frameworks and toolkits.
I am implementing the same features in all frameworks and compare them occasionally.
Currently checking:
Table of Contents
Project Structure
This repository is a monorepo, which means it contains all the packages in the same repository.
In the root directory, there is a folder for each web framework. These folders contain the most recent state of the demo project for a given framework. For example, directory fiber is the current final state of the project for the Fiber web framework.
Additionally, in _step_by_step and _steps_by_topics directories, you can final tutorial steps grouped by framework and topics accordingly.
Additionally,
- api directory contains API specifications as a README file.
- pkg directory contains a separate Go package used as a shared code for errors, models, and storage layer.
Go Project Layout
Check [STRUCTURE.md][] for information about the Go project layout for each demo app.
Features
List of checked features:
- "Hello, World!" and simple JSON response;
- CRUD JSON API for the example entity;
- Paging and error handling;
- Parsing query params;
- Accepting and parsing form data;
- Exposing static assets via an endpoint;
- Building website pages with templates;
- MVC Pattern (model, view, controller);
- Authentication and Authorization;
- Documentation and Swagger;
- Framework specific testing (if there is anything);
- Optimization (e.g. compression with GZIP);
- Security (CORS for example);
Additionaly, some examples with:
- CI/CD using GitHub Actions;
- Logging, tracing, and metrics;
- Docker and Docker Compos;
- Database and ORM;
- Work with MySQL;
- Work with PostgreSQL;
- Work with MongoDB;
- Work with Redis;
- Work with Kafka;
Current Progress
Final Project Structure | β³ | π·πΌββοΈ | β³ | π·πΌββοΈ | β³ | β³ | β³ |
"Hello, World!" and simple JSON response | β³ | β
| β
| β
| β³ | β³ | β³ |
CRUD JSON API for the example entity | β³ | β
| β
| β
| β³ | β³ | β³ |
Paging and error handling | β³ | β
| β
| β
| β³ | β³ | β³ |
Parsing query params | β³ | β
| β
| β
| β³ | β³ | β³ |
Accepting and parsing form data | β³ | π·πΌββοΈ | π·πΌββοΈ | β³ | β³ | β³ | β³ |
Exposing static assets via an endpoint | β³ | β
| π·πΌββοΈ | β³ | β³ | β³ | β³ |
Building website pages with templates | β³ | β³ | π·πΌββοΈ | β³ | β³ | β³ | β³ |
MVC Pattern (model, view, controller) | β³ | β³ | β³ | β³ | β³ | β³ | β³ |
Authentication and Authorization | β³ | β³ | β³ | β³ | β³ | β³ | β³ |
Related Resources
Live Streams
I host live streams on YouTube, Twitch, and Facebook Watch about building this project. Follow me on Twitter for announcements.
Accompanied Blog Post
Three is also a dedicated blog post where I gather all related tutorials and learning materials in one place. Learn more: Go Web Frameworks and Toolkits
YouTube Playlists
Full Tutorials
Video Tutorials & Short Clips
Live Stream Playlists