syntaxis/config/api/syntaxis-api-config.template.toml
Jesús Pérez 9cef9b8d57 refactor: consolidate configuration directories
Merge _configs/ into config/ for single configuration directory.
Update all path references.

Changes:
- Move _configs/* to config/
- Update .gitignore for new patterns
- No code references to _configs/ found

Impact: -1 root directory (layout_conventions.md compliance)
2025-12-26 18:36:23 +00:00

137 lines
4.4 KiB
TOML

# Workspace API Server Configuration Template
#
# This is a template configuration file for the syntaxis-api binary.
# Copy this file to your desired location and update the values below.
#
# ## Modular Configuration Architecture
#
# The configuration system uses a two-tier approach:
#
# **Tier 1: Main Config** (this file)
# - Core server settings (host, port, database, static files, logging, TLS)
# - Feature enablement flags (which features are active)
#
# **Tier 2: Feature Configs** (in configs/features/ directory)
# - Feature-specific settings (auto-loaded if feature is enabled)
# - Examples: database migrations, health check intervals, metrics configuration
#
# To enable a feature:
# 1. Set `enabled = true` in the corresponding [server.features.{feature}] section below
# 2. Create configs/features/{feature}.toml with the feature-specific configuration
# 3. Restart the server
#
# If an enabled feature's config file is missing, the server will report an error.
#
# Usage:
# syntaxis-api --config /path/to/syntaxis-api-config.toml
[server]
# Server host to bind to
# Examples: 127.0.0.1 (localhost only), 0.0.0.0 (all interfaces)
host = "127.0.0.1"
# Server port number
port = 3000
# Database file path
# Can be absolute (/var/lib/workspace/data.db) or relative (./data/workspace.db)
# The parent directory will be created automatically if it doesn't exist
database_path = "/tmp/workspace-data.db"
# Path to directory containing static files (public folder and docs)
# Can be absolute (/var/www/public) or relative (./public)
public_files_path = "./public"
# Enable Cross-Origin Resource Sharing (CORS)
# Set to true to allow requests from different origins
cors_enabled = true
# Logging level: trace, debug, info, warn, error
# info = default, shows informational messages and errors
# debug = detailed debugging information
# trace = very detailed diagnostic information
log_level = "info"
# ============================================================================
# FEATURE CONFIGURATION
# ============================================================================
#
# Enable/disable features and point to their configuration files.
# Feature configs should be located in: configs/features/{feature}.toml
#
# Each feature can be turned on or off independently.
# When a feature is enabled, its configuration file must exist.
[server.features]
# Database feature: migrations, connection pooling, etc.
# Config file: configs/features/database.toml
[server.features.database]
enabled = false
# Health check feature: status endpoint, database ping, version, uptime
# Config file: configs/features/health.toml
[server.features.health]
enabled = false
# Metrics feature: Prometheus metrics, tracing, performance monitoring
# Config file: configs/features/metrics.toml
[server.features.metrics]
enabled = false
# Rate limiting feature: request throttling per client
# Config file: configs/features/rate_limit.toml
[server.features.rate_limit]
enabled = false
# Authentication feature: API key validation, token-based auth
# Config file: configs/features/auth.toml
[server.features.auth]
enabled = false
# Cache feature: in-memory or distributed caching
# Config file: configs/features/cache.toml
[server.features.cache]
enabled = false
# Multi-tenant feature: tenant isolation, per-tenant configuration
# Config file: configs/features/multi_tenant.toml
[server.features.multi_tenant]
enabled = false
# Projects feature: project management and lifecycle
# Config file: configs/features/projects.toml
[server.features.projects]
enabled = true
# Tasks feature: task tracking and state management
# Config file: configs/features/tasks.toml
[server.features.tasks]
enabled = true
# Phases feature: project phase lifecycle management
# Config file: configs/features/phases.toml
[server.features.phases]
enabled = true
# Audit feature: change tracking and audit trail
# Config file: configs/features/audit.toml
[server.features.audit]
enabled = true
# ============================================================================
# TLS/HTTPS CONFIGURATION
# ============================================================================
#
# Uncomment the section below to enable TLS
[server.tls]
# Enable TLS for HTTPS connections
enabled = false
# Path to TLS certificate file (required if enabled)
# cert_path = "/path/to/cert.pem"
# Path to TLS private key file (required if enabled)
# key_path = "/path/to/key.pem"