Appearance
CrudCraft Documentation
CrudCraft is a code generation toolkit for Spring Boot that creates complete, production‑ready CRUD APIs from simple model classes.
By annotating your JPA entities, CrudCraft generates DTOs, repositories, services, controllers, search endpoints, and security layers --- giving you a running API in minutes.
Key Features
Automatic CRUD generation
Annotate your entities with@CrudCrafted
and CrudCraft generates request/response DTOs, repository, service, and controller stubs.Search & Filtering
Generate powerful search requests with operators (EQUALS
,IN
,CONTAINS
,GT
, etc.), including nested queries with configurable depth.Security by design
- Endpoint security: choose templates (FULL, READ_ONLY, ...) or define custom policies.\
- Row security: add per‑entity filters (e.g., tenant or ownership).\
- Field security: restrict read/write access at DTO field level.
Bulk operations
Built‑in endpoints for create/update/patch/delete multiple records in one call.Export endpoints
Stream search results to CSV, JSON, or XLSX with configurable limits.Relationship handling
Auto‑generated helpers keep bidirectional JPA relations consistent after save/delete.Validation & Documentation
Bean Validation annotations are preserved in generated DTOs, with OpenAPI schema hints for enums.Editable stubs
One‑time copied controller/service stubs for custom logic, never overwritten on rebuild.
Getting Started
- Add the CrudCraft annotation processor and starter to your project.\
- Annotate your JPA entity with
@CrudCrafted
.\ - Build your project --- DTOs, mappers, repositories, services, and controllers are generated automatically.\
- Run your Spring Boot app and enjoy a ready‑to‑use REST API.
Example
java
@CrudCrafted
@Entity
public class User {
@Id UUID id;
@Request String username;
@Dto String displayName;
@Searchable(operators = {EQUALS, CONTAINS})
String email;
}
This generates: - UserRequestDto
, UserResponseDto
, UserSimplifiedResponseDto
\
UserRepository
,UserService
,UserController
\UserSearchRequest
,UserSpecification
\- Mapper, relationship helpers, and all endpoints (CRUD + bulk + search + export).
Next Steps
- Learn more in the Concepts section (annotations, search, security).\
- Follow the Guides for setup and integration.\
- Explore the API Reference for generated classes.
CrudCraft: Rapid API development with clean, secure, and extensible code.