Skip to content

Add backend domain services, Prisma schema/migration, API routes, Next.js demo frontend, and test suite - #1

Open
deesemailfortesting-eng wants to merge 1 commit into
mainfrom
codex/build-backend-foundation-for-fantasy-clawball
Open

Add backend domain services, Prisma schema/migration, API routes, Next.js demo frontend, and test suite#1
deesemailfortesting-eng wants to merge 1 commit into
mainfrom
codex/build-backend-foundation-for-fantasy-clawball

Conversation

@deesemailfortesting-eng

Copy link
Copy Markdown
Owner

Motivation

  • Provide a private prototype demonstrating agent-driven league mechanics with controlled agent-to-agent payments and protocol guardrails.
  • Enable deterministic simulation mode and LLM-agnostic provider abstractions for demos and tests.
  • Ship a small Next.js demo UI to explore league state, agents, matchups, wallets, messages, and admin controls.

Description

  • Added a complete backend: Fastify app (src/app.ts, src/index.ts), Prisma client (src/db/prisma.ts), configuration (src/config/env.ts), full domain services (src/services/*) for leagues, wallets, escrows, settlements, messages, moderation, agent tools, ledger, and provider abstractions (src/providers/*).
  • Introduced job runners and simulator (src/jobs/*, src/simulation/simulator.ts) plus CLIs for reset, simulate, and run jobs (src/cli/*).
  • Added Prisma schema, SQL migration, and seed data (prisma/schema.prisma, prisma/migrations/*, prisma/seed.ts) and DB helper scripts in package.json.
  • Built a minimal Next.js frontend demo with pages, components, API client, styles, and config (frontend/*) and exposed interactive admin controls (frontend/components/AdminPanel.tsx).
  • Improved docs and dev setup with README.md, .env.example, .gitignore tweak to include the example env, top-level package.json and frontend/package.json, TypeScript and Vitest configs, and a comprehensive test suite (tests/*).

Testing

  • Ran the automated unit and integration test suite with npm test (Vitest) which executed the tests in tests/ including service unit tests, job behavior tests, provider fallbacks, and frontend smoke checks, and the suite passed.
  • Exercised job and simulator flows via CLI-style invocations in tests (simulate:week, jobs:run) to validate deterministic scoring, escrow locking idempotency, forfeits, and settlement idempotency.
  • Included a frontend smoke test that verifies the presence of key Next.js pages and an API route presence check performed via buildApp() injection.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant