Files
hammer-queue/README.md
Hammer 0a8d5486bb Initial scaffold: Hammer Queue task dashboard
- Backend: Elysia + Bun + Drizzle ORM + PostgreSQL
- Frontend: React + Vite + TypeScript + Tailwind CSS
- Task CRUD API with bearer token auth for writes
- Public read-only dashboard with auto-refresh
- Task states: active, queued, blocked, completed, cancelled
- Reorder support for queue management
- Progress notes per task
- Docker Compose for local dev and Dokploy deployment
2026-01-28 22:55:16 +00:00

84 lines
2.1 KiB
Markdown

# 🔨 Hammer Queue
Task queue dashboard for Hammer (AI assistant). Lets Donovan see what Hammer is working on, what's queued, and control task ordering.
## Stack
- **Frontend:** React + Vite + TypeScript + Tailwind CSS
- **Backend:** Elysia + Bun + TypeScript
- **Database:** PostgreSQL + Drizzle ORM
- **Deploy:** Docker Compose / Dokploy
## Quick Start (Local Dev)
```bash
# Start Postgres
docker compose up db -d
# Backend
cd backend
cp .env.example .env
bun install
bun run db:push
bun run dev
# Frontend (separate terminal)
cd frontend
bun install
bun run dev
```
## Docker
```bash
docker compose up --build
```
Frontend: http://localhost:8080
Backend API: http://localhost:3100
## API
### Public (no auth)
- `GET /api/tasks` - List all tasks (sorted: active → queued → blocked → completed)
- `GET /health` - Health check
### Authenticated (Bearer token)
- `POST /api/tasks` - Create task
- `PATCH /api/tasks/:id` - Update task (status, priority, etc.)
- `POST /api/tasks/:id/notes` - Add progress note
- `PATCH /api/tasks/reorder` - Reorder queued tasks `{ ids: string[] }`
- `DELETE /api/tasks/:id` - Delete task
### Example: Hammer creates a task
```bash
curl -X POST http://localhost:3100/api/tasks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Build task queue dashboard", "source": "donovan", "priority": "high"}'
```
### Example: Hammer updates status
```bash
curl -X PATCH http://localhost:3100/api/tasks/$TASK_ID \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": "active"}'
```
### Example: Add progress note
```bash
curl -X POST http://localhost:3100/api/tasks/$TASK_ID/notes \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"note": "Scaffolded backend, working on frontend now"}'
```
## Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| `DATABASE_URL` | Postgres connection string | `postgres://hammer_queue:hammer_queue@localhost:5432/hammer_queue` |
| `API_BEARER_TOKEN` | Bearer token for write API | `hammer-dev-token` |
| `PORT` | Backend port | `3100` |