Django + React Auth Starter offers a well-structured foundation for building authentication into web applications. With JWT support, email verification, and a secure password reset process, developers can easily implement features essential for user management. This starter kit leverages popular frameworks and libraries, ensuring a scalable and maintainable codebase.
Django React Auth Starter is a comprehensive solution designed to facilitate secure access control for web applications, integrating Django REST Framework for the backend and React for the frontend. This starter kit is fully equipped with essential features, making it a robust option for developers looking to implement authentication with JWT, email verification, and password management seamlessly.
Features
- JWT Authentication: Implement reliable authentication with automatic token refresh and rotation.
- Email Verification: Ensure users verify their email addresses to enhance security.
- Password Reset: Utilize secure tokens for password recovery without vulnerabilities.
- Custom User Model: Benefit from a UUID primary key and email-based login for user identification.
- Route Guards: Protect routes for authenticated users and allow guest access where required.
- Security Measures: Employ rate limiting and production-ready security headers to safeguard the application.
- API Documentation: Comprehensive Swagger and ReDoc documentation for ease of API usage.
Tech Stack
Backend: Built with Django 5.2 and Django REST Framework, utilizing SimpleJWT for authentication, Djoser for user management, and PostgreSQL as the database.
Frontend: Developed using React 19 and TypeScript with Vite for speedy builds, alongside TanStack Query and Axios for data fetching, and styled with Tailwind CSS and Radix UI.
API Endpoints
The API provides several endpoints for user registration, authentication, password management, and user information retrieval. Key endpoints include:
- Registration:
POST /api/v1/auth/users/ - Login:
POST /api/v1/auth/jwt/create/ - Refresh Token:
POST /api/v1/auth/jwt/refresh/ - Activate Account:
POST /api/v1/auth/users/activation/ - Request Password Reset:
POST /api/v1/auth/users/reset_password/ - Confirm Password Reset:
POST /api/v1/auth/users/reset_password_confirm/ - Get Current User:
GET /api/v1/auth/users/me/
Screenshots
Project Structure
The project is organized with a clear structure separating the Django backend and React frontend, facilitating maintainability and scalability.
This starter kit serves as an excellent foundation for developers in need of a quick and secure authentication system, allowing for further customization based on specific application requirements.
No comments yet.
Sign in to be the first to comment.