The mock data layer is spread across several top-level files: lib/mock-bounty.ts, lib/mock-model4.ts, lib/mock-leaderboard.ts, lib/mock-wallet.ts, lib/mock-project.ts, lib/mock-data.ts. They're imported from random places across the codebase with no consistent convention, and there's no single place to flip between data sources.
Move them into lib/mock/ and expose factory functions so we can swap data sources in one place later.
What to do
Create lib/mock/ with subfiles per domain:
lib/mock/bounties.ts
lib/mock/leaderboard.ts
lib/mock/wallet.ts
lib/mock/projects.ts
lib/mock/model4.ts
Each file should export factory functions (makeMockBounty(overrides?), makeMockLeaderboardEntry(...), etc.) rather than static arrays where possible, so tests and stories can build fixtures inline.
Add lib/mock/index.ts that re-exports everything.
Find and replace all imports across the codebase. Delete the old top-level files.
Acceptance criteria
- All mock imports come from
@/lib/mock/... or @/lib/mock
- No remaining
lib/mock-*.ts files at the top level
pnpm tsc --noEmit and pnpm lint pass
- No behavioral change in the app
Files
lib/mock-*.ts (delete)
lib/mock/* (new)
- All importers across
app/, components/, hooks/
The mock data layer is spread across several top-level files:
lib/mock-bounty.ts,lib/mock-model4.ts,lib/mock-leaderboard.ts,lib/mock-wallet.ts,lib/mock-project.ts,lib/mock-data.ts. They're imported from random places across the codebase with no consistent convention, and there's no single place to flip between data sources.Move them into
lib/mock/and expose factory functions so we can swap data sources in one place later.What to do
Create
lib/mock/with subfiles per domain:lib/mock/bounties.tslib/mock/leaderboard.tslib/mock/wallet.tslib/mock/projects.tslib/mock/model4.tsEach file should export factory functions (
makeMockBounty(overrides?),makeMockLeaderboardEntry(...), etc.) rather than static arrays where possible, so tests and stories can build fixtures inline.Add
lib/mock/index.tsthat re-exports everything.Find and replace all imports across the codebase. Delete the old top-level files.
Acceptance criteria
@/lib/mock/...or@/lib/mocklib/mock-*.tsfiles at the top levelpnpm tsc --noEmitandpnpm lintpassFiles
lib/mock-*.ts(delete)lib/mock/*(new)app/,components/,hooks/