fastapi-react-admin CLAUDE.md

Project instructions for a web application built with FastAPI and React, including its structure, rules, and development commands. They explain where different kinds of work belong and how to keep the documentation current.

In plain words
What is it for?
Use them when adding pages, changing navigation or settings, modifying uploads, updating branding, or working across the project's frontend and backend.
Why use it?
They help an AI coding assistant make changes consistently in a large project without breaking its architecture or silently violating project rules.

Instructions file

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 instructions/yilecoding/fastapi-react-admin/claude-md
Clone the repo
git clone --depth 1 https://github.com/yilecoding/fastapi-react-admin
Per session 7,257 This file is loaded in full into every session.
When invoked 7,257 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.07257 $0.07257
Opus 5 $0.03629 $0.03629
Sonnet 5 $0.01451 $0.01451
Haiku 4.5 $0.00726 $0.00726

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

Security

Grade A, and why

fastapi-react-admin CLAUDE.md 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.

CLAUDE.md · 412 lines

How it starts

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

CLAUDE.md

fastapi-react-admin —— 中后台底座。产品标识集中在 apps/web/src/lib/brand.ts (改名字、改版本只动那一处)。

后端 fork 自 fastapi-best-architecture(FBA) 并新增 SQL Server 支持(现在同时支持 MySQL / PostgreSQL / SQL Server 三种数据库, 前两种沿用上游、SQL Server 是本仓库加的那一种);三层结构、插件机制、RBAC 与 数据权限模型都是 FBA 的设计,归属细节见下面「fork 管理」一节。 前端基于 React 19 + TanStack Router/Query/Table v9 + shadcn(Base UI 底座)。

架构的承重方式是榫卯:i18n ← ui ← platform ← web 严格单向,每层只暴露形状 (组件 / 契约 / 页面),不靠胶水互相粘。登录页那枚咬合标记(TenonMark) 表示的就是这个,不是项目名。

同一枚榫卯套进纯色圆形徽章,就是浏览器标签页 / 桌面端窗口与安装包用的那个 logo —— TenonMark 本身留给有主题背景的场合(侧边栏、登录页)继续用 currentColor 裸跑。 两者是同一份图形的两种呈现,唯一真相源是 scripts/gen-brand-icons.mjs; 改了图形或配色,跑 pnpm brand:icons 重新生成 favicon 与桌面图标,不要手改生成产物。

这份文档是踩坑记录与硬纪律的唯一一份。 全是实测出来的结论, 不是风格偏好 —— 违反了会坏,而且多数是静默地坏。

按任务导航

这份根文件只放跨模块的东西(结构 · 起服务 · 硬纪律)。模块级的踩坑记录 拆进了各自目录的 AGENTS.md —— Claude Code 读到那个目录下的文件时会自动 把它加载进上下文,不用你手动指。人要查的话按下表直接翻:

我要…
第一次上手 本文件的「结构」·「本地起服务」·「硬纪律」(必读)
加列表页 / CRUD 页 · 主从页 · 监控页 packages/platform/src/pages/AGENTS.md
加设置屏 —— 骨架本身 / 参数配置那种 _shared 分册 / config 分册
动多页签 / 标签条 / 偏好设置 / 侧边栏 packages/platform/src/shell/AGENTS.md
动文件上传 / 预览 / 附件 packages/platform/src/pages/file/AGENTS.md
动消息通知 / 铃铛 / 收件箱 packages/platform/src/pages/notification/AGENTS.md
动查询区 / 筛选条件 packages/ui/src/components/query-bar/AGENTS.md
动富文本 / 正文里的图片 packages/ui/src/components/rich-text/AGENTS.md
挑组件 / 改尺寸覆盖不生效 packages/ui/AGENTS.md
加文案 / 动多语言 packages/i18n/AGENTS.md
显示时间 / 动时区 packages/i18n/AGENTS.md 的「服务端时间一律过 src/datetime.ts
动后端模型 / 接口 / SQL · 跑 pytest apps/api/AGENTS.md
动定时任务 / Celery / 调度 apps/api/backend/app/task/AGENTS.md
动命令面板 / 快捷键 packages/platform/src/shell/AGENTS.md
动构建注入 / 发版提示 / 错误页 apps/web/AGENTS.md
桌面端打包 / 发版 / 自动更新 apps/desktop/AGENTS.md
写或跑前端 E2E apps/web/e2e/AGENTS.md
动菜单 / 权限 / 死链判定 硬纪律 6 + pages/menu/AGENTS.md

Read the full file on GitHub · 412 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 · 412 lines · 7,257 tokens per session scan A 6904fa2ef383

Subscribe to this mod's changes

fastapi-react-admin CLAUDE.md is an instructions file published in the GitHub repository yilecoding/fastapi-react-admin (11 stars, last pushed 2d ago), licensed MIT. It adds 7,257 tokens to every session, about $0.0363 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-08-30.