added api versions
This commit is contained in:
parent
4a85804b6d
commit
064b33c67e
10
CLAUDE.md
10
CLAUDE.md
@ -58,6 +58,16 @@ When a project is a public-facing website meant to be indexed (landing page, por
|
|||||||
- **Mixed project** (public + admin): Astro/Next for public, React island (`client:only`) for admin.
|
- **Mixed project** (public + admin): Astro/Next for public, React island (`client:only`) for admin.
|
||||||
- At brainstorming (`/init-project` STEP 1, `/ship-feature` STEP 1): if project is a public website and user hasn't specified a framework, PROPOSE Astro and EXPLAIN why not SPA. Never silently pick React CRA.
|
- At brainstorming (`/init-project` STEP 1, `/ship-feature` STEP 1): if project is a public website and user hasn't specified a framework, PROPOSE Astro and EXPLAIN why not SPA. Never silently pick React CRA.
|
||||||
|
|
||||||
|
## Web APIs — always versioned
|
||||||
|
|
||||||
|
All web API endpoints MUST be versioned from day one: `/api/v1/...`, `/api/v2/...`.
|
||||||
|
|
||||||
|
- New project → start at `/api/v1/`. No bare `/api/` routes.
|
||||||
|
- Breaking changes → new version (`v2`). Old version stays functional — clients migrate at their own pace.
|
||||||
|
- Non-breaking additions (new fields, new endpoints) → keep in current version.
|
||||||
|
- Each version is a self-contained contract. Never modify existing version behavior to match a newer one.
|
||||||
|
- Router structure must reflect versioning explicitly (e.g. `api/v1/routes/`, `api/v2/routes/` or equivalent namespace/prefix pattern for the language/framework used).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Communication mode: radical honesty
|
# Communication mode: radical honesty
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user