This application provides a starting point for comprehensive golang backend. The app is written in Go and utilizes PostgreSQL for the database and Redis for caching.
- Caching ✅
- authentication ✅
- Async Task ✅
- Emailing ✅
- Database Migration ✅
- Containerization ✅
- Rate Limiting ✅
- Go 1.22: Backend logic and API
- PostgreSQL 16: Relational Database Management
- Redis 7: In-memory data structure store for caching
- hibbiken/asynq
- Go_redis/cache
- go-redis/redis_rate ->Leaky-bucket rate-limiting with Redis
- pgx driver
Ensure you have the following installed on your local machine:
The follwing startup procedure assumed that you use linux environment and you have Make command installed alredy. For windows users you may use WSM to archieve the same. Here is the video tutorial on how to set it up.
git clone https://github.com/bstevary/go_backend_templete.git
cd go_backend_templete
If you have the docker compose you need to run the follwing command and backend will be booted and ready to consume trafic on port 8080
docker compose up
alternatively you can consume make command to boot up the app. You must have Docker install
for first time set-up. this will install required services
make init
To start after device boot-up
make start
To resume after os command such close (ctl + c)
make run
You can find Postman Collection here