frontend_overview_rules

A set of rules describing the frontend structure of an application. The frontend is the part users see and interact with in a web browser, and the rules cover routes, reusable components, hooks, services, and shared types.

In plain words
What is it for?
Use it when deciding where to add pages, feature components, shared components, authentication or chat hooks, API services, utilities, and shared type definitions.
Why use it?
It gives developers a common place and responsibility for each kind of frontend code. This reduces duplicated UI, misplaced API calls, and inconsistent dependency choices.

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/modelengine-group/nexent/frontend_overview_rules
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/nexent

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,056 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.01056
Opus 5 $0.00000 $0.00528
Sonnet 5 $0.00000 $0.00211
Haiku 4.5 $0.00000 $0.00106

Measured 2d ago against content hash 283fac418b91, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend_overview_rules 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 2d 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/frontend/frontend_overview_rules.mdc · 83 lines

How it starts

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

Frontend Overview

Directory Structure

frontend/
├── app/[locale]/              # Routes with i18n (Next.js App Router)
│   ├── layout.tsx, page.tsx    # Root layout and home
│   ├── i18n.tsx                # i18n config
│   └── {feature}/              # e.g. chat, agents, knowledges, models
│       ├── page.tsx            # Page entry (thin wrapper)
│       ├── components/         # Feature-specific components
│       └── {submodule}/        # e.g. versions/
├── components/                 # Cross-feature reusable components
│   ├── auth/                   # Auth-related UI
│   ├── providers/              # Global context providers
│   └── ...                     # Base UI: use Ant Design; avoid custom wrappers
├── hooks/                      # Custom hooks (organized by domain)
│   ├── auth/                   # useSessionManager, useAuthentication, etc.
│   ├── agent/                  # useAgentList, useAgentInfo, etc.
│   ├── chat/                   # useConversationManagement, etc.
│   └── ...
├── services/                   # API calls (api.ts, *Service.ts)
├── lib/                        # Utilities (logger, session, utils, etc.)
├── types/                      # Shared type definitions
├── const/                      # Constants and config
├── stores/                     # Global state stores (if any)
├── styles/                     # Global styles (theme, reset, AntD overrides)
└── public/                     # Static assets

Layer Responsibilities

Directory Purpose Notes
app/[locale]/{feature}/page.tsx Route entry, auth guard, config load Thin wrapper; delegate UI to internal/components
app/.../components/ Feature-only UI pieces Ant Design first; Lucide icons primary, @ant-design/icons fallback
components/ Shared UI across features Ant Design first; Lucide icons primary, @ant-design/icons fallback
hooks/ State and side-effects Shared API data: use TanStack React Query (useQuery); client-side filter/sort: useMemo on query data; mutations: useMutation + queryClient.invalidateQueries
services/ API calls
lib/ Pure utilities
types/ Type definitions only interface, type only; do not store constants
const/ Runtime constants Literals, enums, config objects, status codes; do not store interface/type
styles/ Global styles Theme vars, reset, AntD overrides only; component-specific CSS: colocate in component (e.g. *.module.css)

Read the full file on GitHub · 83 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. 2d ago First seen · 83 lines · 0 tokens per session scan A 283fac418b91

Subscribe to this mod's changes

frontend_overview_rules is a cursor rule published in the GitHub repository ModelEngine-Group/nexent (5,841 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,056 tokens. 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-30.