A full-stack web application that combines intelligent task management with AI-powered features for enhanced productivity. Built with Django REST Framework backend and Next.js frontend.
- Task Management: Create, edit, delete, and organize tasks
- Smart Categorization: Auto-categorize tasks with AI suggestions
- Priority Management: AI-powered priority scoring (0-100)
- Deadline Suggestions: Intelligent deadline recommendations
- Status Tracking: Todo, In Progress, Done status management
- Tag System: Flexible tagging for better organization
- Context Analysis: Process daily messages, emails, and notes
- Task Prioritization: AI ranks tasks based on urgency and context
- Smart Descriptions: Enhanced task descriptions with context-aware details
- Deadline Intelligence: Realistic deadline suggestions based on complexity
- Category Suggestions: Auto-suggest categories and tags
- Dual AI Support: OpenAI API + Local LLM (LM Studio) support
- Responsive Design: Works seamlessly on desktop and mobile
- Real-time Updates: Live data synchronization
- Advanced Filtering: Filter by status, priority, category, and more
- Search Functionality: Full-text search across tasks
- Dashboard Analytics: Task completion statistics and insights
- Dark Mode Ready: Modern UI with Tailwind CSS
- Django 4.2.7 - Web framework
- Django REST Framework - API development
- PostgreSQL - Database (Supabase)
- OpenAI API - AI integration
- LM Studio Support - Local LLM hosting
- Next.js 14 - React framework
- Tailwind CSS - Styling
- SWR - Data fetching and caching
- React Hook Form - Form management
- Lucide React - Icons
- OpenAI GPT-3.5-turbo - External AI service
- LM Studio - Local LLM hosting (recommended)
- Context Processing - Daily context analysis
- Smart Suggestions - AI-powered task enhancement
comata9462-project/
├── backend/ # Django REST API
│ ├── ai_module/ # AI processing module
│ ├── tasks/ # Task management app
│ ├── smart_todo/ # Django project settings
│ ├── requirements.txt # Python dependencies
│ └── manage.py # Django management script
├── frontend/ # Next.js React application
│ ├── components/ # Reusable React components
│ ├── pages/ # Next.js pages and API routes
│ ├── lib/ # Utility functions and API client
│ ├── styles/ # CSS and styling
│ └── package.json # Node.js dependencies
├── quick-start.sh # Automated setup script
├── cleanup-production.sh # Production cleanup script
└── README.md # This file
- Python 3.9+
- Node.js 18+
- PostgreSQL database (Supabase configured)
- OpenAI API key (already configured)
The project is production-ready and pre-configured for the OpenHands runtime environment.
# Run the automated setup script
./quick-start.sh- Backend Setup
cd backend
python -m pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver 0.0.0.0:12000 > backend.log 2>&1 &- Frontend Setup
cd frontend
npm install
echo "NEXT_PUBLIC_BACKEND_URL=https://work-1-zxnbvxythqwtjtxu.prod-runtime.all-hands.dev" > .env.local
echo "NEXT_PUBLIC_API_URL=https://work-1-zxnbvxythqwtjtxu.prod-runtime.all-hands.dev/api" >> .env.local
npm run dev -- --port 12001 --hostname 0.0.0.0 > frontend.log 2>&1 &- Frontend: https://work-2-zxnbvxythqwtjtxu.prod-runtime.all-hands.dev
- Backend API: https://work-1-zxnbvxythqwtjtxu.prod-runtime.all-hands.dev/api
# Remove all unnecessary files for production
./cleanup-production.shFor local development outside OpenHands:
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your local configuration
# Setup database
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
# Run server
python manage.py runservercd frontend
# Install dependencies
npm install
# Configure environment
cp .env.local.example .env.local
# Edit .env.local:
# NEXT_PUBLIC_API_URL=http://localhost:8000/api
# Run development server
npm run dev- Get API key from OpenAI Platform
- Add to backend
.env:OPENAI_API_KEY=your_key_here - Restart backend server
- Download LM Studio
- Install a compatible model (Llama 2, Mistral, etc.)
- Start local server in LM Studio
- Add to backend
.env:LOCAL_LLM_URL=http://127.0.0.1:1234/v1/chat/completions - Restart backend server
- Access the Application: Open https://work-2-zxnbvxythqwtjtxu.prod-runtime.all-hands.dev in your browser
- Dashboard Overview: View your task statistics and recent tasks
- Create Tasks: Click "Add Task" to create new tasks with AI assistance
- AI Enhancement: Use "Get AI Suggestions" for smart task creation
- ✅ Create Tasks: Add new tasks with title, description, priority, and deadlines
- ✅ AI Suggestions: Get intelligent suggestions for priority, category, tags, and descriptions
- ✅ Task Status: Track tasks as "To Do", "In Progress", or "Done"
- ✅ Priority Levels: Set priority from 0-100 with visual indicators
- ✅ Categories: Organize tasks by Work, Personal, etc.
- ✅ Tags: Add multiple tags for better organization
- ✅ Smart Suggestions: AI analyzes task titles and provides relevant suggestions
- ✅ Enhanced Descriptions: AI generates detailed, context-aware task descriptions
- ✅ Priority Intelligence: AI suggests appropriate priority levels (0-100)
- ✅ Category Detection: AI recommends suitable categories
- ✅ Tag Generation: AI suggests relevant tags for better organization
- ✅ Task Statistics: View total, completed, pending, and overdue tasks
- ✅ Recent Tasks: See your latest tasks with full details
- ✅ Real-time Updates: Dashboard updates immediately after task creation
- ✅ Navigation: Easy access to all features via sidebar menu
- ✅ Responsive Design: Works on desktop and mobile devices
- ✅ API Integration: Full REST API with Django backend
- ✅ Database: PostgreSQL with Supabase hosting
- ✅ AI Integration: OpenAI GPT integration for smart suggestions
- ✅ CORS Support: Proper cross-origin request handling
- ✅ Error Handling: Graceful error handling and user feedback
- Create a Task: Click "Add Task" and enter a task title
- Get AI Suggestions: Click "Get AI Suggestions" button
- Apply Suggestions: Use "Apply" buttons to accept AI recommendations for:
- Priority level (0-100 scale)
- Category (Work, Personal, etc.)
- Tags (relevant keywords)
- Enhanced description (detailed task breakdown)
- Save Task: Click "Create Task" to save with AI enhancements
GET /api/tasks/- List all tasksPOST /api/tasks/- Create new taskGET /api/tasks/{id}/- Get specific taskPUT /api/tasks/{id}/- Update taskDELETE /api/tasks/{id}/- Delete taskGET /api/tasks/overdue/- Get overdue tasksGET /api/tasks/stats/- Get task statistics
GET /api/contexts/- List context entriesPOST /api/contexts/- Create context entryPOST /api/contexts/bulk_create/- Create multiple entries
POST /api/ai/suggestions/- Get AI task suggestionsPOST /api/ai/analyze-context/- Analyze context entriesPOST /api/ai/enhance-task/{id}/- Enhance existing taskGET /api/ai/health/- Check AI service health
{
"title": "Prepare quarterly presentation",
"description": "Create slides for Q4 business review meeting",
"priority": 75,
"deadline": "2024-01-15T14:00:00Z",
"category": "Work",
"tags": ["presentation", "quarterly", "urgent"]
}{
"content": "Meeting with client tomorrow at 2 PM to discuss project requirements",
"source": "email"
}{
"suggestions": {
"priority": 85,
"deadline": "2024-01-20T17:00:00Z",
"category": "Work",
"tags": ["client", "meeting", "requirements"],
"enhanced_description": "Prepare for client meeting by reviewing project scope, preparing questions about requirements, and gathering relevant documentation."
}
}SECRET_KEY=your-django-secret-key
DEBUG=True
DB_NAME=smart_todo
DB_USER=postgres
DB_PASSWORD=your-password
DB_HOST=localhost
DB_PORT=5432
OPENAI_API_KEY=your-openai-key
LOCAL_LLM_URL=http://127.0.0.1:1234/v1/chat/completionsNEXT_PUBLIC_API_URL=http://localhost:8000/api- ✅ Backend: Running on OpenHands runtime (port 12000)
- ✅ Frontend: Running on OpenHands runtime (port 12001)
- ✅ Database: PostgreSQL hosted on Supabase
- ✅ AI Service: OpenAI API integration active
- Set environment variables in your hosting platform
- Configure PostgreSQL database connection
- Run migrations:
python manage.py migrate - Collect static files:
python manage.py collectstatic - Configure CORS for your frontend domain
- Set
NEXT_PUBLIC_API_URLto your backend URL - Build:
npm run build - Deploy build files
- Configure environment variables
# Check if port is in use
lsof -i :12000
# Check backend logs
tail -f /workspace/comata9462-project/backend/backend.log
# Restart backend
cd /workspace/comata9462-project/backend
python manage.py runserver 0.0.0.0:12000# Check frontend logs
tail -f /workspace/comata9462-project/frontend/frontend.log
# Verify environment configuration
cat /workspace/comata9462-project/frontend/.env.local
# Restart frontend
cd /workspace/comata9462-project/frontend
npm run dev -- --port 12001 --hostname 0.0.0.0# Test backend API
curl -s https://work-1-zxnbvxythqwtjtxu.prod-runtime.all-hands.dev/api/
# Check CORS configuration
grep -r "CORS" /workspace/comata9462-project/backend/# Test database connection
cd /workspace/comata9462-project/backend
python manage.py dbshell
# Check migrations
python manage.py showmigrationsEnsure these are properly configured:
DEBUG=True
SECRET_KEY=django-insecure-1234567890
ALLOWED_HOSTS=*
CORS_ALLOW_ALL_ORIGINS=True
DB_NAME=postgres
DB_USER=postgres.richcxbjrggbdsbeylzx
DB_PASSWORD=thevectorguy123@
DB_HOST=aws-0-ap-south-1.pooler.supabase.com
DB_PORT=6543
OPENAI_API_KEY=sk-proj-...NEXT_PUBLIC_BACKEND_URL=https://work-1-zxnbvxythqwtjtxu.prod-runtime.all-hands.dev
NEXT_PUBLIC_API_URL=https://work-1-zxnbvxythqwtjtxu.prod-runtime.all-hands.dev/api- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT API
- LM Studio for local LLM hosting
- Supabase for database hosting
- Tailwind CSS for styling
- Next.js and Django communities
For questions or support, please contact: devgods99@gmail.com
Built with ❤️ for the Full Stack Developer Assignment