<div align="center">
  <img src="../assets/typedialog_logo_h_s.svg" alt="TypeDialog Logo" width="600" />
</div>

# TypeDialog Documentation

Complete documentation for using, building, and deploying TypeDialog.

## Getting Started

1. **[installation.md](installation.md)** - Prerequisites and setup
   - System requirements
   - Dependency installation
   - Verification

2. **[development.md](development.md)** - Local development
   - Using `just` for tasks
   - Common workflows
   - Examples and testing

3. **[pre-commit-setup.md](pre-commit-setup.md)** - Automated linting hooks
   - Pre-commit hook installation
   - Automatic code quality checks
   - Hook configuration and usage

## Building & Distribution

1. **[build.md](build.md)** - Building and packaging
   - Critical dependencies (prov-ecosystem, secretumvault, just, Nickel)
   - Single-platform builds
   - Cross-compilation setup
   - Distribution package creation
   - Docker builds

2. **[release.md](release.md)** - Release workflow
   - Preparing releases
   - GitHub releases
   - Installation verification
   - CI/CD integration

## Architecture

- **[architecture.md](architecture.md)** - Technical positioning and internal architecture
  - Positioning vs Inquire, Ratatui, Axum, Nushell
  - BackendFactory mechanics and feature-gated dispatch
  - Three-phase form execution (selector fields, lazy fragments, field-by-field)
  - Known technical debt

## Configuration

1. **[configuration.md](configuration.md)** - Configuration guide
   - Backend-specific configs
   - Environment settings (dev, prod)
   - Custom configurations
   - Best practices

2. **[field_types.md](field_types.md)** - Field types reference
   - All supported field types
   - RepeatingGroup arrays
   - Conditional display
   - i18n support

## Quick Links

### Installation & Setup

- [System Requirements](installation.md#prerequisites)
- [Installing just](installation.md#just-command-orchestration)
- [Installing Nickel CLI](installation.md#nickel-cli--optional)

### Backend-Specific Guides

- [CLI Backend](cli/) - Command-line prompts and scripting
- [TUI Backend](tui/) - Terminal UI with keyboard/mouse support
- [Web Backend](web/) - HTTP server and browser forms
- [AI Backend](ai/) - RAG system and semantic search
- [Agent System](agent/) - Multi-provider LLM execution

### Feature Guides

- [Architecture](architecture.md) - Positioning, BackendFactory, execution model
- [Nickel Integration](nickel.md) - Schema parsing, contracts, i18n, templates
- [Encryption](encryption/) - Secure field handling
- [Provisioning Generator](prov-gen/) - Infrastructure as Code generation
- [Nickel Examples](../examples/07-nickel-generation/) - Complete examples

### Development

- [Quick Start Development](development.md#quick-start)
- [Using just Commands](development.md#just-commands)
- [Running Examples](development.md#examples)

### Building

- [Critical Dependencies](build.md#critical-dependencies)
- [Build Binaries](build.md#building-binaries)
- [Cross-Compilation](build.md#cross-compilation)
- [Create Distribution Packages](build.md#distribution-packages)

### Release

- [Release Workflow](release.md#release-workflow)
- [GitHub Integration](release.md#github-release)
- [Distribution Structure](release.md#distribution-structure)

## Backend Documentation

Complete documentation for each TypeDialog backend:

| Backend | Path | Description |
 | --------- | ------ | ------------- |
| **CLI** | [`cli/`](cli/) | Command-line interface (inquire-based prompts) |
| **TUI** | [`tui/`](tui/) | Terminal UI (Ratatui-powered interface) |
| **Web** | [`web/`](web/) | HTTP server (Axum-based browser forms) |
| **AI** | [`ai/`](ai/) | AI backend (RAG, embeddings, knowledge graphs) |
| **Agent** | [`agent/`](agent/) | AI agent execution (multi-provider LLM) |

## Feature Documentation

Documentation for TypeDialog features:

| Feature | Path | Description |
 | --------- | ------ | ------------- |
| **Encryption** | [`encryption/`](encryption/) | Field encryption and secure data handling |
| **Provisioning** | [`prov-gen/`](prov-gen/) | Infrastructure as Code generation |

## Navigation

```text
docs/
├── README.md                 ← You are here
├── installation.md           ← Prerequisites & setup
├── development.md            ← Local development
├── build.md                  ← Building & packaging
├── release.md                ← Release workflow
├── configuration.md          ← Configuration guide
├── field_types.md            ← Field types reference
├── nickel.md                 ← Nickel schema support
├── cli/                      ← CLI backend documentation
├── tui/                      ← TUI backend documentation
├── web/                      ← Web backend documentation
├── ai/                       ← AI backend documentation
├── agent/                    ← Agent system documentation
├── encryption/               ← Encryption documentation
└── prov-gen/                 ← Provisioning generator docs
```text

## Examples

Complete working examples are in the `examples/` directory:

- [examples/README.md](../examples/README.md) - Example guide
- [examples/01-basic/](../examples/01-basic/) - Getting started
- [examples/04-backends/](../examples/04-backends/) - Backend-specific
- [examples/09-templates/](../examples/09-templates/) - Production templates

## Main Resources

- [README.md](../README.md) - Project overview and features
- [Cargo.toml](../Cargo.toml) - Project manifest

## Common Tasks

### I want to

**...get started quickly**
→ Read [installation.md](installation.md), then [development.md](development.md)

**...build from source**
→ Read [build.md](build.md#building-binaries)

**...release a new version**
→ Read [release.md](release.md#release-workflow)

**...configure backends**
→ Read [configuration.md](configuration.md)

**...set up development environment**
→ Read [development.md](development.md)

**...cross-compile for other platforms**
→ Read [build.md](build.md#cross-compilation)

## Complete Documentation Structure

```text
docs/
├── README.md              ← Overview (you are here)
│
├── Getting Started
│   ├── installation.md    ← Setup & requirements
│   ├── development.md     ← Local development & `just` commands
│   └── configuration.md   ← Backend configuration
│
├── Building & Distribution
│   ├── build.md           ← Building & cross-compilation
│   └── release.md         ← Release workflow
│
├── Reference
│   ├── architecture.md    ← Technical positioning & internals
│   ├── field_types.md     ← Field types reference
│   └── nickel.md          ← Nickel schema support
│
├── Backends
│   ├── cli/               ← CLI backend
│   ├── tui/               ← TUI backend
│   ├── web/               ← Web backend
│   ├── ai/                ← AI backend
│   └── agent/             ← Agent system
│
└── Features
    ├── encryption/        ← Encryption & security
    └── prov-gen/          ← Infrastructure provisioning
```text

## Documentation Structure

This documentation follows a **layered approach**:

1. **Session Layer** (`.coder/`) - Interaction files (plans, summaries)
2. **Operational Layer** (`.claude/`) - Claude Code configuration
3. **Product Layer** (`docs/`) - User-facing documentation

See [Architecture](../README.md#architecture) for project structure.

---

**Latest Update**: December 2024
**Status**: Complete (+ Nickel support)
