874 B
874 B
🔒 Security & Performance Review (09_devops_security)
Security Architecture & Best Practices
- API Security & Auth Guards:
- NestJS JWT strategy validation with expiration and payload checking.
- Strict
RolesGuardprotecting B2B wholesale routes (User_Wholesale) and Admin routes (ADMIN). - Rate limiting via NestJS
@nestjs/throttlerto prevent abuse. - CORS policy allowing configured origins only.
- Data Sanitization & Injection Prevention:
- NestJS global
ValidationPipepreventing mass assignment and SQL injection via Prisma parameterized queries. - Password hashing using bcrypt.
- NestJS global
- Performance & Caching:
- PostgreSQL indexing on frequent search fields (
categorySlug,suitableFor,artNo,slug,requiresRx). - Next.js caching strategy (
revalidate/ fetch caching) for high-frequency dynamic routes.
- PostgreSQL indexing on frequent search fields (