boarddown 0.1.5

Local-first, file-based Kanban storage engine with sync capabilities
Documentation
# BoardDown

> **Local-first, file-based Kanban storage engine with sync capabilities**

Think "Markdown meets Kanban" — version controlled, offline-capable, and programmable.

## Installation

```bash
cargo add boarddown
```

## Quick Start

```rust
use boarddown::{Workspace, FilesystemStorage, SqliteStorage, Status, Storage, TaskBuilder};
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize filesystem storage
    let storage = Arc::new(FilesystemStorage::new("./my-board")?);
    
    // Open workspace
    let ws = Workspace::builder()
        .path("./my-board")
        .storage(storage)
        .build()
        .await?;
    
    // Load a board
    let board = ws.get_board("sprint-42").await?;
    
    // Query tasks
    let tasks = board.query()
        .status(Status::Todo)
        .tag("security")
        .execute()
        .await?;
    
    // Create a new task
    let task = TaskBuilder::new()
        .title("Implement feature")
        .status(Status::Todo)
        .column("Todo")
        .build();
    
    println!("Found {} todo tasks", tasks.len());
    Ok(())
}
```

## Storage Backends

### FilesystemStorage

Git-friendly `.board.md` files:

```rust
use boarddown::FilesystemStorage;

let storage = FilesystemStorage::new("./boards")?;
```

### SqliteStorage

High-performance indexed storage with full-text search:

```rust
use boarddown::SqliteStorage;

let storage = SqliteStorage::new(".boarddown/cache.db")?;
```

### HybridStorage

SQLite cache + filesystem source of truth:

```rust
use boarddown::{FilesystemStorage, SqliteStorage, HybridStorage};

let hybrid = HybridStorage::new(
    FilesystemStorage::new("./boards")?,
    SqliteStorage::new(".boarddown/cache.db")?,
);
```

## Exported Types

This crate re-exports all types from the BoardDown ecosystem:

| Module | Types |
|--------|-------|
| Core | `Workspace`, `Storage`, `Query`, `QueryBuilder`, `Error`, `EventBus` |
| Schema | `Board`, `Task`, `TaskId`, `Status`, `Column`, `Metadata`, `Priority` |
| FS | `FilesystemStorage`, `FileWatcher`, `GitIntegration`, `HookExecutor` |
| DB | `SqliteStorage`, `HybridStorage`, `FullTextSearch` |
| Sync | `SyncEngine`, `CrdtEngine`, `ConflictResolver`, `SyncResult` |

## Task Status

| Syntax | Status | Description |
|--------|--------|-------------|
| `- [ ]` | `Status::Todo` | Not started |
| `- [~]` | `Status::InProgress` | Currently working |
| `- [>]` | `Status::Review` | Ready for review |
| `- [x]` | `Status::Done` | Completed |
| `- [?]` | `Status::Blocked` | Blocked/Icebox |
| `- [!]` | `Status::Urgent` | High priority |

## File Format

BoardDown uses Markdown files with YAML frontmatter:

```markdown
---
id: "sprint-42"
board: "Sprint 42: Auth Refactor"
id-prefix: "BD"
---

## Todo
- [ ] BD-001: Implement OAuth2 PKCE flow
      Tags: security, backend
      Estimate: 5

## In Progress
- [~] BD-002: Refactor JWT middleware
      Assign: alice@example.com

## Done
- [x] BD-003: Setup test fixtures
      Closed: 2024-01-14
```

## Sync Support

Enable conflict-free synchronization:

```rust
use boarddown::{SyncEngine, Storage};

let sync = SyncEngine::new()
    .with_storage(Box::new(storage));

let result = sync.sync(&board_id).await?;
println!("Pushed {}, pulled {}", result.pushed, result.pulled);
```

## License

MIT