project-structure

project-structure is a cursor rule for Cursor from kws-projects/react-boilerplate. It costs 920 tokens per session, scanned A, original, MIT.

A set of project rules describing the structure and conventions of a React, Vite, and TypeScript application. React is a user-interface library, Vite is a build tool, and TypeScript adds types to JavaScript.

In plain words
What is it for?
Use it when adding routes, features, shared components, providers, or UI components so new code follows the project layout.
Why use it?
It tells the coding agent where files belong and how application code should import and organise them.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding routes, features, shared components, providers, or UI components so new code follows the project layout.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kws-projects/react-boilerplate/project-structure
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/kws-projects/react-boilerplate

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for project-structure

README.md
[![agentmods](https://agentmods.dev/badge/rules/kws-projects/react-boilerplate/project-structure/github.svg)](https://agentmods.dev/rules/kws-projects/react-boilerplate/project-structure)
Your own site
<a href="https://agentmods.dev/rules/kws-projects/react-boilerplate/project-structure"><img src="https://agentmods.dev/badge/rules/kws-projects/react-boilerplate/project-structure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for project-structure

Your own site · 80×15
<a href="https://agentmods.dev/rules/kws-projects/react-boilerplate/project-structure"><img src="https://agentmods.dev/badge/rules/kws-projects/react-boilerplate/project-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 920 This file is loaded in full into every session.
When invoked 920 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00920 $0.00920
Opus 5.5 $0.00368 $0.00368
Sonnet 5.5 $0.00184 $0.00184
Haiku 4.5 $0.00092 $0.00092

Measured 1mo ago against content hash acc6e02aff5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

project-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/project-structure.mdc · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project Structure

This is a React + Vite + TypeScript app. Use the @/ alias for imports from src (e.g. @/components/ui/Button). Never use long relative paths like ../../../.

Folders (src/)

  • app/ - application shell. App.tsx mounts the router inside the providers; app/providers/ composes global providers (Helmet, React Query, Theme, Direction, i18n); app/router.tsx defines routes (react-router-dom). Add new routes as children of the root layout, pointing at feature pages.
  • components/ - shared, reusable components used across features.
    • components/layout/ - layout components (e.g. RootLayout.tsx with the header and <Outlet />).
    • components/shadcn/ - pristine, vendored shadcn/ui originals. Never import these directly in app code; treat as vendored for easy upgrades.
    • components/ui/ - project-facing components that wrap (re-export or extend) the shadcn/ originals. App code imports only from here. See the add-shadcn-component skill for the full workflow.
  • features/<feature>/ - feature modules. Each feature owns its slice and may contain components/, hooks/, api/, and types/. Features should not import from each other's internals; share via components/, lib/, or hooks/.
  • lib/ - cross-cutting utilities and third-party integration adapters (utils.ts, analytics.ts, monitoring.ts). Wrap external SDKs behind a thin interface here so call sites stay decoupled. Never import @sentry/react or call window.gtag outside of the adapters in lib/.
  • config/ - typed configuration. env.ts is the single source of truth for environment variables; do not read import.meta.env directly elsewhere.
  • i18n/ - i18next config and locales/<lang>/<namespace>.json.
  • hooks/ - shared hooks not tied to a single feature. Includes useAnalytics, useMonitoring, and usePageTracking.
  • types/ - shared TypeScript types. Includes typed GA4 event definitions (analytics.ts), monitoring types (monitoring.ts), and window augmentation (global.d.ts).
  • test/ - global Vitest setup and shared helpers (renderWithProviders). This is distinct from the per-directory __tests__/ folders described below.

Read the full file on GitHub · 69 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 69 lines · 920 tokens per session scan A acc6e02aff5c

Subscribe to this mod's changes

project-structure is a cursor rule published in the GitHub repository kws-projects/react-boilerplate (3 stars, last pushed 4mo ago), licensed MIT. It adds 920 tokens to every session, about $0.0037 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.