spring-boot-architecture
Structure Spring Boot 3+ projects with feature packaging and clean layering. Use when structuring Spring Boot 3 projects, defining layers, or applying architecture patterns.
- 0
- Installs
- —
- Rating
- —
- Success rate
- 3
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 dda7917718c8f10c… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Spring Boot Architecture Standards
Priority: P0 (CRITICAL)
Organize by Feature
- Package by Feature: Prefer
com.app.feature(e.g.,user,order) over technical layers (controllers) for scalability. - Dependency Rule: Outer layers (Web) depend on Inner (Service). Inner layers MUST NOT depend on Outer.
- DTO Pattern: ALWAYS use DTOs for API inputs/outputs. NEVER return
@Entitydirectly. - Java Records: Use
recordfor DTOs to ensure immutability (Java 17+).
See implementation examples for Java Record DTOs, controller patterns, and global exception handling.
Define Layer Responsibilities
- Controller (Web): Handle HTTP, Validation (
@Valid), DTO mapping. Delegate logic to Service. - Service (Business): Transaction boundaries, orchestration. Returns Domain/DTOs.
- Repository (Data): Database interactions only. Returns Entities/Projections.
Design API Layer
- Global Error Handling: Use
@RestControllerAdvicewithProblemDetails(RFC 7807). - Validation: Use Jakarta Bean Validation (
@NotNull,@Size) on DTOs. - Response: Use
ResponseEntityfor explicit status orResponseStatusException.
Verification Checklist (Mandatory)
- No Entities in API: all API responses using DTOs/Records instead of JPA Entities?
- Validation:
@Validand Jakarta Bean Validation constraints present on all input DTOs? - Layer coupling: Services depend on Controllers? (Prohibited)
- Transactionality: business transactions correctly bounded with
@Transactionalin Service layer? - Error Details:
ProblemDetailsused for consistent error responses?
Anti-Patterns
- No Fat Controllers: Move business logic to Services.
- No Leaking Entities: Use DTOs instead of JPA Entities in APIs.
- No Circular Dependencies: Use Events or refactor to decouple services.
- No God Classes: Split large services into single-responsibility components.
References
Files
3- SKILL.md
04d62dc0ec2.5 KB - evals/evals.json
9eb7d6d6132.3 KB - references/implementation.md
95859be1c61.9 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from HoangNguyen0403/agent-skills-standard8
Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.
Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their spec
Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.
Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.
Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.
Write correct coroutine scopes, lifecycle collection, and dispatcher injection in Android production code. Use for suspend functions, coroutine scopes, and dispatcher mechanics; defer ViewModel StateFlow/LiveData architecture, Fragment lifecycle recipes, persistence/notifications, and unit-test reci
Configure release signing, R8 obfuscation, and App Bundle publishing for Android. Use when setting up signing configs, enabling minification, adding ProGuard keep rules, or preparing for Play Store submission.
Enforce Material Design 3 theming and design token usage in Jetpack Compose. Use when implementing M3 components, color schemes, typography, or design tokens.
Related backend skillsscan passed
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes. Use when building or reviewing Node.js, Express, or Next.js API routes and their data access.
Report browser/API/CLI/job/worker/webhook bugs. (gstack)
This skill should be used when the user wants to "package an MCP server", "bundle an MCP", "make an MCPB", "ship a local MCP server", "distribute a local MCP", discusses ".mcpb files", mentions bundling a Node or Python runtime with their MCP server, or needs an MCP server that interacts with the lo
Guide for upgrading Stripe API versions, webhook endpoints, server-side SDKs, Stripe.js, and mobile SDKs
PostHog integration for server-side Node.js applications using posthog-node
Mount tRPC as a Fastify plugin with fastifyTRPCPlugin from @trpc/server/adapters/fastify. Configure prefix, trpcOptions (router, createContext, onError). Enable WebSocket subscriptions with useWSS and @fastify/websocket. Set routerOptions.maxParamLength for batch requests. Requires Fastify v5+. Fast