Summary
Write a short guide on how src/lib/anchors.ts sources anchor data and what's required (config, API keys, review) to onboard a new anchor.
Difficulty
Intermediate — estimated effort: ~1-2 days. Labels: documentation, backend, intermediate
Where to Work
How to Approach This
- Locate the relevant file(s) below under
src/app/api/ or src/lib/.
- Check
src/lib/api-response.ts and follow its existing success/error response shape — don't invent a new one.
- If you're touching validation, add/extend a Zod schema in
src/lib/validations.ts rather than validating inline.
- If the change affects the database, check
prisma/schema.prisma first and run npx prisma generate after any schema edit.
- Add or update tests near the affected route/lib file (create a
__tests__ folder alongside it if one doesn't exist yet, matching the project's existing test conventions).
- Manually verify with
npm run dev and a tool like curl or Postman/Insomnia against the affected endpoint before opening a PR.
Acceptance Criteria
Notes for Contributors
Comment on this issue before starting so it can be assigned to you and duplicate work is avoided. If the described approach doesn't quite fit once you're in the code (e.g. the file has moved, or there's a cleaner way to do it), that's fine — leave a comment explaining the deviation in your PR description rather than silently changing scope.
Summary
Write a short guide on how
src/lib/anchors.tssources anchor data and what's required (config, API keys, review) to onboard a new anchor.Difficulty
Intermediate — estimated effort: ~1-2 days. Labels:
documentation,backend,intermediateWhere to Work
src/lib/anchors.tsHow to Approach This
src/app/api/orsrc/lib/.src/lib/api-response.tsand follow its existing success/error response shape — don't invent a new one.src/lib/validations.tsrather than validating inline.prisma/schema.prismafirst and runnpx prisma generateafter any schema edit.__tests__folder alongside it if one doesn't exist yet, matching the project's existing test conventions).npm run devand a tool likecurlor Postman/Insomnia against the affected endpoint before opening a PR.Acceptance Criteria
src/lib/api-response.ts.src/lib/validations.ts, not inline.npm run dev).npm run lint,tsc --noEmit).Notes for Contributors
Comment on this issue before starting so it can be assigned to you and duplicate work is avoided. If the described approach doesn't quite fit once you're in the code (e.g. the file has moved, or there's a cleaner way to do it), that's fine — leave a comment explaining the deviation in your PR description rather than silently changing scope.