Skip to main content
Latest stable v2.0.3
COCO / FRAMEWORK

Coco Framework

Less infrastructure. More product.

Responses, errors, tracing and permissions should not be rebuilt for every project. Coco handles the common setup so you can focus on your product.

● ● ●pom.xmlJAVA / MAVEN
One starter. Your own business code.
<dependency>
<groupId>io.github.patton174</groupId>
<artifactId>coco-spring-boot-starter</artifactId>
</dependency>
Requires coco-parent or the Coco BOM. Full setup
GET /hello200 OK

Responses · Exceptions · TraceId

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

This page covers 17 feature identifiers on main, including the Codegen compatibility feature. Version 2.0.3 is available; see the docs for module switches and configuration.

01 / WHY COCO

You have done this work before.

Every product is different. Much of the setup is not.

Copying the same setup again?

Response wrapping, exception handling and TraceId integration come together, reducing code you maintain across projects.

Configuration getting tangled?

Choose features in YAML or annotations. Build-time pruning and runtime activation follow the same feature plan.

Moving beyond one instance?

Rate limiting, idempotency and locks expose replaceable stores. Explicitly choose Redis or another implementation for your deployment.

A framework dictating your domain?

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

02 / CAPABILITIES

Common capabilities, connected.

Explicit defaults, documented boundaries and clear replacement points.

Web requests

Give every endpoint consistent behavior.

  • Responses and exceptions
  • TraceId and access logs
  • Signatures, encryption and replay protection

Data and permissions

Integrate isolation into the query path.

  • MyBatis-Plus and pagination
  • Tenant SQL isolation
  • Data-permission conditions

Traffic and reliability

Put boundaries around repeated and frequent requests.

  • Rate limiting and idempotency
  • Locks and scheduling
  • Replaceable stores

Files and platform

Let shared services grow with the application.

  • File storage interfaces
  • Two-level cache and messaging
  • Notifications and captcha

Audit and visibility

Leave useful evidence of important actions.

  • Structured audit events
  • Logs and context propagation
  • OpenAPI metadata

Features and extensions

Ship the capabilities your application needs.

  • Declarative feature selection
  • Build-time pruning
  • Bean and SPI overrides
03 / LESS ASSEMBLY

Less assembly to maintain. More features to ship.

Manual assembly

Illustrative responsibilities: each project maintains these integration points.

@Configuration
class WebInfrastructure {
// ResponseBodyAdvice
// RestControllerAdvice
// TraceId filter
// Access-log filter
// Context propagation
}

With Coco

Use coco-parent for version management, then add the starter. Business code stays ordinary Spring.

<dependency>
<groupId>io.github.patton174</groupId>
<artifactId>coco-spring-boot-starter</artifactId>
</dependency>

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

04 / ARCHITECTURE

Clear layers. Room for your domain.

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

Explore the design
  1. 01
    Business application

    Domain · Controllers · Transactions

  2. 02
    Spring Boot Starter

    One entry point · Auto-configuration

  3. 03
    Features

    Infrastructure selected for your application

  4. 04
    Foundation

    Contracts · Context · Logging

05 / ECOSYSTEM

One ecosystem. Three clear responsibilities.

COCO / 01

Framework

Server infrastructure. Independent of Admin and Generate.

COCO / 02

Admin

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

COCO / 03

Generate

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

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

06 / GET STARTED

Start with one endpoint.

  1. 01

    Add dependencies

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

  2. 02

    Select features

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

  3. 03

    Run the application

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

  4. 04

    Check the response

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

Follow the getting-started guide
BUILT IN THE OPEN

Leave the repetition to the framework. Bring your experience.

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.