Skip to content

SamuelMarks/cdd-ctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cdd-ctl

CI License Test Coverage Doc Coverage

Central daemon manager, API Gateway, and SDK management backend for the cdd-* toolchain.

cdd-ctl serves as the robust Rust backend orchestrating the multi-language JSON-RPC ecosystem. It features an integrated daemon-manager to supervise child processes, coupled with a comprehensive OpenAPI-driven web backend for managing Projects (Organizations), SDKs (Repositories), and Releases with Role-Based Access Control (RBAC).

Features

  • Daemon Manager: Built-in supervisor managing the lifecycle, standard-streams (logging), and auto-restart backoff of up to 13 distinct cdd-* JSON-RPC language servers.
  • REST API Gateway: High-performance RESTful API built on actix-web.
  • Database & ORM: Fully implemented PostgreSQL data models for Organizations, Repositories, and Releases using diesel.
  • GitHub Integrations: Integrated GitHub OAuth, webhooks, and automated secrets management (via Libsodium-sealed Action Secrets).
  • Authentication & Security: Secure JWT-based Bearer auth, featuring an OAuth2 password grant flow with Argon2 password hashing.
  • Role-Based Access Control (RBAC): Organization ownership models, ensuring secure management of underlying SDKs and sync processes.
  • OpenAPI Integration: Fully self-documenting. Exposes a live Swagger UI at /swagger-ui/ using utoipa out-of-the-box.
  • 100% Coverage: Guaranteed high quality via strict 100% Rustdoc and Test coverage requirements (cargo tarpaulin).

Supported Ecosystems

cdd-ctl daemonizes and interfaces with the following language SDKs:

Repository Language Client; Client CLI; Server Extra features OpenAPI Standard CI Status Browser/WASI WASM Notes
cdd-c C (C89) Client; Client CLI; Server FFI OpenAPI 3.2.0 CI/CD ✅ Supported Executes via pure WASI
cdd-cpp C++ Client; Client CLI; Server Upgrades Swagger & Google Discovery to OpenAPI 3.2.0 Swagger 2.0 until OpenAPI 3.2.0 CI ✅ Supported Executes via pure WASI
cdd-csharp C# Client; Client CLI; Server CLR OpenAPI 3.2.0 CI ✅ Supported Executes via pure WASI (Wasi.Sdk)
cdd-go Go Client; Client CLI; Server OpenAPI 3.2.0 CI ✅ Supported Executes via pure WASI
cdd-java Java Client; Client CLI; Server OpenAPI 3.2.0 CI ✅ Supported Executes via pure WASI (GraalVM native-image)
cdd-kotlin Kotlin (ktor for Multiplatform) Client; Client CLI; Server Auto-Admin UI OpenAPI 3.2.0 CI ✅ Supported Executes via pure WASI
cdd-php PHP Client; Client CLI; Server OpenAPI 3.2.0 CI ✅ Supported Executes via pure WASI
cdd-python-all Python Client; Client CLI; Server OpenAPI 3.2.0 CI ✅ Supported Executes via WASI (py2wasm)
cdd-ruby Ruby Client; Client CLI; Server OpenAPI 3.2.0 CI ✅ Supported Executes via WASI (rbwasm)
cdd-rust Rust Client; Client CLI; Server OpenAPI 3.2.0 CI ✅ Supported Executes via pure WASI
cdd-sh Shell (/bin/sh) Client; Client CLI; Server OpenAPI 3.2.0 CI 🔴 N/A Not applicable for Shell
cdd-swift Swift Client; Client CLI; Server OpenAPI 3.2.0 Swift ✅ Supported Executes via pure WASI
cdd-ts TypeScript Client; Client CLI; Server Auto-Admin UI; Angular; fetch; Axios; Node.js OpenAPI 3.2.0 & Swagger 2 Tests and coverage ✅ Supported Executes via WASI (Node.js polyfilled)

_See cdd_docs_prompt.md and TO_DOCS_JSON.md in this repository for the system prompts used to unify documentation and CLI interfaces across the entire cdd-_ ecosystem.*

Browser-Native Execution

Alongside the CLI and server modes, the project ships with a pure-JavaScript WASI-compatible execution environment: cdd-ctl-wasm-sdk. This allows you to evaluate your OpenAPI generation schemas directly within the browser (client-side) against the 12 fully supported compiled cdd-* WASM binaries (C, C++, C#, Go, Java, Kotlin, PHP, Python, Ruby, Rust, Swift, TypeScript) without requiring backend communication. Heavy-VM runtimes are intentionally unsupported in this mode and rely on graceful degradation to JSON-RPC over HTTP.

Documentation

For detailed guides on utilizing the cdd-* architecture and configuring this tool, refer to our comprehensive documentation:

Quick Start

Starting the Server

You can launch the API gateway and daemon-manager via Cargo:

# Native dependencies mode (REST interface)
cargo run --bin cdd-ctl --release -- --bind 0.0.0.0:8080 --config ./config.json

# WASM mode (runs compiled WASM binaries via wasmtime, REST interface)
cargo run --bin cdd-ctl-wasm --release -- --bind 0.0.0.0:8081 --config ./config.json

# JSON-RPC Native dependencies mode (JSON RPC over HTTP)
cargo run --bin cdd-rpc --release -- --bind 0.0.0.0:8082 --config ./config.json

# JSON-RPC WASM mode (runs compiled WASM binaries via wasmtime, JSON RPC over HTTP)
cargo run --bin cdd-rpc-wasm --release -- --bind 0.0.0.0:8083 --config ./config.json

Accessing the Interactive API

Once running, the interactive OpenAPI standard documentation and sandbox is available at: http://localhost:8080/swagger-ui/

Test and Documentation Coverage

This repository is maintained with strict 100% test coverage and 100% rustdoc coverage requirements enforced in CI.


License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

API gateway and JSON-RPC process manager for cdd-*

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors