1
0
Fork
You've already forked fiber-micro
0
Go Fiber Microservice with hexagonal architecture, security, OpenApi, tracing, etc
  • Go 94.3%
  • Makefile 5.5%
  • Dockerfile 0.2%
Find a file
2026年06月26日 13:53:23 -03:00
adapter whisql 2026年06月26日 13:53:23 -03:00
application whisql and upgrades 2026年06月14日 13:50:14 -03:00
cmd whisql and upgrades 2026年06月14日 13:50:14 -03:00
docs fix swagger 2026年06月15日 19:32:22 -03:00
internal whisql and upgrades 2026年06月14日 13:50:14 -03:00
migrations nilo.Option update 2025年08月16日 16:23:54 -03:00
pagination whisql and upgrades 2026年06月14日 13:50:14 -03:00
tests whisql and upgrades 2026年06月14日 13:50:14 -03:00
.gitignore handlers and testing 2025年08月12日 23:42:46 -03:00
Dockerfile db migrations 2025年08月09日 23:14:43 -03:00
go.mod whisql 2026年06月26日 13:53:23 -03:00
go.sum whisql 2026年06月26日 13:53:23 -03:00
LICENSE whisql and upgrades 2026年06月14日 13:50:14 -03:00
Makefile fix swagger 2026年06月15日 19:32:22 -03:00
README.md whisql and upgrades 2026年06月14日 13:50:14 -03:00

fiber-micro

Microservice API applying clean architecture, security, OpenApi, tracing, etc

Dependencies

Golang, Docker, Make, Swag tool

Features

  • Architecture
    • Clean architecture (adapters and ports)
    • Custom Messages and Errors
    • Pagination and Ordering
    • DB Migrator (scripts)
  • Go 1.26
  • Libraries
    • Web: Fiber V3
    • WhiSQL: Database SQL adapter
    • Security: JWT
    • Validations: Go Playground Validator
    • Unit Test: Testify
    • DB: Postgres
    • Tracing: Opentelemetry
    • Test: Testcontainers
    • OpenAPI: Fiber Swagger
    • Environment: Godot
  • Distributed tracing
    • OpenTelemetry and Jaeger
  • Swagger
    • Swaggo & Fiber Swagger V3
    • Auditory
  • Database
    • Postgres
    • Testcontainers

Files

Enviroment variables

# SQL
DATABASE_URL=postgres://admin:admin@localhost:5432/db_users
SHOW_SQL_INFO=false
# Jaeger tracing endpoint
TRACING_HOST=localhost:4318
# Swagger
SWAGGER_ENABLED=true
# Security JWT
SECURITY_ENABLED=true
JWT_DURATION=300
JWT_SECRET_KEY=UUID
JWT_ISSUER=https://acme.com
JWT_AUDIENCE=https://acme.com

Usage

  • Executing make help all the available commands will be listed.
  • Also the standard Go commands could be used, like go run main.go
  • To use this archetype with a different name, execute this command to replace the names:
find . -type f -exec sed -i 's/go-microservice/your-project-name/g' {} +

Services

  • Create users POST: /users
  • Get users GET: /users
  • Login POST: /users/login