@@ -591,6 +591,7 @@ src/api/routes/users.ts:25 (HTTP endpoint)
591591```
592592
593593** Event-Driven (Async):**
594+
594595``` text
595596
596597PaymentService.processCharge() (src/services/PaymentService.ts:89)
@@ -603,15 +604,18 @@ PaymentService.processCharge() (src/services/PaymentService.ts:89)
603604### 4.3 Architectural Patterns
604605
605606#### 🟢 Layered Architecture
607+
606608- ** Evidence:** Clear separation: API → Services → Repositories → Database
607609- ** Rationale:** [ Not explicitly documented]
608610- ** [ User stated: "Standard pattern for maintainability"] **
609611
610612#### 🟢 Dependency Injection
613+
611614- ** Evidence:** Services injected via constructor (src/services/* .ts)
612615- ** Implementation:** Custom DI container (src/di/container.ts:12)
613616
614617#### 🟡 Event-Driven (Partial)
618+
615619- ** Evidence:** Event bus exists (src/events/bus.ts)
616620- ** Usage:** Only for email notifications, not fully adopted
617621- ** [ User confirmed: "Plan to expand event usage for audit logging"] **
@@ -621,23 +625,27 @@ PaymentService.processCharge() (src/services/PaymentService.ts:89)
621625## 5. Conventions & Standards
622626
623627### 5.1 Code Style
628+
624629- ** Linter:** ESLint (eslintrc.json) - Airbnb config
625630- ** Formatter:** Prettier (prettierrc.json)
626631- ** TypeScript:** Strict mode enabled (tsconfig.json:5)
627632
628633### 5.2 Naming Conventions
634+
629635- ** Files:** camelCase for TS/JS files (userService.ts)
630636- ** Components:** PascalCase for React (UserProfile.tsx)
631637- ** Functions:** camelCase (getUserById)
632638- ** Classes:** PascalCase (UserService)
633639- ** Constants:** UPPER_SNAKE_CASE (MAX_RETRY_ATTEMPTS)
634640
635641### 5.3 File Organization
642+
636643- ** Pattern:** Layer-based (api/, services/, repositories/)
637644- ** Co-location:** Tests alongside source (userService.ts + userService.test.ts)
638645- ** Barrel exports:** index.ts files in each directory
639646
640647### 5.4 Git Workflow
648+
641649- ** Branching:** Feature branches (feature/* , bugfix/* )
642650- ** Commits:** Conventional Commits (feat:, fix:, docs:)
643651- ** PRs:** Required reviews, CI must pass
@@ -647,15 +655,18 @@ PaymentService.processCharge() (src/services/PaymentService.ts:89)
647655## 6. Testing Strategy
648656
649657### 6.1 Frameworks
658+
650659- ** Unit:** Jest (package.json:34)
651660- ** Integration:** Jest + Supertest (for API tests)
652661- ** E2E:** [ None found]
653662
654663### 6.2 Coverage
664+
655665- ** Current:** ~ 75% (from jest.config.js coverage report)
656666- ** Target:** [ User stated: "Aiming for 80%"]
657667
658668### 6.3 Patterns
669+
659670- ** Location:** Co-located (* .test.ts alongside source)
660671- ** Naming:** * .test.ts
661672- ** Run command:** ` npm test `
@@ -665,16 +676,19 @@ PaymentService.processCharge() (src/services/PaymentService.ts:89)
665676## 7. Build & Deployment
666677
667678### 7.1 Build Process
679+
668680- ** Tool:** Webpack (webpack.config.js)
669681- ** Command:** ` npm run build `
670682- ** Output:** dist/ directory
671683
672684### 7.2 Environments
685+
673686- ** Development:** Local (npm run dev)
674687- ** Staging:** [ Not configured yet - User confirmed]
675688- ** Production:** AWS ECS (infrastructure/ecs-task-def.json)
676689
677690### 7.3 CI/CD
691+
678692- ** Platform:** GitHub Actions (.github/workflows/ci.yml)
679693- ** Pipeline:**
680694 1 . Lint check
@@ -767,18 +781,21 @@ Priority files for anyone working on this codebase:
767781## 10. Confidence Summary
768782
769783### High Confidence Findings ✅
784+
770785- Authentication flow (complete code trace + tests)
771786- Payment integration (active production usage)
772787- Database choice (explicit ADR)
773788- Layered architecture (clear code organization)
774789- Technology stack (explicit dependencies)
775790
776791### Medium Confidence (Needs Validation) ⚠️
792+
777793- Event-driven pattern (partially implemented)
778794- React choice rationale (documented but brief)
779795- Target code coverage (stated by user)
780796
781797### Low Confidence (Unknown) ❓
798+
782799- Redis caching decision (no documentation)
783800- Deployment to staging (not configured)
784801- E2E testing strategy (none found)
@@ -788,6 +805,7 @@ Priority files for anyone working on this codebase:
788805## 11. Open Questions & Gaps
789806
790807### For User Validation
808+
7918091 . ❓ ** Redis Caching:**
792810 - Used in src/cache/redis.ts:12
793811 - No decision documentation found
@@ -798,12 +816,14 @@ Priority files for anyone working on this codebase:
798816 - User mentioned it exists - where?
799817
800818### Documentation Gaps
819+
8018201 . 📝 Need ADR for Redis caching choice
8028212 . 📝 Update API documentation (currently outdated: 2023-06-15)
8038223 . 📝 Document event-driven pattern expansion plan
8048234 . 📝 Remove or document deprecated OAuth code
805824
806825### Code Gaps
826+
8078271 . 🔧 Remove deprecated MongoDB client code
8088282 . 🔧 Remove unused OAuth handlers
8098293 . 🔧 Add E2E testing framework
0 commit comments