This is a Role-Based Authentication System built using Django and Django REST Framework (DRF). It provides user authentication, role-based access control (RBAC), JWT authentication, and API endpoints for user management. Additionally, it includes password hashing using bcrypt and forgot password functionality.
- User Registration & Authentication (JWT-based)
- Role-Based Access Control (RBAC) (Student, Parent, School)
- Secure Password Hashing using
bcrypt - Forgot Password & Reset Password via email
- Student Dashboard (Achievements & Profile)
- Parent Dashboard (Monitor child's achievements)
- School Dashboard (Manage students)
- CRUD Operations for user roles & achievements
- Backend: Django, Django REST Framework
- Database: PostgreSQL / MySQL
- Authentication: JWT (Django Simple JWT)
- Security: bcrypt for password hashing
git clone https://github.com/mohitmahur/slate-backend.git
cd slate-backendpython -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activatepip install -r requirements.txtpython manage.py makemigrations
python manage.py migratepython manage.py createsuperuserpython manage.py runserver| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register/ |
Register a new user |
| POST | /api/auth/login/ |
Login & get JWT tokens |
| POST | /api/auth/forgot-password/ |
Request password reset |
| POST | /api/auth/reset-password/ |
Reset password |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/dashboard/student/ |
Student dashboard |
| GET | /api/dashboard/parent/ |
Parent dashboard |
| GET | /api/dashboard/school/ |
School dashboard |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/student/achievements/<int:student_id>/ |
View student achievements |
| POST | /api/achievements/ |
Add new achievement |
- bcrypt password hashing for enhanced security
- JWT authentication for secure API access
- Role-Based Access Control (RBAC) to restrict unauthorized access
This project is open-source and available under the MIT License.
Feel free to fork this repository and submit pull requests. Suggestions & improvements are always welcome!