What problem does it solve?
Create consistent, secure, and testable REST JSON endpoints for AFAL Rails applications so teams avoid ad-hoc API implementations, mismatched serializers, and brittle pagination/filtering logic.
Core Features & Use Cases
- Blueprinter serialization configured with composable views for list and full responses and association handling.
- Pagy pagination integrated into controllers with a standardized pagination_meta shape.
- Ransack filtering and sorting with required ransackable whitelists on models to prevent unsafe queries.
- Controller patterns & error handling including a Api::V1::BaseController with authorization hooks (Pundit), API error concern, and plain JSON response shapes.
- Minitest integration tests and fixtures for integration-level verification of auth, pagination, filtering, and error responses.
- Use Case: Implement Api::V1::Projects endpoints that return paginated, filterable JSON lists and detailed show responses serialized by ProjectBlueprint.
Quick Start
Generate an Api::V1 resource controller that uses Blueprinter for serialization, Pagy for pagination, Ransack for filtering, Pundit for authorization, and include Minitest integration tests.