chore: scaffold PYRE MVP monorepo (structure + docs)

pnpm + TypeScript workspace per design doc §13:
- apps/{web,api,worker} skeletons (Next.js 16, Fastify 5, BullMQ)
- packages/{core,solana,prometheus,db,config} (core has real types/DTOs;
  solana/prometheus are stubs)
- programs/pyre-core placeholder (future Anchor, v1.0)
- docs/: PYRE_MVP_DESIGN (canonical), ARCHITECTURE, SECURITY, TOKEN_CLASSIFICATION
- CLAUDE.md, README, .env.example (no private-key var by design)

Skeleton + docs only — no Solana/business logic yet. All workspaces typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 02:20:55 +00:00
parent e86b57e00f
commit c20094ab56
65 changed files with 13834 additions and 1 deletions

36
apps/worker/README.md Normal file
View File

@@ -0,0 +1,36 @@
# @pyre/worker
PYRE background worker process. **Skeleton only** — no job logic is implemented
yet (see [`CLAUDE.md`](../../CLAUDE.md), §13).
Stack: Node.js worker + BullMQ + Redis (`ioredis`), with `@pyre/db`,
`@pyre/config`, `@pyre/core`, and `@pyre/prometheus`. AI services are API-based
only — do not run local LLMs or image models.
## Responsibilities (§13)
Slow token metadata enrichment, AI generation jobs, image-prompt generation,
safety checks, ticker/name collision checks, background confirmation tracking,
receipt enrichment.
## Job types to implement — TODO
- [ ] `metadata-lookup` — async token metadata enrichment for scanned accounts.
- [ ] `prometheus-generate` — AI Spawn generation (name/ticker/lore/image prompt)
via `@pyre/prometheus`.
- [ ] `safety-check` — moderation + forbidden-term + ticker/name collision checks.
- [ ] `tx-confirmation-watch` — track on-chain confirmation of submitted txs.
- [ ] `receipt-enrichment` — enrich stored cleanup receipts post-confirmation.
## AI safety rules (§16)
Filter generated names/tickers/lore; avoid hate, explicit, extremist,
copyrighted, impersonation, and scam-like outputs; require human approval before
first launches.
## Scripts
- `dev``tsx watch src/index.ts`
- `build``tsc -p tsconfig.json`
- `typecheck``tsc --noEmit`
- `lint` / `test` — placeholders for now

27
apps/worker/package.json Normal file
View File

@@ -0,0 +1,27 @@
{
"name": "@pyre/worker",
"version": "0.1.0",
"private": true,
"type": "module",
"description": "PYRE background worker (BullMQ) — async metadata lookup, AI generation, safety checks, tx-confirmation watcher, receipt enrichment.",
"scripts": {
"build": "tsc -p tsconfig.json",
"dev": "tsx watch src/index.ts",
"typecheck": "tsc --noEmit",
"lint": "echo \"TODO: lint\"",
"test": "echo \"TODO: tests\""
},
"dependencies": {
"@pyre/config": "workspace:*",
"@pyre/core": "workspace:*",
"@pyre/db": "workspace:*",
"@pyre/prometheus": "workspace:*",
"bullmq": "^5.34.0",
"ioredis": "^5.4.2"
},
"devDependencies": {
"@types/node": "^22.10.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
}
}

26
apps/worker/src/index.ts Normal file
View File

@@ -0,0 +1,26 @@
// PYRE background worker — SKELETON ONLY.
//
// Minimal bootstrap stub. No queues or processors are wired up yet, and no real
// job logic is implemented. AI services are API-based only (§11) — never run
// local LLMs or image models on the server.
// TODO: construct the Redis connection (ioredis) from @pyre/config and create a
// BullMQ Worker per queue below, each delegating to a typed processor.
//
// Job types to implement (§13):
// - metadata-lookup : async token metadata enrichment for scanned accounts
// - prometheus-generate : AI Spawn generation via @pyre/prometheus
// - safety-check : moderation + forbidden-term + ticker/name collision checks
// - tx-confirmation-watch : background tracking of on-chain tx confirmation
// - receipt-enrichment : enrich stored cleanup receipts post-confirmation
//
// AI safety (§16): filter generated names/tickers/lore; block hate, explicit,
// extremist, copyrighted, impersonation, and scam-like outputs; require human
// approval before any launch.
function main(): void {
// TODO: start BullMQ workers and register graceful shutdown handlers.
console.log("@pyre/worker: skeleton bootstrap — no jobs registered yet");
}
main();

View File

@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}