HACKER Q&A
📣 alexejb

Good Ressources on API Architecture?


Backend rookie here!

I'm playing around with the coding of a small API for simple CMS needs which will be eventually the backend of my personal website. It has the standard stuff like logins, jwt authentication and there will be some minor data uploading stuff in its future iterations. It's written in Go and I use Mongo as my database. Now I am asking myself whether there are some architectural approaches or patterns out there for building maintanable and also scalable backends with logical and secure APIs? Any good hints where to start or some good examples?

Thanks in advance!



👤 dygd
Check out the OpenAPI spec https://jsonapi.org/format/. One advantage is that you can use the spec to generate both client and server-side code, see https://deliveroo.engineering/2022/06/27/openapi-design-firs... for example. If you're looking for inspiration, there's a ton of OpenAPI links at https://apirank.dev/

👤 willmeyers
Geewax's API Design Patterns (https://www.manning.com/books/api-design-patterns) is a solid resource especially if you plan on using Go. It's based of Google's own API design principles: https://google.aip.dev