mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 12:52:11 +03:00
T-30 — ADRs:
- 6 ADRs: SQLite, Fallback Strategy, OAuth, JS+JSDoc, Single-Tenant, Translator Registry
T-33 — JSDoc Coverage:
- Full JSDoc on all new modules (100% exported functions documented)
T-35 — Accessibility:
- a11yAudit.js: lightweight WCAG AA checker (aria-label, dialog role, alt text, labels)
T-38 — Password Reset CLI:
- bin/reset-password.mjs: interactive CLI tool for admin password reset
T-39 — Playwright Specs:
- tests/e2e/responsiveSpecs.mjs: viewports (375/768/1280), 4 pages, test matrix
T-42 — Eval Framework:
- evalRunner.js: 4 strategies (exact, contains, regex, custom) + golden set (10 cases)
T-43 — Compliance:
- audit_log table, noLog opt-out per API key, LOG_RETENTION_DAYS cleanup
TASKS.md: 46/46 Concluído ✅
Tests: 144/144 pass (119 existing + 25 new)
1.4 KiB
1.4 KiB
ADR-004: JavaScript + JSDoc over TypeScript
Date: 2025-10-01
Status: Accepted
Deciders: @diegosouzapw
Context
The project needs type safety and developer experience improvements. Options:
- Full TypeScript migration —
.tsfiles,tsconfig.json, build step - JavaScript + JSDoc + @ts-check — type checking without compilation
- No type checking — status quo
Decision
Adopt JavaScript with JSDoc annotations and @ts-check instead of migrating to TypeScript.
- Add
// @ts-checkto critical module files - Use JSDoc
@param,@returns,@typedeffor type documentation - TypeScript compiler used only for checking (via IDE), not for building
- Zod schemas for runtime validation at API boundaries
Consequences
Positive
- No build step —
node src/proxy.jsruns directly - Faster development iteration (no compile wait)
- Gradual adoption — files can be annotated one at a time
- IDE still provides autocomplete and type errors via JSDoc
- Lower barrier for contributors
Negative
- JSDoc type syntax is more verbose than TypeScript
- Some advanced TypeScript features (generics, conditional types) are harder in JSDoc
- No
.d.tsgeneration for consumers
Neutral
- Existing Zod schemas provide runtime validation regardless of type system choice
@ts-checkcan be added to any file without affecting others