How rohitprasain99/djangodrfinterview works
Project type and purpose
• This is a monolithic Django REST Framework (DRF) backend service whose sole purpose is user management and authentication.
• Key features: user registration, login/logout with JWT, token refresh, OTP-based password reset, password change, and CRUD operations on a user profile.
File structure
• Top-level files:
• manage.py – Django CLI entry point
• djangoDrfInterview/ – core settings, URL routing, ASGI/WSGI
• api/ – central “include” URL conf for all API endpoints
• authentication/, users/, otp/, user_details/ – four Django apps, each with models.py, serializers.py, views.py, tests.py, migrations
• utils/otp.py – standalone OTP generator/email helper
• db.sqlite3 – local database (swap for Postgres/MySQL in prod)
• requirements.txt, .env.local – dependency list and environment variables
• Architectural hints: apps are highly cohesive, each encapsulates one domain (authentication flow, profile data, etc.). DRF’s MVT (Model-View-Template) pattern is in use (though templates aren’t needed for an API).
Extract insights from README
• All API endpoints live under /api/…
• Uses JWT for stateless auth, with refresh and blacklist logic
• OTPs are emailed for password reset and live for 5 minutes
• Profiles are first-class resources (CRUD)