Kafejo coffee shop template
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.
Features
Database
- PostgreSQL support with GORM
- MongoDB support
- Cassandra support with gocql
- BBolt support with bbolt
Authentication
- JWT authentication
- OAuth2 authentication
- Bcrypt password hashing
- Argon2 password hashing
- Sessions management
Caching
Logging
Testing
Documentation
Deployment
- Docker support
- Podman support
Other
- Configuration with Viper
- RabbitMQ support with amqp
- Web framework with Fiber
- Prometheus
- Jaeger
- Grafana
Directory structure
.
├── 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
License
This project is licensed under the ISC License - see the LICENSE file for details
Acknowledgments
Contributing
- 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 ☕
Disclaimer
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.