Bookstore REST API
A REST API for managing a bookstore's catalog and orders, built with the Gin framework and backed by PostgreSQL. Learners practice REST route design, request validation, database access with a SQL driver, and structured error responses.
- Estimate
- ~11h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
Gin · PostgreSQL · sqlx
Project roadmap
- 01
Set up Gin and the database
~1.5hInitialize a Gin router and connect to PostgreSQL using sqlx.
- 02
Design the schema
~1.5hCreate and migrate the books and orders tables with appropriate relationships.
- 03
Build book endpoints
~2.5hImplement CRUD endpoints for books with request validation and structured JSON responses.
- 04
Build order endpoints
~2.5hImplement order creation that decrements stock inside a database transaction.
- 05
Add pagination and filtering
~1.5hSupport page, limit, and filter query parameters on the book listing endpoint.
- 06
Add middleware
~1.5hAdd request logging middleware and a centralized error-handling middleware.
Resources
- DocsGo Documentation
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack