Files
RogueWave c20094ab56 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>
2026-05-31 02:20:55 +00:00
..

@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/confignever hardcode credentials.

Tables (§15)

Initial MVP tables

  • wallet_scans — id, wallet, status, created_at, completed_at, summary_json
  • token_accounts — id, scan_id, wallet, ata, mint, token_program, raw_balance, ui_balance, decimals, symbol, name, classification, warnings_json, estimated_rent_lamports, created_at
  • cleanup_receipts — id, wallet, scan_id, tx_signature, rent_returned_lamports, closed_accounts_count, burned_tokens_count, status, created_at, receipt_json
  • prometheus_generations — id, receipt_id, input_json, output_json, status, risk_flags_json, created_at, approved_at, rejected_at
  • spawn_records — id, generation_id, spawn_name, ticker, mint, metadata_uri, pumpfun_url, launch_tx, status, created_at

Future tables

  • token_classifications
  • burn_events
  • close_account_events
  • spawn_candidates
  • system_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 (read DATABASE_URL via @pyre/config).
  • Add SQL migrations under migrations/ and a migration runner.
  • Add typed table definitions and a query layer.