Release v0.5.0 #134
raouf-b-dev
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Release v0.5.0 🚀
A monumental architectural release that transforms the identity & access security model, decouples IAM into three strictly isolated bounded contexts (Identity, Authentication, Authorization), eliminates cross-module database coupling, implements enterprise-grade IDOR protection, and introduces database seeding alongside automated CI/CD quality gates.
This release touches 511 files (~19,240 insertions / ~6,960 deletions) across the entire codebase.
🌟 Highlights
🏛️ IAM Architecture Restructure (DDD Bounded Context Split)
AuthandAccessmodules with three strictly isolated bounded contexts:User,Address): Answers "Who is this user?"Credential,SessionToken): Answers "Can they prove their identity?"Role,Permission,UserRoleAssignment): Answers "What are they allowed to do?"@ManyToOne,@OneToMany,@JoinColumn) across module boundaries. Cross-module entity references now strictly use plain primitive foreign keys (userId: number), making future microservice extraction a deployment configuration change rather than a code rewrite.Credentialdomain logic into Authentication. StrippedpasswordHashandroleIdfrom cross-module ACL Gateways, ensuring hashes and internal authorization structures never leak across boundaries.@Global()decorator fromAuthenticationModuleto enforce strict Dependency Inversion and explicit module registration.🛡️ IDOR (Insecure Direct Object Reference) Prevention & Resource Ownership
CallerContextpropagation model throughout the application layer to convey caller identity and privileges without coupling use cases to HTTP.OwnedResourceAccessPolicyinshared-kernelto enforce entity-level ownership validation for orders, carts, payments, and addresses.CartOwnershipValidatorwith JWT cart session tokens (header + HttpOnly cookie fallback) for guest cart protection and seamless login upgrades.test/security-idor.e2e-spec.ts) to verify unauthorized resource access attempts are rejected with403 Forbidden.🧬 Strict Type Safety & Hexagonal Architecture Guarding
Relation<T>Sweep: Refactored all entity schema associations across modules to use TypeORM's explicitRelation<T>wrapper, preventing circular reference type bugs.isolatedModulesintsconfig.jsonand introducednpm run typecheckinto CI.npm run test:arch) to statically enforce DDD layer rules, mapper conventions, and gateway boundaries, preventing architectural decay automatically.🌱 Database Seeding & Developer Experience
npm run db:seedpowered by module-scoped seed use cases to generate realistic demo environments containing admin accounts, customer profiles, catalog categories, 15+ products, and stock reservations.⚙️ CI/CD Pipeline Hardening
.github/workflows/with shared dependency caching (node_modules), parallelized matrix jobs (linting, typechecking, unit testing, building), and modern action versions.📊 Release Stats
Identity,Authentication,Authorization,Carts,Inventory,Orders,Payments,Products,Notifications,Health)📝 Key Commits
4c33cc4test(arch): enforce cross-module isolationa20080a2de1cd7da718863d71886019f7f5da65869b277ad4463d4c21350bcbdf1d896b868dcf907eb9855cd235Full Changelog:
v0.4.1...v0.5.0This discussion was created from the release Release v0.5.0.
All reactions