A modern backend project built with Django REST Framework, featuring JWT authentication, AI-powered task suggestions via OpenAI, and complete API documentation.
| Technology | Badge |
|---|---|
| Python | |
| Django | |
| DRF | |
| OpenAI | |
| License |
- 📝 Full CRUD operations on tasks
- 🔐 JWT Authentication (Simple JWT)
- 🤖 AI task suggestion endpoint using OpenAI GPT-3.5
- 📄 API documentation with Swagger & ReDoc
- 🛠 Admin panel for managing users and tasks
- 🆕 Signup / Login / Logout pages for user management
- 🔧 Recent modifications:
- Added AI task suggestion improvements
- Refactored
views.pyfor clarity and stability - Added proper signup/login integration
- Updated API endpoints table for clarity
- LATEST: Complete code refactoring with improved quality
- Fixed duplicate model fields (user/owner)
- Updated to modern OpenAI ChatCompletion API
- Added comprehensive error handling and logging
- Improved authentication and permissions
- Enhanced test coverage (7 tests)
- Applied Black code formatting
- Added environment validation command
- Ready for production deployment 🚀
- Deployment guides for Heroku, Railway, Docker, AWS, VPS
- Production-ready Dockerfile and docker-compose.yml
- Heroku Procfile and runtime.txt
- Nginx configuration for reverse proxy
# Clone repository
git clone <your-repo-url>
cd task-manager
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux / Mac
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Copy environment template and configure
cp .env.development .env
# Edit .env and add your settings (especially OPENAI_API_KEY if you want AI features)
# Check environment configuration (optional but recommended)
python manage.py check_env
# Run migrations
python manage.py makemigrations
python manage.py migrate
# Create a superuser (for admin access)
python manage.py createsuperuser
# Start the server
python manage.py runservercurl -X POST http://127.0.0.1:8000/api/suggest-task/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-jwt-token>" \
-d '{"prompt":"study Django"}'Response Example:
{
"suggestion": "Review Django models and build a small CRUD project."
}Backend: Django 5.2, Django REST Framework
Authentication: JWT (Simple JWT)
AI: OpenAI GPT-3.5
Docs: drf-yasg (Swagger & ReDoc)
Database: SQLite (default, can switch to PostgreSQL)
Code Quality: Black, isort
- Make sure
OPENAI_API_KEYis set in.envto use the AI endpoint - Use
python manage.py check_envto validate your environment configuration - All links above are local URLs, accessible when the server runs
- The AI suggestion endpoint requires authentication (JWT token)
This application is production-ready and can be deployed to various platforms:
- Heroku:
git push heroku main(see DEPLOYMENT.md) - Railway: One-click deploy from GitHub
- Docker:
docker-compose up -d - Digital Ocean: App Platform auto-deploy
- AWS: Elastic Beanstalk or ECS
- VPS: Traditional server deployment with Nginx
📖 Full deployment guide: See DEPLOYMENT.md for detailed instructions for each platform.
- ✅
Procfile- Heroku/Railway deployment - ✅
runtime.txt- Python version specification - ✅
Dockerfile- Production-ready container image - ✅
docker-compose.yml- Multi-container orchestration - ✅
nginx.conf- Reverse proxy configuration - ✅
.dockerignore- Optimized Docker builds
python manage.py check --deploy # Check deployment readiness
python manage.py test # Run all tests
python manage.py collectstatic # Collect static filesThis project is actively maintained, with recent comprehensive refactoring to improve code quality, security, and maintainability.
This project is licensed under the MIT License.