diff --git a/CACHING-TRANSITION.md b/CACHING-TRANSITION.md new file mode 100644 index 0000000..1958098 --- /dev/null +++ b/CACHING-TRANSITION.md @@ -0,0 +1,284 @@ +# Caching transition: context and first tasks (for Claude) + +> **Temporary roadmap.** Delete this file once the caching transition is +> done; it's only needed while the work is in progress. + +Written 2026-11-02 from a planning session in `boboko-research`, updated the +same day with the team's decisions. Read this before working on the tasks +below. Front-end conventions are still in [CLAUDE.md](CLAUDE.md), and that +file wins on style, Greek register, localization and performance rules. + +Source documents (outside this repo, read-only for context): +- `/Users/farenoubi/Projects/boboko-research/caching-islands.md`: the target design +- `/Users/farenoubi/Projects/boboko-research/tech-platform.md`: the platform plan +- `/Users/farenoubi/Projects/boboko-research/tasks.md`: the full task list (3dealer, boboko-core, infra, parked). **The source of truth for task ids** +- `/Users/farenoubi/Projects/boboko-research/team-discussion.md`: decisions, and the open items (D7, D10) + +Every task is also a card on the Planka board (3dealer.gr → Development, +label **Transition**). The task id (A1, W1…) is in each card's description. + +**boboko-core is paused** (the backend developer is on leave). Only do the +tasks below that don't need core. A0 waits until core work resumes. + +## Where we're going + +**Every catalogue page becomes the same HTML for every visitor**, cached +(probably as static files Caddy serves without PHP). Anything personal (cart, +login state, wishlist, CSRF token) comes from **one small "islands" request** +that runs only when the visitor has a state cookie, and is answered with +**Turbo Streams** rendered from Blade. + +- Cacheable routes (home, category, product, `/products`, FAQ, legal pages) + will run **without a session**: no cookies, no CSRF token, no `auth()`, no + flash, no `old()`, no `$errors`. +- Session routes (cart, checkout, account, login, contact, islands, writes) + stay in `web`. +- Writes (add to cart, wishlist toggle, review) answer with Turbo Streams that + update every affected place at once. + +**Decided (2026-11-02):** +- Turbo Streams for islands and writes (JSON only for consumers that aren't + HTML); the cart badge starts as a fixed-size placeholder. +- Laravel 13 (core C0, then A0 here), once core work resumes. +- **Page cache: static files** served by Caddy (later tasks P1–P3). +- **No Turbo Drive.** A normal multi-page site plus Speculation Rules, View + Transitions and back/forward cache (A7–A9 here). +- **Caddy** replaces nginx (W1, the last task in this file). +- **Search and filters will run in the browser against Meilisearch** through + Caddy on a subdomain, with the card as one Blade component reused through a + `