frontend

This rule provides comprehensive guidance for front-end development in Igniter.js + Next.js + Shadcn UI projects, ensuring consistent architecture, component patterns, and seamless integration with existing workflows.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/felipebarcelospro/igniter-js/frontend
Clone the repo
git clone --depth 1 https://github.com/felipebarcelospro/igniter-js

Made for: Cursor.

Per session 6,832 This file is loaded in full into every session.
When invoked 6,832 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.06832 $0.06832
Opus 5 $0.03416 $0.03416
Sonnet 5 $0.01366 $0.01366
Haiku 4.5 $0.00683 $0.00683

Measured today against content hash 93b24b082eb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend 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 today.

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.

apps/starter-nextjs/.cursor/rules/frontend.mdc · 988 lines

How it starts

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

Front-End Development Workflow

This rule provides comprehensive guidance for front-end development in Igniter.js + Next.js + Shadcn UI projects, ensuring consistent architecture, component patterns, and seamless integration with existing workflows.

1. Project Architecture & File Organization

1.1 Mandatory Project Structure

Presentation Layer Organization:

src/features/[feature]/presentation/
├── components/           # UI components (client/server)
│   ├── [component].tsx
│   ├── [component].client.tsx    # Client-only components
│   └── [component].server.tsx    # Server-only components
├── hooks/               # React hooks (useXxx patterns)
│   ├── use-[feature].tsx
│   └── use-[feature]-form.tsx
├── contexts/            # React contexts for state management
│   └── [feature]-context.tsx
├── utils/              # Pure utility functions
│   └── [specific-util-for-feature].ts // 1 util per file
└── types/              # Local type definitions
    └── [feature]-types.ts

Component File Naming Convention:

// ✅ CORRECT - Consistent naming
src/features/auth/presentation/
├── components/
│   ├── login-form.client.tsx      # Client component
│   ├── signup-form.client.tsx     # Client component
│   └── user-avatar.server.tsx     # Server component
├── hooks/
│   ├── use-auth-context.tsx       # Context hook
│   └── use-auth-form.tsx          # Form hook
└── contexts/
    └── auth-context.tsx           # React context

1.2 Component Architecture Patterns

Server vs Client Components:

// ✅ CORRECT - Server component (default)
export default function BoardList({ boards }: { boards: Board[] }) {
  return (
    <div>
      {boards.map(board => (
        <BoardCard key={board.id} board={board} />
      ))}
    </div>
  )
}

// ✅ CORRECT - Client component (interactive)
'use client'

export function BoardCard({ board }: { board: Board }) {
  const [isEditing, setIsEditing] = useState(false)

  return (
    <Card onClick={() => setIsEditing(true)}>
      {/* Interactive content */}
    </Card>
  )
}

Read the full file on GitHub · 988 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. today First seen · 988 lines · 6,832 tokens per session scan A 93b24b082eb1

Subscribe to this mod's changes

frontend is a cursor rule published in the GitHub repository felipebarcelospro/igniter-js (242 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 6,832 tokens to every session, about $0.0342 per session on Opus 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-09-01.