Built this API to learn Django REST Framework and solve real task management problems. Features user authentication, smart filtering, and complete documentation.
๐ Live Demo | ๐ API Docs | ๐ผ LinkedIn
After completing my BCA, I wanted to build something that demonstrates real-world backend development skills. This project helped me understand:
- How to build secure REST APIs
- User authentication with JWT tokens
- Database design and relationships
- API documentation standards
- Deploying applications to cloud platforms
This is a task management API where users can:
- Create and manage their personal tasks
- Organize tasks by categories
- Set priorities and due dates
- Track task status (Todo โ In Progress โ Completed)
- Search and filter tasks easily
- View analytics on their tasks
Each user only sees their own tasks - I implemented proper authentication and permissions for data privacy.
Built-in Swagger UI makes it easy to test every endpoint
Organized all API requests for easy testing
Users can view, create, and manage their tasks
Smart filtering by status, priority, and search
JWT token-based authentication for security
Django admin for easy data management
Backend:
- Python 3.12.9
- Django 5.0
- Django REST Framework
Database:
- PostgreSQL (deployed on Railway)
- SQLite (while developing locally)
Authentication:
- JWT (JSON Web Tokens) for secure login
Tools & Libraries:
- django-filter - For advanced filtering
- drf-yasg - Auto-generates API documentation
- Postman - For testing all endpoints
- Git & GitHub - Version control
Deployed On:
- Railway (Cloud platform)
- PostgreSQL database (Railway plugin)
- New users can register with email
- Login system using JWT tokens
- Tokens expire after 24 hours for security
- Each user has their own private task space
- Create, read, update, delete tasks
- Add descriptions and due dates
- Set priority levels (Low, Medium, High)
- Track status (Todo, In Progress, Completed)
- Organize with custom categories
- Search tasks by title or description
- Filter by status, priority, or category
- Filter by date range
- Sort by created date, due date, or priority
- Paginated results (10 items per page)
- View total number of tasks
- See breakdown by status
- See breakdown by priority
- See breakdown by category
- Helps users understand their task distribution
- Auto-generated Swagger documentation
- Every endpoint is documented
- Can test APIs directly from browser
- Clear request/response examples
Want to try it on your machine? Here's how:
# 1. Clone the project
git clone https://github.com/yourusername/task-management-api.git
cd task-management-api
# 2. Create virtual environment
python -m venv venv
venv\Scripts\activate # On Windows
# source venv/bin/activate # On Mac/Linux
# 3. Install requirements
pip install -r requirements.txt
# 4. Setup database
python manage.py migrate
# 5. Create admin user
python manage.py createsuperuser
# 6. Run the server
python manage.py runserverThen visit: http://localhost:8000
POST /api/register/
{
"username": "john",
"email": "john@example.com",
"password": "SecurePass123!",
"password2": "SecurePass123!",
"first_name": "John",
"last_name": "Doe"
}POST /api/token/
{
"username": "john",
"password": "SecurePass123!"
}
# You'll get back access and refresh tokensPOST /api/tasks/
Authorization: Bearer your_access_token
{
"title": "Learn Django REST Framework",
"description": "Complete the DRF tutorial",
"status": "IN_PROGRESS",
"priority": "HIGH",
"due_date": "2025-01-25"
}GET /api/tasks/
Authorization: Bearer your_access_token
# Returns all your tasks with pagination# Get only high priority tasks
GET /api/tasks/?priority=HIGH
# Get only completed tasks
GET /api/tasks/?status=COMPLETED
# Search for specific task
GET /api/tasks/?search=django| What It Does | Endpoint | Method |
|---|---|---|
| Register new user | /api/register/ |
POST |
| Login | /api/token/ |
POST |
| View profile | /api/profile/ |
GET |
| Get all tasks | /api/tasks/ |
GET |
| Create task | /api/tasks/ |
POST |
| Update task | /api/tasks/{id}/ |
PUT |
| Delete task | /api/tasks/{id}/ |
DELETE |
| View statistics | /api/tasks/statistics/ |
GET |
| Manage categories | /api/categories/ |
GET, POST |
Full documentation available at /swagger/ when running the app.
I wrote tests for the main functionality:
# Run all tests
python manage.py test
# Check test coverage
coverage run --source='.' manage.py test
coverage reportCurrent test coverage: 10 tests covering authentication and CRUD operations.
- REST API Design - Understanding HTTP methods, status codes, and REST principles
- Authentication - Implementing JWT tokens for secure API access
- Django ORM - Writing efficient database queries, relationships between models
- Serializers - Converting Python objects to JSON and validating data
- Filtering & Pagination - Making APIs user-friendly for large datasets
- API Documentation - Using Swagger for auto-generated docs
- Cloud Deployment - Deploying Django apps with PostgreSQL on Railway
- Ensuring users can only access their own tasks (privacy)
- Handling token expiration and refresh
- Optimizing database queries to avoid N+1 problems
- Making search work across multiple fields
- Debugging deployment issues on Railway
- Writing clean, readable code
- Using Git for version control
- Writing meaningful commit messages
- Creating comprehensive documentation
- Testing core functionality
Here's my deployment process:
# Created requirements.txt with all dependencies
pip freeze > requirements.txt
# Added necessary files for deployment
# Created Procfile for Railway
# Set up environment variables- Set
DEBUG=Falsein production - Configured
ALLOWED_HOSTSfor Railway domain - Set up WhiteNoise for static files
- Configured PostgreSQL database connection
- Created account on Railway (railway.app)
- Created new project
- Connected my GitHub repository
- Railway automatically detected it's a Python/Django app
# Railway makes this super easy!
# Just clicked "Add Plugin" โ PostgreSQL
# Railway automatically created DATABASE_URL variableAdded these in Railway dashboard:
PYTHON_VERSION=3.12.9
SECRET_KEY=your-secret-key
DEBUG=False
ALLOWED_HOSTS=.railway.app
DATABASE_URL=postgresql://... (auto-generated by Railway)
# Railway automatically deploys when I push to GitHub!
git add .
git commit -m "Deploy to Railway"
git push origin main
# Railway builds and deploys automatically# Used Railway's built-in terminal to run migrations
railway run python manage.py migrate
# Created superuser for admin access
railway run python manage.py createsuperuserThe app is now live at: Live Site
Why I chose Railway:
- Very easy to use (beginner-friendly)
- Automatic deployments from GitHub
- Free PostgreSQL database included
- Great for Django projects
- Built-in environment variables management
task-management-api/
โโโ task_api/ # Main project settings
โ โโโ settings.py # Django configuration
โ โโโ urls.py # URL routing
โ โโโ wsgi.py # WSGI config for deployment
โโโ tasks/ # Task management app
โ โโโ models.py # Task and Category models
โ โโโ serializers.py # DRF serializers
โ โโโ views.py # API viewsets
โ โโโ urls.py # App URL routing
โ โโโ tests.py # Unit tests
โโโ screenshots/ # Project screenshots
โโโ requirements.txt # Python dependencies
โโโ Procfile # Railway deployment config
โโโ .env # Environment variables (not in Git)
โโโ .gitignore # Git ignore rules
โโโ README.md # This file
Problem: Never worked with JWT tokens before
Solution: Read DRF-SimpleJWT documentation, tested in Postman, understood access vs refresh tokens
Problem: Getting all tasks with categories was slow (N+1 queries)
Solution: Used select_related() to fetch related data in one query
Problem: Local development used SQLite, but production needed PostgreSQL
Solution:
- Configured Django to use different databases based on environment
- Used
dj-database-urlto parse Railway's DATABASE_URL - Tested database connection before full deployment
Problem: Static files (for admin panel) weren't loading
Solution:
- Installed and configured WhiteNoise
- Ran
collectstaticcommand - Updated settings for static file serving
Problem: Needed different settings for local vs production
Solution:
- Used
python-decouplefor environment management - Set variables in Railway dashboard
- Kept sensitive data out of Git with
.gitignore
This project shows I can:
โ
Build RESTful APIs following industry standards
โ
Implement secure authentication systems
โ
Design and work with relational databases
โ
Write clean, maintainable code
โ
Create comprehensive documentation
โ
Test and debug applications
โ
Deploy applications to cloud platforms (Railway)
โ
Configure PostgreSQL databases
โ
Manage environment variables securely
โ
Use Git and GitHub for version control
โ
Learn new technologies independently
โ
Debug and solve deployment issues
If I continue working on this, I'd add:
- Email notifications when tasks are due
- Ability to share tasks with other users
- Task comments for collaboration
- File attachments for tasks
- Mobile app integration
- Export tasks to PDF or CSV
- Recurring tasks feature
- Calendar view
- Task reminders
- Team workspaces
I'm a BCA graduate (2025) passionate about backend development. I built this project to:
- Learn Django REST Framework deeply
- Understand authentication and API security
- Practice deploying real applications to cloud platforms
- Create something I can show to potential employers
I'm actively looking for opportunities as a Python/Django Developer where I can contribute and continue learning.
What I bring to your team:
- Strong Python and Django skills
- Experience building REST APIs with authentication
- Understanding of databases and cloud deployment (Railway)
- Ability to learn quickly and independently
- Passion for writing clean, maintainable code
- Problem-solving mindset
- Experience with modern deployment workflows
Connect with me:
- ๐ง Email: jssudharsan7@gmail.com
- ๐ผ LinkedIn: linkedin.com/in/sudharsanjs
- ๐ GitHub: @Sudharsan0310
- ๐ฑ Phone: +91-9080600642
This project represents my learning journey with Django REST Framework. I:
- Built it from scratch following tutorials and documentation
- Solved real problems during development
- Deployed it to Railway to demonstrate full deployment capability
- Documented everything for clarity
I'm open to feedback and suggestions for improvement!
Technical Highlights:
- Clean, well-organized code structure
- Proper separation of concerns
- Comprehensive error handling
- Secure authentication implementation
- Optimized database queries
- Professional API documentation
- Django REST Framework documentation was incredibly helpful
- Tech With Rathan DRF tutorial on YouTube
- Railway's excellent deployment documentation
- Stack Overflow community for debugging help
I'd love to walk you through:
- The architecture and design decisions I made
- Challenges I faced and how I solved them
- The deployment process on Railway
- The code structure and organization
- My learning process and next steps
- How I can contribute to your team
Let's connect!
๐ง Email: jssudharsan7@gmail.com ๐ผ LinkedIn: linkedin.com/in/sudharsanjs ๐ฑ Phone: +91-9080600642
I'm available for a call or in-person meeting to discuss how my skills align with your team's needs!
- Lines of Code: ~2000+
- Development Time: 5 days
- Technologies Used: 8+
- API Endpoints: 15+
- Test Coverage: 10 tests
- Deployment Time: Successfully deployed in < 1 hour
Built with Python 3.12.9 & Django
Deployed on Railway
Ready to contribute to your team ๐
Made by [Sudharsan J S] | January 2025