# Blog Seed

A complete blog platform with posts, tags, and comments.

## Resources

| Resource | Features |
|----------|----------|
| Post | CRUD, soft delete, audit, state machine (draft → review → published), slug generation |
| Tag | CRUD, admin-only create/delete |
| Comment | CRUD, belongs to Post (cascade delete) |

## Relationships

- Post hasMany Comment (cascade delete)
- Comment belongsTo Post
- Post belongsToMany Tag (via PostTag junction)

## Roles & Permissions

| Role | Capabilities |
|------|-------------|
| admin | Full access to all resources |
| editor | Can publish/unpublish posts, manage tags |
| author | Can create/edit own posts, cannot publish |
| reader | Read-only access to published content, can create comments |

## Seed Data

5 posts (2 published, 1 review, 2 draft), 4 tags, users: admin, alice (author), bob (author), carol (reader), diana (editor).

## Lua Scripts

- `scripts/search.lua` — Full-text search across post titles, bodies, and excerpts
