Release Notes: AI-DLC Refactoring v2.0
This release documents the completion of the AI-Driven Development Lifecycle (AI-DLC) refactoring on the project.
π AI-DLC Execution Summary
| Phase |
Status |
| Inception |
β
Complete |
| Construction (Units 1β4) |
β
Complete |
| Operations |
β
Closed |
Inception Phase
- Workspace Detection
- Reverse Engineering
- Requirements Analysis
- Workflow Planning
- Units Generation
Construction Phase
| Unit |
Scope |
Status |
| Unit 1 |
Core & Models |
β
Done |
| Unit 2 |
Middlewares |
β
Done |
| Unit 3 |
Controllers |
β
Done |
| Unit 4 |
Routes |
β
Done |
π οΈ What's Changed
Unit 4: Routes (Primary Deliverable)
- Renamed
ressources.ts β resources.ts and corrected all paths from /ressources to /resources
- Deleted 4 legacy
.js route files (auth.js, helpers.js, index.js, ressources.js)
- Fixed
auth.ts register schema: corrected username property to email
- Added JSON Schema response validation for
/resources/* endpoints
- Added querystring + response schemas for
/helpers/pkce and /helpers/callback
- Updated tests to use
/resources instead of deprecated /ressources
TypeScript Migration
- Rewrote
tsconfig.json with proper skipLibCheck, bun-types, allowImportingTsExtensions, and noEmit
- Removed 3 stale
.js files in src/core/ (env.js, types.js, utils.js)
- Fixed
server.ts error handler typing for strict TypeScript compliance
- Improved
tests/utils/request.ts return types
Linting Overhaul
- Migrated from
.eslintrc (legacy) to eslint.config.js (flat config)
- Adopted
@poool/eslint-config as the shared lint standard
- Removed old dependencies:
eslint-config-airbnb-base, @typescript-eslint/* v7
- Added
@eslint/js as an explicit peer dependency for CI stability
- Resolved ESLint 9.x /
@poool/eslint-config / typescript-eslint version matrix incompatibilities
- Generated
bun.lock for reproducible dependency installs
CI/CD Modernization
- Migrated CI from Node.js/Yarn to Bun (
oven-sh/setup-bun@v2)
- Replaced matrix Node builds with a single Bun runner
- Fixed dynamic port allocation (
port: 0) in tests to avoid hardcoded 3000 conflicts
- Fixed test request helper so
GET no longer sends a body
- Fixed
package.json formatting (removed trailing comma that caused mongodb-memory-server JSON parse crash)
Security Hardening
- Authorization middleware now explicitly validates the
Bearer scheme instead of accepting any scheme (e.g. Basic)
generateAccessToken now reads PRIVATE_KEY dynamically from process.env at call time instead of caching it at module load β prevents silent failures when .env is missing
π§ͺ Test Results
bun test v1.2.0
β /helpers > PKCE generation
β /auth > authenticate (password grant)
β /auth > authenticate (password grant) > unknown user
β /auth > authenticate (password grant) > invalid grant
β /auth > authenticate (refresh_token grant)
β /auth > authenticate (client_credentials grant)
β /resources > GET unrestricted
β /resources > GET restricted
8 pass Β· 0 fail Β· 19 assertions
β οΈ Breaking Changes
- CI now requires Bun instead of Node.js + Yarn.