Commit Graph

16 Commits

Author SHA1 Message Date
Ho Ngoc Hai
59b2cecaf2 feat(P1): add 57 validators + 10 missing handlers across 13 services
Wave 2 — 3 parallel agents fixing P1 issues:

Validators (57 new FluentValidation validators):
- ads-manager: 10 validators for all commands
- ads-billing: 3 validators for all commands
- ads-tracking: 2 validators for missing commands
- ads-analytics: 1 validator for CreateReport
- social: 8 validators for all commands
- mining: 16 validators for all commands
- mission: 4 validators for all commands
- promotion: 13 validators for all commands

Missing handlers (10 implemented):
- promotion: ExchangeVoucher, PurchaseVoucher, SearchVouchers,
  GetCampaignStatistics, GetCampaignVouchers
- mission: GetUserMissionProgress
- mkt-facebook: GetConversations, GetCustomers
- ads-manager: ListAudiences, GetAudienceById

All validators use bilingual messages (EN/VI) and are auto-registered
via MediatR ValidatorBehavior pipeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:24:06 +07:00
Ho Ngoc Hai
f8606e0447 fix(P0): security hardening + critical bug fixes across 22 services
Wave 1 — 6 parallel agents fixing P0 issues from code audit:

Auth (18 services secured):
- Added JWT Bearer auth + [Authorize] to all unprotected controllers
- Webhook endpoints (Facebook/WhatsApp/Zalo/X) stay [AllowAnonymous]
- Health checks remain public for Docker/K8s probes
- Services: catalog, order, booking, fnb-engine, inventory, social,
  ads-manager, ads-serving, ads-billing, ads-tracking, ads-analytics,
  mkt-facebook, mkt-whatsapp, mkt-x, mkt-zalo, promotion

Template artifacts (4 services):
- mission-service: myservice_db → mission_service
- mkt-facebook: Dockerfile MyService.API → FacebookService.API
- mkt-whatsapp: MyServiceContext.cs → WhatsAppServiceContext.cs
- promotion: UserSecretsId fixed

Critical handler bugs (7 fixes):
- ads-tracking: TrackPixelEventHandler now persists to DB
- ads-tracking: RecordConversion endpoint exposed via controller
- booking: UpdateResource now applies Name + Capacity changes
- ads-manager: ListPendingAds uses correct enum (pending_review)
- mining: BanMiner calls Ban() not Suspend()
- mining: ResetMinerStreak now actually resets streak
- mkt-x: 8 missing repository DI registrations added

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:18:09 +07:00
Ho Ngoc Hai
f3779c4ebe docs: add SERVICE_DOCS.md for all 24 microservices from per-service code audit
Each SERVICE_DOCS.md documents: Overview, API Endpoints, Commands, Queries,
Domain Model, Database Schema, Integration Events, Dependencies, Configuration.
Generated by 23 parallel audit agents reading actual source code.

Key corrections from audit:
- inventory-service: 12 commands/6 queries (was listed as scaffold)
- promotion-service: 12 commands/10 queries (was listed as 0)
- mission-service: 4 commands/7 queries (was listed as 0)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 17:54:53 +07:00
Ho Ngoc Hai
751f90c365 feat: Log EF Core migration errors instead of crashing the application at startup across all services. 2026-02-28 01:03:43 +07:00
Ho Ngoc Hai
be86e48de6 feat: automatically apply EF Core database migrations on service startup across all services 2026-02-28 00:51:35 +07:00
Ho Ngoc Hai
f521cc0a91 chore: Remove the web-client application, add a local database initialization script, and update service Dockerfiles. 2026-02-28 00:41:17 +07:00
Cursor Agent
d1cfef93cf test: replace mission and commerce sample functional suites
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
2026-02-23 12:56:57 +00:00
Ho Ngoc Hai
86c9e7303c docs: Add new services, update existing service documentation, and enhance IAM and Storage service features. 2026-01-18 23:44:03 +07:00
Ho Ngoc Hai
4ed7eb2e52 feat: Add unit tests for Mission and UserCheckIn aggregates and PerformCheckIn command, and update existing MiningService command tests. 2026-01-17 20:57:28 +07:00
Ho Ngoc Hai
35dac2e49e feat: Initialize MissionService database schema, add MiningService unit tests, and update deployment configurations. 2026-01-17 20:49:24 +07:00
Ho Ngoc Hai
1dfd72a10a feat: Implement mission and task management APIs with dedicated controllers and query/command handlers, including admin features for check-ins. 2026-01-17 18:32:02 +07:00
Ho Ngoc Hai
7dd4f14f1b Refactor MissionService by replacing the 'Sample' aggregate with new 'Mission', 'Reward', 'Task', and 'Check-in' aggregates, and introduce configuration management to MiningService. 2026-01-17 18:29:15 +07:00
Ho Ngoc Hai
4b73098ff9 feat: Initialize MissionService with new domain and API commands, including build artifacts, and modify MiningController. 2026-01-17 18:15:13 +07:00
Ho Ngoc Hai
c6bcc8d0df feat: Implement JWT authentication, SignalR, external service clients in MiningService, and update documentation across services. 2026-01-17 18:08:46 +07:00
Ho Ngoc Hai
e285f3d3c6 docs: Add Mission Service architecture documentation in English and Vietnamese. 2026-01-17 17:58:21 +07:00
Ho Ngoc Hai
07367b192e feat: Add Mission Service documentation and update Mining Service deployment, port, and database connection. 2026-01-17 17:55:18 +07:00