-
Notifications
You must be signed in to change notification settings - Fork 0
CLAUDE
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the GitHub Wiki for lgzarturo/springboot-course — a Spring Boot + Kotlin course teaching REST API development with Hexagonal Architecture, DDD, and TDD. The wiki contains course documentation in Spanish.
| File | Content |
|---|---|
Home.md |
Course overview and objectives |
1.-Arquitectura-Recomendada.md |
Hexagonal Architecture + Screaming Architecture patterns |
2.-Guía-de-desarrollo.md |
Dev setup, naming conventions, feature development flow |
3.-Roadmap-del-curso.md |
12-week curriculum outline |
5.-Seguridad,-flujo-y-convenciones.md |
Security (JWT), Git flow, migrations |
7.-Testing-y-calidad.md |
Testing pyramid and commands |
8.-Lista-de-ejercicios-propuestos.md |
Proposed exercises |
9.-Gamificando-la-plataforma.md |
Gamification with Pokémon API integration |
Calendario-de-trabajo-para-milestones.md |
Release calendar |
_Sidebar.md |
Wiki navigation |
_Footer.md |
Wiki footer |
./gradlew bootRun # Run the application
./gradlew test # Run all tests
./gradlew test --tests "PingServiceTest" # Run a single test classDev endpoints: /swagger-ui.html, /api-docs, /h2-console (H2, dev only).
The course uses MVC organized by features (Screaming Architecture). Each feature is self-contained under features/. The project started with Hexagonal Architecture and was migrated — the full reasoning is in docs/architecture/mvc-migration-plan.md in the main repo.
com.lgzarturo.springbootcourse/
config/ # global Spring config (CORS, OpenAPI)
common/ # cross-cutting: exception/, pagination/, constants/, extensions/
features/
hotels/
HotelController.kt # @RestController
HotelService.kt # @Service — business logic
HotelRepository.kt # @Repository — Spring Data JPA
HotelEntity.kt # @Entity JPA
Hotel.kt # pure domain model (no Spring deps)
dto/
HotelResponse.kt # includes companion object fromDomain()
CreateHotelRequest.kt
users/
ping/
rooms/
sentry/
Key rules:
-
Max 2 nesting levels within a feature:
hotels/dto/is the limit. - No port interfaces — the service IS the interface, the repository IS the interface.
-
No separate mapper classes — use
companion object fromDomain()in the response DTO. -
No per-feature config classes — use
@Service,@Repository,@Componentdirectly. - YAGNI: don't create feature stubs; create when actually needed.
- Classes follow the pattern:
PingController,PingService,PingResponse— noPingUseCaseorPingMapper - Mapping lives in a
companion object fromDomain()inside the response DTO, not in a separate mapper class - Constructor injection only (no field injection)
- Kotlin idioms:
data classfor DTOs and domain models,valovervar, null-safety, extension functions - Database migrations with Flyway:
V001__init.sql,V002__add_user_table.sql - Security roles:
TRAINER(guest),GYM_LEADER(staff),PROFESOR_OAK(admin)
- Branches:
feature/,fix/,chore/ - Commits follow Conventional Commits (optional but recommended)
- Content is primarily in Spanish
- Unit tests: domain services instantiated directly (no Spring context)
-
Integration tests: controllers via MockMvc with
@WithMockUserfor security - Pattern: Given-When-Then
- Tech stack: JUnit 5, MockK, Spring Boot Test
- Domain test coverage targets business rules, not annotations
© 2025 Spring Boot Course - API REST real
Desarrollado por lgzarturo
Licencia Creative Commons Attribution 4.0 International (CC BY 4.0) | Términos de Uso | Política de Privacidad
Recursos adicionales:
¿Tienes sugerencias o quieres reportar un error?
- Inicio
- Calendario de liberaciones
- Arquitectura
- Guía de Desarrollo
- Roadmap del Curso
- Testing y Calidad
- Seguridad y Flujo
- Gamificación
- Usa TDD para asegurar calidad.
- Mantén las capas desacopladas.
- Documenta tus APIs con Swagger.
- Aplica seguridad con JWT y roles.