frontend
Defines frontend implementation order, contract use, resident development checking, live integration, and the frontend gate. Read before frontend work, then read every sibling topic.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 21
- Forks
- 2
01 前言 Front Matter
- name
- frontend
- description
- Defines frontend implementation order, contract use, resident development checking, live integration, and the frontend gate. Read before frontend work, then read every sibling topic.
02 资源文件 6
- 参考文档architecture.md4.8 KB
- 参考文档debugging.md3.0 KB
- 参考文档design.md2.4 KB
- 参考文档screens.md7.0 KB
- 参考文档sdk.md3.8 KB
- 参考文档verification.md6.6 KB
03 SKILL.md 正文
Frontend
The frontend delivers requirement-backed user journeys through the settled generated SDK. Begin only after the backend gate passes.
Topics
- sdk.md: generated accessors, the shared connection, simulation, sessions, and live integration.
- architecture.md: folders, routes, hooks, state ownership, components, and errors.
- screens.md: screen planning, forms, lists, values, states, and responsive behavior.
- design.md: visual discipline and accessibility.
- verification.md: browser journeys, viewports, simulation, live execution, and the verification record.
- debugging.md: assigning a failure to the runtime and the layer that owns it.
Implementation Order
- Read every requirement and all authored and generated API source under
packages/api/src/. - Map requirements and SDK operations to screens in
packages/frontend/wiki/screen-plan.md, taking the operation list from the@accessortag every generated accessor carries and the requirement list from the enumeration inscreens.md.pnpm plandecides whether the plan accounts for every section. - Declare every page and journey surface before implementation.
- Build the shared shell, primitives, providers, route table, connection, domain hooks, and view models.
- Implement screens and their loading, empty, error, refusal, retry, and post-mutation states.
- Write one exported Playwright journey function for every requirement-backed user flow.
- Run
pnpm test:contractunder simulation while building, and close onpnpm test:e2eagainst the live backend, which its mode builds. The live run is the gate;verification.mdowns why they are two suites.
Do not turn every endpoint into a page. Do not omit a user capability because it is difficult.
Consumption and presentation are separate obligations. architecture.md owns consumption: every published operation is consumed, whatever the interface looks like. A screen decides whether that capability earns its own page — an operation may lack a visible screen only when it is infrastructure, redundant with a complete user path, or non-user-facing, with the exact reason and invalidating condition recorded in packages/frontend/wiki/omissions.md. That record answers for the missing page, never for a missing call.
If a requirement needs behavior the SDK cannot express, repair the API or backend, regenerate, and re-pass the backend gate.
Continuous Development
From packages/frontend, start:
pnpm dev
Keep it running through Overall Final. Vite and @ttsc/unplugin use the package tsconfig.json and lint.config.ts, report type, lint, and contributor diagnostics, and reload after input changes.
Use simulation while building contract-shaped screens and deterministic fixtures for named UI states. Before live integration, ensure backend pnpm dev is running from packages/backend.
Stack
Use the existing Vite, React, React Router, TanStack Query, Tailwind, generated Nestia SDK, and Playwright stack. Do not add a frontend server, backend-for-frontend, handwritten transport layer, or second API contract.
Add a dependency only after a concrete need appears.
Frontend Gate
The frontend gate requires:
- the active arm's frontend review;
- a clean current
pnpm devreload; - every requirement-backed journey represented by a browser spec, and every screen walked by one of them;
- every published SDK operation called by a domain hook, and every hook used by a screen;
- every product-facing operation reachable from a screen, or a recorded omission for its missing page;
pnpm plangreen, so every requirement section is delivered by a screen entry or decided by an omission;- every production component consumed by a screen or necessary shared boundary;
- responsive and accessible behavior at required viewports;
- every screen driven in the interactive browser, with
packages/frontend/wiki/interactive-review.mdrecording what was observed; - every requirement journey green under
pnpm test:e2eagainst the live backend, each asserting the concrete effect its requirement names; and packages/frontend/wiki/verification.mdrecording what actually ran.
A green build proves that the application bundles. It does not prove that users can complete the product.
04 同仓库更多 Skills
contracts
Defines self-acknowledgments for production declarations and tests. Use when implementing or reviewing maintained source, unit tests or E2E tests, or selecting Evidence checklists.
prompting
Writes and trims ttsc's prompts for agents, namely AGENTS.md, CLAUDE.md, and the skills under .agents/skills. Use before changing any of them, together with the documentation skill's writing rules.
contracts
Defines the @evidence checklists every maintained ttsc declaration and test answers, and their evidence.config.json wiring. Use when writing or reviewing maintained source or tests, or changing Evidence selection.
alchemy-domain
Build backends with @alchemy.run/domain (domain-driven design on Effect) - turn requirements into aggregates, commands, events, rejections, views, policies, sagas, projections, streams, queries, external systems and Apis; lay them out in a monorepo (domain / server / web packages, kind-suffixed files); test them with stories; host them on Durable Objects (Cloudflare, Rivet or Effect Cluster) with alchemy; and drive them from a foldkit frontend. Use when designing or changing an @alchemy.run/domain model, adding a building block, wiring hosting or a frontend, or reviewing such code.
alchemy-provider
暂无简介
write-docs
暂无简介