Hacker News new | ask | show | jobs
Show HN: BoGO – Generate Go back end services directly from SQL files (github.com)
2 points by RizkiAnurka 250 days ago
I built boGO, an open-source tool that generates a complete Go backend service directly from your SQL schema or queries.

You just write your tables or SQL definitions, run the generator, and boGO produces:

Models and repository code

API handlers and routes

A ready-to-run backend project structure

The main goal is to help developers bootstrap backend services quickly, explore Go project architecture, or prototype APIs without boilerplate.

The generated code follows clean architecture principles and is easy to extend or customize. It’s also a nice starting point for learning how SQL maps into production-grade Go code.

Repo: github.com/withbogo/bogo

There’s still a lot of potential for improvement. I’d love feedback, suggestions, or contributions. Check it out and let me know what you think!

1 comments

Very cool, reminds me of both [sqlc](https://sqlc.dev) and [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen)

I'm not a fan of the enterprisey hexagonal-style code this generates, but I can understand where this might be useful for someone who does follow that.

A question regarding evolution: it's rare that schemas stay constant. I'm not sure if this tool will lend itself well when the time comes to, say, add another table, though I might be misunderstanding here.

Thanks! I actually built this more as a migration tool for teams moving from other languages to Go. From experience, dealing with tech debt and scalability limits in older stacks can be painful. The plan is to extend it into an all-in-one solution that also handles schema evolution and regeneration smoothly.