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>
@pyre/db
Database schema, migrations, and table definitions for PYRE (PostgreSQL).
Purpose
Per §13: the schema, migrations, and table definitions. Uses pg for
connectivity. Connection details come from DATABASE_URL via @pyre/config —
never hardcode credentials.
Tables (§15)
Initial MVP tables
wallet_scans— id, wallet, status, created_at, completed_at, summary_jsontoken_accounts— id, scan_id, wallet, ata, mint, token_program, raw_balance, ui_balance, decimals, symbol, name, classification, warnings_json, estimated_rent_lamports, created_atcleanup_receipts— id, wallet, scan_id, tx_signature, rent_returned_lamports, closed_accounts_count, burned_tokens_count, status, created_at, receipt_jsonprometheus_generations— id, receipt_id, input_json, output_json, status, risk_flags_json, created_at, approved_at, rejected_atspawn_records— id, generation_id, spawn_name, ticker, mint, metadata_uri, pumpfun_url, launch_tx, status, created_at
Future tables
token_classificationsburn_eventsclose_account_eventsspawn_candidatessystem_events
Status
Skeleton. Exports table-name constants and a connection-factory stub. No queries, no schema DDL, no migrations yet.
TODO
- Implement the
createPool()connection factory (readDATABASE_URLvia@pyre/config). - Add SQL migrations under
migrations/and a migration runner. - Add typed table definitions and a query layer.