# Deployment Mode Defaults

Mode-specific default configurations.

## Deployment Modes

### Solo (`solo.ncl`)

Development and testing mode:
- Host: `127.0.0.1` (localhost only)
- Backend port: `8080`
- Agents port: `8002`
- Router port: `8003`
- Workers: `2`
- Database: File-based
- NATS: Disabled
- Cost tracking: Disabled
- Security: JWT only (no TLS, no MFA)

Best for: Feature development, testing, PoCs

### Multiuser (`multiuser.ncl`)

Team collaboration mode:
- Host: `0.0.0.0` (network accessible)
- Backend port: `8001`
- Agents port: `8002`
- Router port: `8003`
- Workers: `4`
- Database: Remote SurrealDB
- NATS: Enabled
- Cost tracking: Enabled (per-role budgets)
- Security: TLS + MFA + audit logging
- Knowledge graph retention: `30 days`

Best for: Team development, staging, internal deployments

### Enterprise (`enterprise.ncl`)

Production high-availability mode:
- Host: `0.0.0.0` (network accessible)
- Backend: `8` workers, `2000` max connections
- Agents: `50` max instances, `60s` heartbeat
- Router: All providers enabled, aggressive cost optimization
- Database: SurrealDB cluster, `100` pool size
- NATS: JetStream cluster enabled
- Cost tracking: Detailed, per-provider and per-role
- Security: TLS enforced, MFA required, full audit
- Observability: Prometheus, OpenTelemetry, tracing
- Knowledge graph retention: `90 days`
- Backup: Every `6 hours`

Best for: Production deployments, large organizations, HA requirements

## Composition

Deployment modes override common defaults:

```
Common Defaults
      ↓
Deployment Mode (override)
      ↓
User Customizations (override)
      ↓
Final Config
```

Example:

```nickel
let common = import "../common/server-defaults.ncl" in
let solo_mode = import "solo.ncl" in

# Merge: common is overridden by solo_mode
std.record.merge common solo_mode
```

## Sizing Guide

| Metric | Solo | Multiuser | Enterprise |
|--------|------|-----------|------------|
| **CPU** | 2 cores | 4-8 cores | 16+ cores |
| **Memory** | 2 GB | 8-16 GB | 32GB+ |
| **Users** | 1 | 5-20 | 100+ |
| **Agents** | 3 | 10 | 50+ |
| **Database** | File | SurrealDB | Cluster |
| **NATS** | None | JetStream | Cluster |

## References

- Parent: `../README.md`
- Common defaults: `../common/README.md`
- Platform README: `../../README.md`
