from Hacker News

Show HN: GoCRUD – Automatic CRUD API Generator for Go Built on Huma

by h8hawk on 4/23/25, 2:09 PM with 0 comments

Hi HN!

I'm excited to share GoCRUD, an open source Go module that extends the Huma framework to automatically generate CRUD APIs. It helps developers quickly build maintainable REST APIs while focusing on business logic rather than boilerplate.

Key features:

- Automatic CRUD endpoint generation

- Built-in input validation

- Customizable hooks for business logic

- Relationship filtering

- Database agnostic (PostgreSQL, MySQL, SQLite, MSSQL support)

- Type-safe queries

- Custom field operations

Example usage:

1. Define your model with struct tags

2. Initialize database connection

3. Register with GoCRUD

4. Get a full REST API with validation, filtering, and pagination

The documentation and examples are available at: https://ckoliber.dev/gocrud

I'd love to hear your feedback and suggestions!