How mayankkamriya/unihoxtask-authentication-api-ddd-architecture works
Project type and purpose
• This is a full-stack authentication system:
• Frontend: React (Vite) SPA for signup/sign-in, OTP flows, dashboard
• Backend: Node.js + Express API implementing DDD (Domain, Infrastructure, Presentation layers)
• Database: MongoDB via Mongoose
• External services: SMTP (Nodemailer) for email OTP, Twilio for SMS OTP
• Purpose: Provide secure password- and OTP-based user authentication with JWT authorization.
File structure
• Top level:
• backend/ — Express API, follows Domain-Driven Design
– src/domain/services: business logic (AuthService, TwilioService)
– src/infrastructure: persistence (Mongoose models), email sender, DB connection
– src/presentation: HTTP routes & middleware
• frontend/ — React SPA (components for signup, sign-in, OTP, dashboard)
• Config & deployment: vercel.json for backend, Vite config for frontend.
README for architectural insights
• Emphasizes DDD & SOLID: separation into domain, infrastructure, presentation
• Lists technology stack and API endpoints.