Kafejo is a simple and clean backend template in Go.
I created this template to help me start new projects faster. It's a simple template with a few features that I use in most of my projects.
I had trouble finding a good architecture for my projects, so I decided to create this template to help me start new projects faster.
- JWT authentication
- OAuth2 authentication
- Bcrypt password hashing
- Argon2 password hashing
- Sessions management
- Zerolog support with zerolog
- Testing with Testify
- Mocking with Mockery
- Memory leak detection with uber-go/goleak
- Lint with golangci-lint
- Docker support
- Podman support
- Configuration with Viper
- RabbitMQ support with amqp
- Web framework with Fiber
- Prometheus
- Jaeger
- Grafana
.
├── app
│ └── http
│ ├── app.go
│ ├── controllers
│ │ ├── barista.go
│ │ └── kliento.go
│ ├── middleware.go
│ └── routes.go
├── config
│ ├── config.go
│ └── const.go
├── docs
│ ├── docs.go
│ ├── swagger.json
│ └── swagger.yaml
├── domain
│ ├── barista.go
│ ├── coffee.go
│ └── kliento.go
├── go.mod
├── go.sum
├── infrastructures
│ ├── postgresql.go
│ ├── rabbitmq.go
│ └── redis.go
├── internal
│ ├── barista
│ │ ├── barista.go
│ │ ├── pgRepository.go
│ │ └── usecase.go
│ ├── containers.go
│ ├── kliento
│ │ ├── kliento.go
│ │ ├── redisRepository.go
│ │ └── usecase.go
│ ├── wire_gen.go
│ └── wire.go
├── LICENSE
├── main.go
├── pkg
│ ├── json
│ │ ├── go-json.go
│ │ ├── json.go
│ │ └── sonic.go
│ ├── logger
│ │ └── logger.go
│ ├── utils
│ └── views
└── README.md
This project is licensed under the ISC License - see the LICENSE file for details
- Fork the repository
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
- Wait for review
- Enjoy ☕
This project should be used for educational purposes only. The author is not responsible for any damage caused by this project.
I tried to make this project as simple as possible, but it still has a lot of room for improvement. It's not perfect, but it's a good starting point, and it's a good example of how to structure your project.
If you have any questions, feel free to contact me.