Skip to main content
Stable v2.0.3

Coco Framework

Server infrastructure for Spring Boot

One Starter connects responses, exception handling and TraceId. Choose data, reliability and platform features as needed. Your business code stays ordinary Java and Spring.

<dependency>
<groupId>io.github.patton174</groupId>
<artifactId>coco-spring-boot-starter</artifactId>
</dependency>
# features are opt-in
coco:
idempotency:
enabled: true
@CocoIdempotent(namespace = "orders")
OrderResponse create(@RequestBody CreateOrder cmd) {
return orders.create(cmd);
}

Add the Starter

  • 17Feature identifiers on main
  • 1Starter dependency
  • Java 17+Application compile target
  • Apache-2.0Open-source license

Feature guide

Explicit defaults, documented boundaries and clear replacement points.

Feature switches and configuration
  1. Web requests

    Consistent behavior on every endpoint

    • Responses and errors
    • TraceId logs
    • Signing and replay guard
  2. Data and permissions

    Isolation lives in the query path

    • MyBatis-Plus paging
    • Tenant SQL isolation
    • Data permissions
  3. Traffic and reliability

    Limits for hot and repeated requests

    • Rate limit and idempotency
    • Locks and scheduling
    • Swappable stores
  4. Files and platform

    Shared services that grow with you

    • File storage
    • Two-level cache, messaging
    • Notifications, captcha
  5. Audit and visibility

    Key actions leave a trail

    • Audit events
    • Log context
    • OpenAPI
  6. Features and extensions

    Ship only what you need

    • Feature switches
    • Build-time pruning
    • Bean and SPI overrides

Clear layers. Room for your domain.

Controllers stay ordinary Spring code. You own users, organizations, authentication providers and transactions.

Response wrapping, exception handling and TraceId work by default. Databases, Redis, authentication, tenants and other external services still need explicit configuration.

Architecture and boundaries
  1. Business application

    Domain · Controllers · Transactions

  2. Starter

    One entry point · Auto-configuration

  3. Features

    Infrastructure selected for your application

  4. Foundation

    Contracts · Context · Logging

Start with one endpoint.

Open the quick-start guide
  1. Add dependencies

    Use coco-parent and add the starter. Choose a version from the release history.

  2. Select features

    Adjust feature switches in YAML and configure the database or services you need.

  3. Run the application

    Write an ordinary Spring controller and start your Spring Boot application.

  4. Check the response

    Call the endpoint and inspect the response envelope, errors and TraceId.

One ecosystem. Three clear responsibilities.

Admin → Framework at runtime; Generate → business source at development time.

Framework

Server infrastructure. Independent of Admin and Generate.

coco-framework

Admin

An ERP product on Framework, owning users, organizations and business workflows.

coco-admin

Generate

Generates ordinary source at development time. Your business repository owns the output.

coco-generate

Community and contributions

Need help integrating, have a feature in mind, or found a confusing page? Help us make Coco better.

If Coco helps your work, consider starring the project on GitHub.