Commit Graph

14 Commits

Author SHA1 Message Date
Ho Ngoc Hai
25f68781ad fix(security): fix 5 P0 security blockers — SEC-C-01 through SEC-C-05
SEC-C-01: Replace Neon PostgreSQL credentials (npg_Ssfy6HKO0cXI) with local
dev connection strings in all 19 appsettings.json files. Production credentials
must be injected via ConnectionStrings__DefaultConnection env var. Add
appsettings.Production.json and appsettings.Staging.json to .gitignore.

SEC-C-02: Add services/goodgo-mcp-server/.env to root .gitignore. Create
.env.example with safe placeholder values documenting required variables.

SEC-C-03: Wrap AddDeveloperSigningCredential() in env check — development only.
Non-development environments must provide X.509 certificate via
IdentityServer:SigningCertificatePath and IdentityServer:SigningCertificatePassword.

SEC-C-04: Remove 4 unauthenticated debug endpoints from StaffController:
GET debug/all, POST debug/seed, POST debug/update-userid, POST debug/update-merchant.
These endpoints allowed privilege escalation and data exfiltration without auth.

SEC-C-05: Removed endpoints containing SQL injection via string interpolation
(lines 307, 367 in StaffController). Also removed [AllowAnonymous] from
GET lookup endpoint — inherits class-level [Authorize].

BREAKING: debug/* endpoints are permanently removed. BFF lookup endpoint now
requires authentication.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 09:47:07 +07:00
Ho Ngoc Hai
efabe49157 refactor(P2): standardize API responses + fix migrations + cleanup DI
Wave 3 — 3 parallel agents fixing P2 code quality issues:

Response format standardization (30 controllers across 8 services):
- Wrapped all raw DTO returns with { success: true, data: result }
- Standardized error responses with { success: false, error: { code, message } }
- Services: chat, social, membership, ads-manager, ads-serving,
  ads-billing, ads-tracking, ads-analytics
- booking-service already compliant (skipped)

Migration fixes:
- ads-billing: Fixed InvoiceId1 spurious FK (explicit HasMany navigation)
- Removed unused IRequestManager DI from: ads-analytics, ads-serving,
  booking, mkt-facebook (classes preserved for future use)

Unused dependencies:
- No Redis/Dapper DI registrations found (only NuGet refs, kept as-is)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:34:10 +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
5aa48eb29c docs: Add service-level READMEs, update Wallet Service documentation with multi-currency and admin APIs, refine Chat Service architecture, and remove a test Mermaid file. 2026-01-18 23:51:39 +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
72601557e6 feat: Thêm các unit test cho các thành phần của ChatService như AIService, ChatHubClient và các sự kiện domain. 2026-01-16 00:37:45 +07:00
Ho Ngoc Hai
a4db8f02b0 chore: Thêm gói EF Core Design vào ChatService, cập nhật cổng phát triển cục bộ của SocialService và cấu hình chuỗi kết nối cơ sở dữ liệu của nó sang Neon.tech. 2026-01-15 23:57:09 +07:00
Ho Ngoc Hai
52432b4a9e feat: Khởi tạo ứng dụng MAUI thử nghiệm cho macOS Catalyst. 2026-01-15 23:51:03 +07:00
Ho Ngoc Hai
2f7d695773 build: Tạo các tệp đầu ra debug ban đầu cho dự án AppClientBase trên iOS và Mac Catalyst. 2026-01-15 23:45:09 +07:00
Ho Ngoc Hai
4a1a0ef79c feat(storage-service): Add Social Service to Docker Compose and enhance IAM service integration
- Introduced a new social-service in the Docker Compose configuration for local development, including build context, environment variables, and health checks.
- Updated architecture documentation to reflect the new storage service structure and its components, including user storage quotas and file management.
- Enhanced README files to provide clearer instructions on service setup, configuration, and API endpoints for file storage management.
- Implemented caching mechanisms in the IAM service client for improved performance and reduced latency in user information retrieval.
- Updated appsettings for development to include caching settings for IAM service interactions.
2026-01-13 00:28:41 +07:00