CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Bella OpenAPI is a multi-module Maven project that provides an OpenAPI gateway for AI services. It acts as a unified interface supporting multiple AI providers (OpenAI, AWS Bedrock, Alibaba Cloud, Huoshan, etc.) through a pluggable adapter pattern.
Module Architecture
- sdk/: Core SDK with protocol definitions, DTOs, and client interfaces
- spi/: Service Provider Interface module with authentication and session management (CAS/OAuth)
- server/: Main Spring Boot application with REST endpoints and business logic
Build & Development Commands
Basic Maven Commands
# Build all modules
mvn clean compile
# Run tests
mvn test
# Package without tests
mvn package -DskipTests
# Install to local repository
mvn install -DskipTests
Development Scripts
# Build the application
./build.sh
# Run the application (with optimized JVM settings)
./run.sh
# Generate jOOQ code from database schema
mvn jooq:generate -pl server
Key Architecture Patterns
Protocol Adapter Pattern
The core architecture uses the AdaptorManager pattern to route requests to different AI providers:
AdaptorManager
manages protocol adapters for each endpointIProtocolAdaptor
interface defines how to communicate with each provider- Adapters are organized by endpoint type (completion, embedding, tts, asr, etc.)