This project is a full-featured Django REST API that implements secure user authentication and a real-time assignment tracking system. It was developed as part of a backend development assignment.
- Built with Django's built-in authentication system and Django REST Framework's token-based authentication.
- Secure password hashing and storage using Django's default PBKDF2.
- Endpoints:
- User Registration with OTP validation and email verification.
- Login and Logout using token-based authentication.
- Password Reset functionality with secure email-based reset flow.
- Full unit test coverage for all authentication-related endpoints.
- A dedicated model to track assignments with the following fields:
name
: assignment namedescription
: details about the assignmentstatus
: one oftodo
,in progress
,done
,error
created_at
,updated_at
: auto-managed timestampsassignee
: ForeignKey to the user
- REST API endpoints include:
- Filtering, sorting, pagination, and search support.
- Full CRUD operations (Create, Read, Update, Delete).
- All endpoints are protected with appropriate permissions.
- Powered by PostgreSQL, fully integrated with Django.
- Extended with TimescaleDB for time-series optimizations and performance tuning on timestamped assignment data.
- Demonstrates optimized queries for time-based operations.
- Unit tests implemented for:
- User registration, login, logout, password reset.
- Assignment creation, update, deletion, and retrieval.
-
User account Information:
/accounts/
- Method:
GET
- Requires authentication
- Method:
-
User account Change:
/accounts/change/
- Method:
POST
- Requires authentication
- Update user information (first name, last name)
- Method:
-
User Login:
/accounts/login/
- Method:
POST
- Input: Email and password
- Returns user information
- Method:
-
User Signup:
/accounts/signup/
- Method:
POST
- Input: First name, last name, email, and password
- Returns success message
- Method:
-
OTP Email account Activation:
/accounts/activate-account/
-
please get the activation code from the tty , due to the issue #1
-
Method:
POST
-
Input: Activation code
-
Activates user accounts so that users can login
-
-
User Logout:
/accounts/logout/
- Method:
POST
- Requires authentication
- Logs out the user
- Method:
-
Password Reset Request:
/accounts/password-reset/
- Method:
POST
- Input: Email
- Sends a verification code for password reset to the user's email
- Method:
-
Password Reset Verify:
/accounts/password-reset/verify/
- Method:
POST
- Input: Verification code and new password
- Resets the user's password
- Method:
-
Password Change:
/accounts/password-change/
- Method:
POST
- Requires authentication
- Input: Old password and new password
- Changes the user's password
- Method:
- Just type :
127.0.0.1:8000/assignments
(use DRF postman-like page) or curl and specify the http method