A standalone HTTP server for the Common Architecture Language Model (CALM) validation functionality.
The calm-server executable provides HTTP endpoints for CALM architecture validation.
- Bundled CALM Schemas - All CALM schemas (release and draft) are bundled with the executable
- Health Check Endpoint (
GET /health) - Status endpoint for monitoring - Validation Endpoint (
POST /calm/validate) - Validate CALM architectures against schemas
# Basic usage (uses bundled schemas by default)
calm-server
# With custom port
calm-server --port 8080
# With verbose logging
calm-server --port 3000 --verbose
# Or provide a custom schema directory
calm-server -s /path/to/calm/schemas --port 3000Usage: calm-server [options]
Options:
-V, --version output the version number
--port <port> Port to run the server on (default: "3000")
--host <host> Host to bind the server to (default: "127.0.0.1")
-s, --schema-directory <path> Path to the directory containing the meta schemas
(default: bundled schemas in dist/calm)
-v, --verbose Enable verbose logging (default: false)
-c, --calm-hub-url <url> URL to CALMHub instance
--rate-limit-window <ms> Rate limit window in milliseconds (default: 900000 = 15 minutes)
--rate-limit-max <requests> Max requests per IP within the rate limit window (default: 100)
-h, --help display help for command
- Default Host is Localhost: By default, the server binds to
127.0.0.1for security - No Built-in Authentication: This server has no authentication or authorization controls
- Network Exposure: When binding to non-localhost addresses, a security warning is logged. Only expose to the network in trusted environments
Check if the server is running:
curl http://localhost:3000/healthResponse:
{
"status": "OK"
}Validate a CALM architecture document:
curl -X POST http://localhost:3000/calm/validate \
-H "Content-Type: application/json" \
-d '{
"architecture": "{\"$schema\":\"https://calm.finos.org/release/1.2/meta/calm.json\",\"nodes\":[]}"
}'Response (success):
{
"jsonSchemaValidationOutputs":[],
"spectralSchemaValidationOutputs":[],
"hasErrors":false,
"hasWarnings":false
}Response (validation errors):
{
"jsonSchemaValidationOutputs":[],
"spectralSchemaValidationOutputs":[...],
"hasErrors":true,
"hasWarnings":false
}# From repository root
npm run build:calm-server
# Or from calm-server directory
cd calm-server
npm run build# From repository root
npm run test:calm-server
# Or from calm-server directory
cd calm-server
npm test
# With coverage
npm test -- --coverage# From calm-server directory
npm run lint
npm run lint-fixApache-2.0