Skip to content

docs: JSDoc for service functions, env var table, deprecation policy, and ADRs#627

Open
richardiyamura wants to merge 1 commit into
Ethereal-Future:mainfrom
richardiyamura:feat/issues-507-508-509-510-jsdoc-docs-changelog-adrs
Open

docs: JSDoc for service functions, env var table, deprecation policy, and ADRs#627
richardiyamura wants to merge 1 commit into
Ethereal-Future:mainfrom
richardiyamura:feat/issues-507-508-509-510-jsdoc-docs-changelog-adrs

Conversation

@richardiyamura
Copy link
Copy Markdown

@richardiyamura richardiyamura commented Jun 1, 2026

Summary

  • Add JSDoc comments to all exported service functions #507 — JSDoc on all exported service functions: Added complete @param, @returns, @throws, and @example tags to every exported function in backend/src/services/stellar.js, transactions.js, streaming.js, and multiSig.js. Previously these functions had no tags, making it impossible to understand parameter types or return shapes without reading the full implementation.

closes #507

  • Document all environment variables with types, defaults, and examples #508 — Full env var documentation: Added a Quick Start section to backend/CONFIGURATION.md with the three variables needed to run locally, followed by a complete reference table of every env var grouped by concern (Core, Stellar, Security, Database, Caching, CDN, etc.). Each entry includes type, required/optional status, default, description, and an example value. Secrets requiring rotation are flagged with 🔑.

closes #508

  • Add API changelog and deprecation policy #509 — API deprecation policy + middleware: Added a Deprecation Policy section to CHANGELOG.md documenting the 90-day minimum notice requirement, header conventions, and link to the next version. Created backend/src/middleware/deprecation.js — a reusable deprecate({ sunset, deprecatedSince, link }) Express middleware that attaches RFC 8594 Deprecation, Sunset, and Link response headers and throws at startup if the notice window is shorter than 90 days.

closes #509

  • Add architecture decision records (ADRs) #510 — Architecture Decision Records: Created docs/adr/ with MADR-format ADRs for all four decisions called out in the issue. Each ADR includes Context, Decision Drivers, all Considered Options with Pros/Cons, and the chosen outcome with justification. The ADR index is linked from README.md.

closes #510

ADR Decision
ADR-0001 Stellar blockchain over Ethereum / XRP / Polygon
ADR-0002 Prisma ORM over Knex / Drizzle / raw pg
ADR-0003 Multi-level cache (in-memory L1 + optional Redis L2)
ADR-0004 JWT + refresh token rotation over session cookies

Test plan

  • Review JSDoc on each service file — confirm @param names match the actual parameter names, @returns types are accurate, and @throws conditions are correct
  • Verify backend/CONFIGURATION.md Quick Start table matches env.example.txt and backend/src/config/env.js validation logic
  • Manually test deprecate() middleware: mount it on a test route and confirm the three headers appear in the response; confirm it throws when sunset is less than 90 days out
  • Read through each ADR for factual accuracy against the codebase
  • Confirm README.md ADR links resolve correctly

… and ADRs

Closes Ethereal-Future#507, Ethereal-Future#508, Ethereal-Future#509, Ethereal-Future#510

- Ethereal-Future#507 — Add JSDoc (@param, @returns, @throws, @example) to every exported
  function in stellar.js, transactions.js, streaming.js, and multiSig.js
- Ethereal-Future#508 — Expand backend/CONFIGURATION.md with a Quick Start section and a
  complete env var reference table (type, required/optional, default,
  description, example); mark secrets requiring rotation with 🔑
- Ethereal-Future#509 — Add a Deprecation Policy section to CHANGELOG.md documenting the
  90-day notice requirement; add backend/src/middleware/deprecation.js with
  a reusable `deprecate()` Express middleware that sets RFC 8594
  Deprecation, Sunset, and Link headers and enforces the notice period
- Ethereal-Future#510 — Create docs/adr/ with MADR-format ADRs for the Stellar blockchain
  choice (ADR-0001), Prisma ORM (ADR-0002), multi-level caching strategy
  (ADR-0003), and JWT auth with refresh token rotation (ADR-0004); link
  the ADR index from README.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@richardiyamura Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

1 participant