CLAUDE.md@apps/serverA
CLAUDE.md@apps/server from ximing/vital is a CLAUDE.md file: the standing instructions Claude Code reads in that repo.
mdr add ximing/vital/apps/server/CLAUDE.md@git:20261021.2674a2aPins git:20261021.2674a2a in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- CLAUDE.md file
- Repository
- ximing/vital
- Path
apps/server/CLAUDE.md- Versions recorded
- 1
- Latest version
- git:20261021.2674a2a, committed Oct 21, 2026
- Size
- 2,938 bytes
- Repository stars
- 3
- License
- none declared
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# `@vital/server` — 服务端指令 ## 这个目录负责什么 - 承载 Vital 的 HTTP API 服务(Fastify 5,默认端口 `3010`)与独立后台进程 `src/worker.ts`。 - 负责 PostgreSQL(Drizzle ORM)数据持久化、鉴权(Web Origin 下 Cookie + 其他端 Bearer / `vt_` 个人令牌)、文章抽取、S3 附件签名、通知投递、检索召回(Meilisearch / Qdrant)以及内置后台 Agent 调度与执行。 ## 放置约束 - **放什么**: - `src/<domain>/<domain>.routes.ts`:Fastify 路由注册、入参/出参 Zod DTO 校验与 HTTP 状态码映射。 - `src/<domain>/<domain>.service.ts`:业务领域逻辑、跨表事务、归属校验与级联清理。 - `src/db/schema/`:Drizzle 表结构定义(严禁使用 `.references()` 外键),并统一从 `src/db/schema.ts` 导出。 - `src/agent/`:后台 Agent 调度(`scheduler.ts` / `scheduling.ts`)、租约与任务执行(`jobs.ts` / `job-runtime.ts`)、记忆蒸馏与对话(`chat/`)。 - `__tests__/`:按业务域组织的集成与单元测试,数据库清理统一维护在 `__tests__/helpers/db.ts`。 - **不放什么**: - 不要把前后端共享的请求/响应 Zod Schema 只写在服务端内部;共享契约应放在 `packages/dto`。 - 不要在路由层(`*.routes.ts`)直接拼装多表 SQL 事务,复杂写入应下沉到 `*.service.ts`。 - 不要在进程内存中维护 Agent 防抖、冷却、预算或待执行任务状态,所有调度状态必须落库 PostgreSQL。 ## 开发偏好与局部范式 1. **服务层接管数据一致性**: - 写入引用 ID 前,必须先校验目标行存在且 `user_id` 属于当前用户。 - 触及两张及以上表的写操作(父子表、关联表、outbox、历史记录、调度事件)必须包裹在同一个 `getDb().transaction` 中。 - 硬删除父记录时必须在同一事务内清理或置空子记录;软删除(`deleted_at`)可保留子记录以支持恢复。 2. **Schema 与 Worker 同步**: …
Read the whole file at its exact version.
How to install
mdr add ximing/vital/apps/server/CLAUDE.md@sha256:8ff11cf3680691f6The line at the top of this page pins the label git:20261021.2674a2a, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_sjao4robnzlxamfu)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Oct 21, 2026.
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (2938 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
ximing/vital · 3 stars · license none declared · pushed 2026-10-21 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_sjao4robnzlxamfu GET https://markdownregistry.com/api/v1/resolve?ref=ximing/vital/apps/server/CLAUDE.md GET https://markdownregistry.com/api/v1/blob/8ff11cf3680691f612fa2f18ff626074d5be9afde24f937ab16209da0e97ef28
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: what a CLAUDE.md file is · keeping AGENTS.md and CLAUDE.md in sync · which agent file does what.