You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB
Markdown

+++
title = "Write api/README.md, api/docs/PLANNING.md, api/docs/ARCHITECTURE.md"
priority = 3
status = "done"
ticket_type = "task"
dependencies = ["a6bce1"]
+++
<context>
The `quotesdb` API is built with Axum + Tokio, targeting Cloudflare Workers via `workers-rs`. It serves JSON at `/api/*` endpoints and persists data to Cloudflare D1 (production) or a local SQLite file via Turso (development). Source lives in `src/bin/api/`.
Shared types and utilities are in `src/lib.rs` — code placed there must compile for both the host target and `wasm32-unknown-unknown`.
</context>
<goal>
Write the three documentation files for the API domain:
1. `README.md` — what the API does, how to run it (`cargo run`), how to test it, license, Claude Code disclaimer
2. `docs/PLANNING.md` — development phases and work log for the API sub-domain
3. `docs/ARCHITECTURE.md` — API component overview: router, handlers, database layer, auth, OpenAPI spec
</goal>
<constraints>
- README must include the dual Apache-2.0 + MIT license notice.
- README must include a disclaimer that the software was written with Claude Code (model: claude-sonnet-4-6).
- ARCHITECTURE.md must describe how the API binary wires together (router → handlers → db layer).
- PLANNING.md must reflect the actual work done (link to ticket IDs where appropriate).
</constraints>
<validation>
Run in order from the `quotesdb/` directory:
```sh
cargo fmt
cargo check
cargo clippy
cargo test
```
</validation>
<commit>
`docs(quotesdb): write api README, PLANNING.md, and ARCHITECTURE.md`
</commit>