restly-clean-frontend

Applies Clean Architecture layering rules to the Restly Vite and React frontend codebase.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/truongnat/Restly --skill restly-clean-frontend-truongnat
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: restly-clean-frontend
Source: https://github.com/truongnat/Restly/tree/main/.cursor/skills/restly-clean-frontend
Command: npx skills add https://github.com/truongnat/Restly --skill restly-clean-frontend-truongnat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend codebases tend to accumulate tangled dependencies, fat Zustand stores, and hardcoded mock data as features grow. This Skill enforces a Clean Architecture / Hexagonal structure on the Restly Vite+React UI so the domain stays isolated, the UI stays thin, and infrastructure (mock HTTP, storage, future Tauri desktop) remains swappable. ## Core Features & Use Cases - Layered scaffolding guidance: Defines the target src/ layout (app, pages, features, entities, shared, infrastructure) and the dependency rule pages → features → entities/shared. - Port-based infrastructure: Requires mock or real HTTP/storage adapters to implement interfaces (ports) defined next to features or entities, so mocks can be swapped for real backends later. - Anti-pattern detection: Flags importing pages from features, monolithic Zustand stores mixing HTTP/UI/domain logic, and copy-pasted design HTML without shared UI primitives. - Use Case: When adding a new feature like request history to Restly, use this Skill to decide where types, React components, and mock adapters belong and to record new ports as an ADR. ## Quick Start Ask the AI to scaffold a new Restly feature following clean architecture, placing domain types in entities, React in features, and mock data behind an infrastructure port.

Frequently Asked Questions about restly-clean-frontend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a React frontend with Clean Architecture?▼

Organize code into layers: app shell and providers, pages for routes, features per domain capability, entities for domain types and pure logic, and shared UI utilities. Enforce the dependency rule that pages depend on features, and features depend on entities and shared code only.

How to add mock HTTP data in a React app without hardcoding fixtures?▼

Define an interface (port) next to the feature or in entities, then create an implementation under infrastructure/mock that satisfies it. This keeps fixtures out of JSX and lets you swap the mock adapter for a real HTTP or desktop adapter later.

Where should Zustand stores live in a clean frontend architecture?▼

Stores belong in the feature layer and should not own HTTP calls, UI state, and domain validation in one file. Keep domain logic in entities or feature model folders and access infrastructure only through defined ports.

Can features import from pages in this architecture?▼

No, importing pages from features is an explicit anti-pattern. Dependencies flow one way: pages to features to entities and shared, which prevents circular dependencies and keeps features reusable across routes.

When should I write an ADR for frontend architecture decisions?▼

Record an Architecture Decision Record whenever you introduce a new port, such as a new HTTP or storage interface. Place the ADR under the wiki or docs folder so the rationale behind infrastructure boundaries stays documented.