Ho Ngoc Hai
c981bff771
feat(shared): add error handling & structured logging strategy
...
- Global exception filter with consistent error response format
- Domain exceptions (NotFoundException, ValidationException, etc.)
- Error codes enum for domain-specific error identification
- Correlation ID middleware for request tracing
- Request/response logging middleware with structured JSON
- PII masking in logs (emails, phone numbers, sensitive fields)
- Enhanced LoggerService with pino formatters and ISO timestamps
- Tests for exception filter, domain exceptions, and PII masker
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 00:18:21 +07:00
Ho Ngoc Hai
1fb7bb39d2
feat(shared): add shared module with domain primitives, infrastructure services, and utils
...
Domain primitives: BaseEntity, AggregateRoot, ValueObject, DomainEvent, Result<T,E>
Infrastructure: PrismaService, RedisService, LoggerService (pino), EventBusService
Utils: Vietnam phone validator/normalizer, VND currency formatter, Vietnamese slug generator
Includes 45 unit tests covering all domain primitives, validators, and formatters.
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 00:07:27 +07:00
Ho Ngoc Hai
83d55de65b
feat: add ESLint flat config, Prettier, dependency-cruiser, and Husky
...
Setup code quality tooling for the monorepo:
- ESLint 9 flat config with TypeScript, import ordering, and NestJS rules
- Prettier with consistent formatting across all files
- dependency-cruiser enforcing module boundary rules (no cross-module internals, no circular deps)
- Husky + lint-staged for pre-commit hooks
- Auto-fixed existing files for type imports and import ordering
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-07 23:57:28 +07:00
Ho Ngoc Hai
e1e5fa6252
feat: scaffold monorepo with Turborepo + NestJS + Next.js
...
- Turborepo monorepo with pnpm workspaces
- apps/api: NestJS 11.x with CQRS module
- apps/web: Next.js 14 App Router + TailwindCSS
- src/modules/shared: base entities, Result pattern, value objects
- TypeScript 5.7+ strict mode, shared tsconfig base
- Build pipeline: dev, build, lint, test, typecheck
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-07 23:52:33 +07:00