A simple Token-based Authentication API built with Django REST Framework (DRF).
This API allows users to register, login, and access protected endpoints using token authentication.
- Backend: Django 5.x, Django REST Framework
- Authentication: Token Authentication (DRF)
- Database: PostgreSQL
- Others: Python 3.11+, pip, virtualenv
- User registration
- User login (returns auth token)
- Token-protected endpoints
- Logout (token invalidation optional)
- Clean API responses with proper status codes
- Python 3.10+
- pip
- virtualenv
# Clone the repository
git clone <your-repo-url>
cd <project-folder>
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Apply migrations
python manage.py migrate
# Run server
python manage.py runserver