# Tech Context: OCD Website ## Technologies Used ### Frontend - React 19 - TypeScript 5.8 (5x faster incremental builds) - Next.js 15.2.3 (includes security patches for CVE-2025-29927) - Tailwind CSS 4.0 (CSS-first configuration with @theme directives, 182x faster builds) - Framer Motion 11 - React Router DOM 7 - React Icons 5.4 - React Simple Maps 4.0 (beta) - React Intersection Observer 9.13 - Server Components for critical content delivery ### Backend - Node.js with Express 4.21 - TypeScript 5.8 - MongoDB 7.0 with schema validation and indexing - Redis for caching and session management - Nodemailer 6.9 for email handling - CORS with proper security headers - dotenv 16.4 for environment variable management - JWT-based authentication with RBAC ### Database - MongoDB 7.0 with: - Schema validation using $jsonSchema - Field-level validation and pattern matching - Full-text search indexes - Compound indexes for query optimization - Authentication and authorization ### Development & Build Tools - Docker & Docker Compose with security best practices: - Multi-stage builds - Non-root users for all services - Resource limitations - Health checks for all containers - Security scanning with Trivy - Portainer for container management - PostCSS 8.4 - Autoprefixer 10.4 - pnpm 9.14 (package manager) - Vite 6.0 - ESLint 9 - Concurrently for running multiple processes - tsx/ts-node for TypeScript execution - Hot module replacement (HMR) ### Production - Nginx (Production server for frontend with security headers) - Node.js server for backend API - SSL/TLS 1.3 for secure connections - Network isolation with Docker ## Development Setup - Multi-container Docker setup with Docker Compose - Hot-reloading enabled - Separate development and production builds - Environment variable management for sensitive data - TypeScript configuration for both client and server - Concurrent development server (frontend + backend) - Automated security scanning in the build process ## Technical Constraints - Emphasis on accessibility for deaf and DeafBlind users - WCAG 2.2 AA compliance required - ASL video support with mandatory: - WebVTT subtitles - Full text transcripts - Thumbnail previews - Screen reader compatibility with ARIA landmarks - High performance requirements for video content - Secure admin access with JWT and RBAC - Responsive design for all screen sizes - Support for membership expiration notifications - Requirements for Docker security best practices