# Platform Schemas

Reusable Nickel schemas for common configuration components.

## Schemas

### Server (`common/server.ncl`)

Defines standard HTTP server configuration:
- Host and port
- Worker threads
- Timeouts and keep-alive
- Connection limits
- Graceful shutdown

Used by: Backend, Agents, LLM Router, Frontend

### Database (`common/database.ncl`)

Defines standard database configuration:
- Connection URL
- Credentials (user/password)
- Database selection
- Connection pooling
- Timeout settings

Used by: All services requiring persistence

### Monitoring (`common/monitoring.ncl`)

Defines observability configuration:
- Prometheus metrics
- Log level and format
- Distributed tracing
- Metric collection interval

Used by: All services

### Storage (`common/storage.ncl`)

Defines storage and backup configuration:
- Base storage path
- Storage backend selection
- Backup scheduling
- Cache settings

Used by: Backend, Agents, Knowledge Graph

### Security (`common/security.ncl`)

Defines security configuration:
- TLS enablement
- Certificate paths
- Authentication method
- Audit logging

Used by: All services

## Usage Pattern

```nickel
let server_schema = import "schemas/common/server.ncl" in

let my_config = server_schema {
  port = 9001,
  workers = 8,
}
```

## References

- Parent: `../README.md`
- Values: `../values/README.md`
- Constraints: `../constraints/README.md`
