springboot-init

初始化springboot企业级架构

13145424485
by 13145424485
Other · Updated: 4 months ago
0
stars
0
Forks
community
BB
Safety
medium
BBB
Quality

name: springboot-init description: Use when initializing or extending an enterprise Spring Boot monolith or modular monolith with domain-first packages, MyBatis persistence, DTO/record APIs, and scenario-driven security choices such as session, token, external IdP, or machine credentials, plus optional Redis/Kafka/Elasticsearch/OSS/LLM-RAG integration.

springboot-init

Overview

Use this skill as the entry point for reusable enterprise Spring Boot monolith and modular-monolith work. It encodes the default rules for real-world backend projects, not a CRUD scaffold or microservice playbook. Security must be chosen to fit the client type, trust boundary, and identity source rather than assumed from one preferred auth pattern.

When to Use

Technology Baseline

Architecture Rules

API Conventions

Error Handling and Security

Infrastructure Integration Rules

Actionable Workflows

Initialize an enterprise backend

  1. Confirm the domain boundaries, client types, trust boundary, identity source, and required infrastructure collaborators.
  2. Select the authentication profile that fits the scenario.
  3. Set the domain-oriented package layout and shared foundation.
  4. Apply the API, security, and error defaults before feature code.
  5. Add infrastructure only when required.

Add a new business domain

  1. Create the domain package and API contracts.
  2. Define request/response DTOs and validation.
  3. Implement service and persistence access.
  4. Add infrastructure hooks only when required.

Add an async or read-optimized flow

  1. Keep the primary store authoritative.
  2. Define the event or read-model boundary.
  3. Keep read-side collaborators isolated from write-path logic.
  4. Put flow-specific detail in the reference docs.

Integrate a platform capability

  1. Wrap the external system behind a domain-local integration service.
  2. Centralize resource naming and client configuration.
  3. Keep controllers and services free of SDK details.
  4. Route capability-specific behavior to references/infra-integration.md.

Anti-Patterns

References

🔓 Sign in to unlock more
Sign in with GitHub