- Home
- Skills
- Frontend & Web Apps
- Architecture Based Frontend Scaffolds
Works with the AI Agents you already use
Architecture Based Frontend Scaffolds
Name an architecture and a stack, get a running skeleton app: folders for every layer, routes wired, mocked data, state, a dev server that boots, and a report
$5
/moSubscription · cancel anytime
Secure checkout via Stripe
- Always the latest version
- Delivered live to your agent via MCP
- Cancel anytime, access ends at period end
Architecture Based Frontend Scaffolds
Example session with this skill installed
Scaffold a skeleton app for a recipe site: React + Vite + TypeScript, Feature-Sliced Design. Pages: recipe list, recipe detail, favourites. Mock the data, and keep favourites in a small Zustand store. The plan is approved in advance, go ahead and build it.
- Read your context and instructions
- Compiled the architecture based frontend
- Generated the app files
The recipe site skeleton is built in recipes-app/ and it runs. The dev server started cleanly, I clicked through all three pages in a browser with no console errors, and typecheck, lint and the production build all pass. The dev server is stopped now.
cd recipes-app
npm run dev # http://localhost:5173
1. Stack and the features I mocked
You approved the plan up front, so I built straight from it:
| Architecture | Feature-Sliced Design: app > pages > widgets > features > entities > shared |
| Framework | React 19.3, Vite 8.3, TypeScript 5.9 (strict, plus noUncheckedIndexedAccess) |
| Routing | react-router-dom 7 (createBrowserRouter) |
| State | Zustand 5, persisted to localStorage |
| Tooling | ESLint 10 (flat config) with typescript-eslint, react-hooks and FSD import rules; Prettier 3 |
Mocked features
- Recipe catalogue: six fixture recipes behind an async mock API with 300 ms of fake latency.
- Recipe detail: ingredients and method, plus a "not found" state for an unknown id.
Favourites: a Save/Saved toggle on every card and on the detail page, a live count in the header, a favourites page, and a Clear all button. Favourites survive a reload.
4. Navigation shell: a sticky header that highlights the current page, and a catch-all 404 route.
2. Route map
| Path | Page | Data source |
|---|---|---|
/ | RecipeListPage | useRecipes() |
/recipes/:recipeId | RecipeDetailPage | useRecipe(id) |
/favourites | FavouritesPage | useFavouriteIds() then useRecipesByIds(ids) |
* | NotFoundPage | none |
Every path is defined once in shared/config/routes.ts. The router and all the links read from that file, so a URL can't end up different in two places.
3. Directory map
recipes-app/
├── index.html entry -> /src/app/main.tsx
├── vite.config.ts '@' -> src alias, port 5173
├── eslint.config.js FSD layer + public-API import rules
├── tsconfig{,.app,.node}.json
├── .prettierrc.json
└── src/
├── app/ TOP LAYER: bootstraps the app; nothing imports it
│ ├── main.tsx createRoot
│ ├── providers/ AppProviders (StrictMode + RouterProvider)
│ ├── router/ router.tsx (route map), RootLayout.tsx (header + <Outlet/>)
│ └── styles/ global.css (design tokens, reset)
├── pages/ one slice per route; puts widgets and features together
│ ├── recipe-list/
│ ├── recipe-detail/
│ ├── favourites/
│ └── not-found/
├── widgets/ larger UI blocks used on more than one page
│ ├── app-header/ nav + live favourites badge
│ └── recipe-grid/ RecipeCard (entity) + FavouriteButton (feature)
├── features/ user actions that have their own state
│ └── toggle-favourite/
│ ├── model/ favouritesStore.ts (Zustand + persist, selectors)
│ └── ui/ FavouriteButton.tsx
├── entities/ business objects
│ └── recipe/
│ ├── model/ types.ts (contract), hooks.ts (read hooks)
│ ├── api/ recipeApi.ts (service), recipes.mock.ts (fixtures)
│ └── ui/ RecipeCard.tsx, RecipeMeta.tsx
└── shared/ knows nothing about recipes
├── api/ mockClient.ts: mockRequest(), ApiError
├── config/ routes.ts: ROUTES, buildRecipePath()
├── lib/ useAsync.ts: loading / success / error state
└── ui/ Button, Card, PageTitle, StatusMessage
Every slice has an index.ts public API, and there are no empty or orphaned folders. ESLint enforces two FSD rules. I checked that both fire by feeding ESLint deliberate violations:
Layer direction: a layer may only import from the layers below it. Importing @/features/... from entities/ fails with "the "entities" layer may not import from a layer above it".
Public API only: importing @/entities/recipe/model/types from a page fails with "Import a slice through its public API (index.ts)".
4. Mock data contracts
Entity types (entities/recipe/model/types.ts):
type RecipeId = string;
type Difficulty = 'easy' | 'medium' | 'hard';
interface Ingredient { name: string; quantity: string }
interface RecipeSummary {
id: RecipeId; title: string; summary: string; imageUrl: string;
cuisine: string; difficulty: Difficulty; totalMinutes: number;
servings: number; tags: string[];
}
interface Recipe extends RecipeSummary { ingredients: Ingredient[]; steps: string[] }
Service (entities/recipe/api/recipeApi.ts). When the backend exists, rewrite the function bodies and keep these signatures:
| Method | Returns | Planned real endpoint |
|---|---|---|
getRecipes() | Promise<RecipeSummary[]> | GET /recipes |
getRecipeById(id) | Promise<Recipe>, rejects with ApiError(404) | GET /recipes/:id |
getRecipesByIds(ids) | Promise<RecipeSummary[]>, unknown ids skipped | GET /recipes?ids=a,b |
Transport (shared/api/mockClient.ts): mockRequest<T>(resolver, { delayMs = 300 }) returns a structuredClone of the data after the delay, so components can't change the fixtures by accident. This is the one function to replace with fetch.
Favourites store (features/toggle-favourite/model/favouritesStore.ts):
interface FavouritesState { ids: RecipeId[]; toggle(id): void; clear(): void }
// persisted as localStorage['recipes-app:favourites'] = {"state":{"ids":[...]},"version":1}
// seeded with ['shakshuka'] so the favourites page isn't empty on first run
The store holds ids only. Recipe data always comes through recipeApi, so the favourites page can't show a stale copy of a recipe. Components subscribe through narrow selectors (useIsFavourite, useFavouritesCount, useToggleFavourite, ...), so one toggle re-renders one button and the badge, not the whole grid.
No component or page contains literal recipe data. Everything goes through recipeApi, then the entity hooks, then the UI.
5. Verification
| Check | Result |
|---|---|
npm run typecheck (tsc -b) | pass, 0 errors |
npm run lint | pass, 0 errors, 0 warnings |
prettier --check | pass, after formatting 4 files |
npm run build | pass, 67 modules, 326.5 kB JS (103.6 kB gzip) |
npm run dev | Vite ready in 269 ms on :5173; / returns 200 and a direct load of /recipes/shakshuka returns 200 |
Browser, / | 6 recipe cards; header badge 1 (the seeded favourite) |
| Save on Pierogi | badge 1 -> 2, aria-pressed=true, written to localStorage |
| Header -> Favourites | /favourites shows exactly Shakshuka and Pierogi |
| Card -> detail | /recipes/pierogi-ruskie: title, 5 ingredients, 4 steps |
| Un-save on the detail page | badge 2 -> 1 |
| Back link, Clear all, All recipes | each goes to the right route; Clear all shows the empty state with badge 0 |
Full reload of /favourites | the saved favourite (Miso Salmon) is still there |
/recipes/does-not-exist | shows the error message Recipe "does-not-exist" not found |
/no/such/page | the Not found page |
| Console, 5 page loads | 0 errors, 0 warnings (only Vite and React DevTools info lines) |
Fixes along the way:
1.
ESLint 9 was deprecated. npm warned that eslint@9.39.5 is no longer supported, so I upgraded to eslint@10 and @eslint/js@10. All the plugins in use support 10.
2.
Formatting. prettier --check flagged 4 files I had written: global.css, favouritesStore.ts, FavouriteButton.tsx and Button.tsx. I ran npm run format and the check now passes.
3.
Dev server shutdown. Stopping the npm run dev shell left the Vite node process running on port 5173. I stopped it and confirmed the port is free.
There were no runtime errors to fix. The app ran correctly on the first start.
6. Known gaps
There are no tests. No Vitest or Playwright is set up yet. Every card, button and page has a data-testid so tests can be added without editing components.
Cross-slice imports aren't blocked. FSD also forbids slices on the same layer importing each other (for example features/a importing features/b). The ESLint rules check layer direction and public-API imports but not this. @feature-sliced/steiger or eslint-plugin-boundaries would cover it.
No caching. useAsync is a minimal loader: it has no cache, deduplication or retries, so opening a page always refetches.
- The mock always succeeds. There's no way to simulate a slow network or a 500 without editing
mockClient.ts. - Placeholder visuals. Images are inline SVGs, and there's no search, filtering, pagination, auth or dark mode.
- One device only. Favourites live in this browser's
localStorage, so they don't sync across devices or users.
7. Next steps
Connect a real backend in one place. Replace the body of mockRequest with fetch (or point it at MSW handlers serving the same fixtures), and map the API's response to Recipe / RecipeSummary inside recipeApi. Nothing above entities/recipe/api needs to change.
2.
Replace useAsync with TanStack Query. Keep the hook names (useRecipes, useRecipe, useRecipesByIds) and mount QueryClientProvider in app/providers/AppProviders.tsx. Pages get caching and refetch-on-focus without being touched.
3.
Add a test setup: Vitest and Testing Library for favouritesStore and recipeApi, and one Playwright smoke test of the click-through in section 5, using the existing data-testids.
4. Add steiger (npx steiger src) to lint for FSD rules ESLint doesn't cover, cross-slice imports included.
5.
Build the next feature as a new slice. For example, search and filtering by tag, difficulty or time would go in features/filter-recipes/ (state plus a filter bar), with pages/recipe-list passing the filtered list to RecipeGrid.
6.
Sync favourites to the server once there are user accounts. Change toggle to send an optimistic POST/DELETE /me/favourites/:id, and keep persist as the offline cache. The store's version: 1 gives you a migration point.
global.css
ZIP · project files
Example file from a real run - the skill writes it into your workspace.
Subscription · always the latest version
- Secure checkout via Stripe
- Cancel anytime
- Delivered live via MCP
About this skill
Builds a runnable frontend skeleton from the architecture you name: Atomic Design, Feature-Sliced Design, micro frontends, a monorepo, component-driven, or a mix. The output is a project that starts, not a folder listing. Every layer has its directories and index files, pages are routed and linked, components read typed mock data through a thin service, and state is wired where the architecture needs it.
What it does
It drafts a numbered plan (every directory, config file, route, component and mock) and waits for your approval, unless you approve up front. Then it initialises the project, installs dependencies, configures TypeScript, ESLint and Prettier, generates the structure, starts the dev server, and checks that the app boots. Anything that breaks is fixed and logged. The final report covers the architecture decisions, a route map, a directory map, the mock data contracts, the fixes it had to make, and the next steps, which say where real features go.
Try it first
Say "scaffold a React + Vite + TypeScript skeleton using Feature-Sliced Design for a recipe site, with mocked data". Run npm run dev and click through the pages.
What it needs
Bash, Node and npm, and network access for npm install. It reads and writes only inside the new project folder. Works with React, Vue, Svelte and Angular stacks.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.
It's a skeleton: the data is mocked and there is no backend, authentication or real API until you add them. It installs the latest compatible packages, so versions differ from run to run. Tests aren't generated; the report says where they would go. A micro-frontend or monorepo setup gets a working local shell, not production deployment configuration.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 27 days ago