Skip to content

Latest commit

Β 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TaskPilot Banner

Next.js Flask MongoDB License

A modern, full-stack task management application featuring AI-powered task classification, priority-based insights, and a polished dashboard interface that adapts dynamically to your lifestyle.

Explore Demo β€’ Quick Start β€’ API Docs β€’ UX Philosophy


🎯 Project Highlights

βœ… Production-Ready Features

  • πŸ€– AI Task Classification - Auto-categorize tasks with confidence scoring & reasoning.
  • πŸ“Š Smart Dashboard - Priority-based AI insights that adapt dynamically to task state.
  • πŸ” User Authentication - Secure sign-up, login, profile updates, and password resets using robust bcryptjs hashing.
  • 🎨 Four-Column Layout - Streamlined categorization: Today βž” Tomorrow βž” Overdue βž” Upcoming.
  • ⚑ Intelligent Navigation - Context-aware scrolling, section highlighting, and smart collapses.
  • πŸ“± Responsive Design - Mobile-optimized layouts with butter-smooth micro-animations.
  • πŸ‘€ User Isolation - Multi-tenant isolation ensuring users only access their personal tasks.
  • πŸ”„ Instant UI Sync - State-driven updates reflected immediately without annoying page reloads.

🧠 UX Principles Applied

  • Priority-based AI insights (Overdue > Active > Completed > Empty)
  • State-aware navigation (no surprise scrolling, predictable toggle animations)
  • Zero-blink transitions (pure CSS transitions + requestAnimationFrame)
  • Pristine Modal state management (full resets on opening to prevent stale data)
  • High-fidelity visual feedback (green pulse highlights, chevron rotations, interactive hover states)

πŸ”Ž Quick Navigation


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      HTTP      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      HTTP      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      │────────────────>β”‚   Backend        │────────────────>β”‚   AI Service     β”‚
β”‚   (Next.js)     β”‚<────────────────│   (Plain Node)   β”‚<────────────────│   (Flask)        β”‚
β”‚   Port 3000     β”‚   REST API      β”‚   Port 5000      β”‚   Classify API  β”‚   Port 8000      β”‚
β”‚                 β”‚                 β”‚                  β”‚                 β”‚                  β”‚
β”‚ β€’ Dashboard     β”‚                 β”‚ β€’ Task CRUD      β”‚                 β”‚ β€’ NLP Classifier β”‚
β”‚ β€’ Auth Interfaceβ”‚                 β”‚ β€’ User Profile   β”‚                 β”‚ β€’ Confidence     β”‚
β”‚                 β”‚                 β”‚                  β”‚                 β”‚ β€’ Explainability β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                             β”‚
                                             β”‚ MongoDB Driver
                                             β–Ό
                                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                    β”‚   MongoDB Atlas  β”‚
                                    β”‚   (Cloud DB)     β”‚
                                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‚ Project Structure

TaskPilot/
β”œβ”€β”€ backend/                    # Node.js REST API (Plain HTTP Server, No Express)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ models/            # MongoDB Schemas (Task, User)
β”‚   β”‚   β”œβ”€β”€ controllers/       # Business Controllers (task, user)
β”‚   β”‚   β”œβ”€β”€ utils/             # Helper utilities (HTTP parsers, CORS headers)
β”‚   β”‚   └── router.js          # Custom lightweight HTTP router
β”‚   β”œβ”€β”€ .env.example           # Environment template
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/                   # Next.js 16.1.6 (Turbopack layout directly at root)
β”‚   β”œβ”€β”€ app/                   # Dashboard, login, register, and page layouts
β”‚   β”œβ”€β”€ components/            # Task card components, task modals, register helpers
β”‚   β”œβ”€β”€ contexts/              # Authentication & global application state
β”‚   β”œβ”€β”€ utils/                 # Frontend helpers (API handlers, browser storage)
β”‚   └── package.json
β”‚
β”œβ”€β”€ ai-service/                 # Python Flask AI Service
β”‚   β”œβ”€β”€ app.py                 # Flask server
β”‚   β”œβ”€β”€ classifier.py          # NLP task classifier
β”‚   └── requirements.txt
β”‚
β”œβ”€β”€ start-services.bat          # Windows helper to start all services
β”œβ”€β”€ test_services.py            # Service connectivity tester
└── README.md                   # You are here

πŸ“„ Utility Scripts

  • start-services.bat - Windows batch script to launch all three services simultaneously (Windows only)
  • test_services.py - Python script to verify backend, frontend, and AI service connectivity

πŸš€ Quick Start

Prerequisites

1️⃣ Clone Repository

git clone https://github.com/abhijithk-ak/TaskPilot.git
cd TaskPilot

2️⃣ Backend Setup

cd backend
npm install

# Create .env file from template
cp .env.example .env

# Edit .env and add your MongoDB credentials:
# MONGODB_URI=mongodb+srv://<username>:<password>@<cluster-url>/taskpilot?retryWrites=true&w=majority

# Start backend server
npm run dev

πŸ‘‰ Backend running on http://localhost:5000

3️⃣ AI Service Setup

cd ../ai-service

# Create virtual environment
python -m venv venv

# Activate (Windows)
.\venv\Scripts\Activate.ps1

# Activate (Mac/Linux)
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Start AI service
python app.py

πŸ‘‰ AI Service running on http://localhost:8000

4️⃣ Frontend Setup

cd ../frontend
npm install

# Start development server
npm run dev

πŸ‘‰ Frontend running on http://localhost:3000

πŸŽ‰ Access Application

Open your browser and navigate to:

http://localhost:3000

🎨 Features Walkthrough

πŸ“Š Dashboard Layout

Four Dynamic Columns:

  • πŸ”΅ Today - Active + completed tasks due today (blue gradient highlight)
  • 🟑 Tomorrow - Tasks due tomorrow (yellow gradient highlight)
  • πŸ”΄ Overdue - Past due tasks requiring attention (red gradient highlight)
  • 🟣 Upcoming - Future tasks (purple gradient highlight)

Adaptive Layout:

  • Columns automatically appear/disappear based on task availability.
  • Grid auto-adjusts layout dynamically (2-4 columns based on current content).
  • Fully mobile-responsive with single-column layout transitions.

πŸ€– AI Productivity Insights

Priority-Based Intelligence Engine:

1️⃣ Overdue tasks exist     βž” ⚠️ Warning tone (Red alert styling)
                               "You have 3 overdue tasks..."

2️⃣ Active tasks today      βž” 🎯 Focus tone (Blue accent styling)
                               "Peak hours: 10-12 PM. Focus on..."

3️⃣ Today complete          βž” πŸŽ‰ Success tone (Green accent styling)
                               "Great work! All tasks completed..."

4️⃣ No tasks                βž” πŸ’‘ Neutral tone (Slate/gray styling)
                               "Clean slate! Add tasks..."

πŸ“‘ API Reference

Backend Endpoints (Port 5000)

User Authentication API

POST   /auth/register               # Sign up a new user (with password hashing)
POST   /auth/login                  # Log in and check credentials
POST   /auth/reset-password         # Reset account password
GET    /auth/profile?email={email}  # Retrieve user profile & settings
PUT    /auth/profile                # Update name & custom preferences

Tasks API

GET    /tasks?userEmail={email}     # Fetch all tasks scoped to email
POST   /tasks                       # Create a new task
PUT    /tasks/:id                   # Update an existing task
DELETE /tasks/:id                   # Delete a task
POST   /tasks/classify              # AI Task classification

πŸ›‘οΈ Security Analysis

Before committing and pushing this codebase to public Git repositories, please review the security audit checklist below:

🚨 Vulnerability Highlights

  1. Missing Authentication/Authorization Middleware:
    • Observation: The custom backend routing structure processes data operations (e.g., retrieving tasks) by matching parameters such as ?userEmail={email} directly from query inputs. There is no active validation check like a JWT authorization header or session validation.
    • Mitigation: Implement standard token-based validation (JWT signature checks) on routes mapping parameters other than /auth/login and /auth/register.
  2. No Payload Size Limit (Potential Denial of Service):
    • Observation: The manual parseBody(req) function inside backend/src/utils/http.js processes requests by continuously appending incoming chunks without restriction:
      req.on('data', chunk => { data += chunk; });
    • Mitigation: Implement a boundary check (e.g., limit incoming strings to 1MB maximum size limit) to prevent memory exhaustion crashes.
  3. Global CORS Policy:
    • Observation: The headers inside http.js export Access-Control-Allow-Origin: '*' to all origins.
    • Mitigation: Restrict cross-origin rules to production domains instead of using the wildcard parameter.

πŸ” Git Push Safety

  • Database Credentials: Actual Database connections are pulled from process.env.MONGODB_URI. Make sure your active backend/.env file containing secrets is never committed to version control.
  • Ignore Patterns: The global .gitignore contains rule blocks for .env, node_modules/, and venv/, ensuring standard build configs and secrets are safely ignored during git add . staging routines.

🀝 Contributing

We welcome contributions! Here's how:

  1. Fork the repository
  2. Create your feature branch
    git checkout -b feature/AmazingFeature
  3. Commit your changes
    git commit -m 'feat: add AmazingFeature'
  4. Push to the branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

πŸ“„ License

This project is open source and available under the MIT License.

About

AI-powered task management system with intelligent prioritization, smart navigation, and polished UX.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages