go-blog-backend
go-blog-backend
is a blog API written in Go.
This repo is intended to be a learning project. My blog runs on MDX files, so I don't need a backend.
Here's what I've done to the project so far:
- I designed my API with OpenAPI.
- I use PlanetScale as the MySQL Database as a Service.
- I use no framework, no ORM.
- I use Auth0 to authorize the API's users:
- I utilize Auth0's Actions to customize the Access Token: In the Login flow, I added the email and name fields to register the user as an author of the API.
- There are 2 roles:
author
andadmin
.author
can only edit their posts.admin
can edit all things.
- I use Zap as the structured logger.
- I use chi as the router.
- I implemented a rate-limiting system with Redis, introduced by this blog post.
- I use Heroku to deploy, with Heroku Redis.