Skip to content

Repository files navigation

⚡ SmartTask — AI-Powered Task Manager v2.0

A full-stack, production-grade task management system combining
React 18 (frontend), Node.js + Express (backend), and FastAPI (Python AI microservice).


✨ What's New in v2.0

Feature Details
🎨 Light/Dark Mode Synced to DB — persists across devices
📱 Fully Responsive Mobile nav + collapsible desktop sidebar
🤖 Real-time AI Priority Suggestions appear as you type in the task form
📊 AI Summary on Dashboard Real overdue task summary via Python /summarize_overdue
✏️ Editable & Duplicatable Tasks Edit inline, duplicate with one click
📡 WS Live Monitor See every WebSocket event in real-time; emit custom events
🔧 API Explorer Test every AI endpoint (including admin) from the UI
🤖 AI Lab Model info, manual retrain, feedback submission, evaluation
⚙️ Settings Page Profile, theme, notifications, password change
⌨️ Keyboard Shortcuts D/T/N/A/L/X/S to navigate instantly
🎉 Confetti on Complete Celebrate task completion!
🔔 Smart Notifications Overdue + due-soon WebSocket alerts
📈 7-Day Activity Chart Visualize your productivity trend

🗂 Project Structure

smart-task-manager/
├── client/                          # React 18 Frontend
│   ├── public/index.html
│   ├── package.json
│   └── src/
│       ├── App.js                   # Main app shell + routing
│       ├── index.js
│       ├── theme.js                 # Light/dark theme tokens
│       ├── styles/
│       │   └── global.css           # Complete design system CSS
│       ├── context/
│       │   ├── AuthContext.js       # JWT auth + user state
│       │   ├── ThemeContext.js      # Theme + DB sync
│       │   ├── SocketContext.js     # WS + live logs
│       │   └── ToastContext.js      # Toast notifications
│       ├── services/
│       │   └── api.js               # Node + Python API clients
│       └── components/
│           ├── Auth/Auth.js         # Login + Register (combined)
│           ├── Dashboard/
│           │   ├── Dashboard.js     # Stats + AI summary + chart
│           │   ├── StatsCard.js     # Animated stat card
│           │   └── AISummary.js     # AI overdue summary panel
│           ├── Tasks/
│           │   ├── TaskForm.js      # Create/edit + live AI suggestion
│           │   ├── TaskCard.js      # Card with edit/duplicate/delete
│           │   └── TaskList.js      # Filter/sort/search + grid/list view
│           ├── Layout/
│           │   ├── Sidebar.js       # Collapsible dark sidebar
│           │   ├── TopBar.js        # Header with notifications
│           │   └── BottomNav.js     # Mobile bottom navigation
│           ├── Notifications/
│           │   └── NotificationBell.js
│           ├── Admin/
│           │   ├── APIExplorer.js   # Test all AI endpoints
│           │   ├── AIPanel.js       # Retrain, feedback, evaluation
│           │   └── WSMonitor.js     # Live WS event stream
│           └── Settings/
│               └── Settings.js      # Profile + theme + security
│
├── server/                          # Node.js + Express Backend
│   ├── .env
│   ├── package.json
│   └── src/
│       ├── server.js                # Express + Socket.io + overdue checker
│       ├── middleware/auth.js        # JWT protect middleware
│       ├── models/
│       │   ├── User.js              # User + preferences (theme)
│       │   └── Task.js              # Task + duplicate support
│       ├── routes/
│       │   ├── auth.js              # register/login/profile/preferences/password
│       │   └── tasks.js             # CRUD + duplicate + AI feedback on create
│       └── services/
│           └── pythonApiService.js  # Calls FastAPI
│
├── smart_task/                      # Python FastAPI AI Microservice
│   ├── fastapi_smart_task_ai_service.py
│   ├── core_ai.py
│   ├── ai_extensions.py
│   ├── retrain_helper.py
│   ├── requirements.txt
│   └── tests/
│
├── docker-compose.yml               # Full Docker stack
├── start_all.bat                    # Windows launcher
├── start_all.sh                     # macOS/Linux launcher
└── README.md

⚙️ Setup Guide

Prerequisites

  • Node.js ≥ 18
  • Python ≥ 3.10
  • MongoDB running locally (or use Docker)

🚀 Quick Start (All Platforms)

Windows:

start_all.bat

macOS / Linux:

chmod +x start_all.sh && ./start_all.sh

This auto-installs dependencies and starts all three services.


Manual Setup

1. AI Service (FastAPI — port 8001)

cd smart_task
python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate
pip install -r requirements.txt
python fastapi_smart_task_ai_service.py

Swagger UI: http://localhost:8001/docs

2. Backend (Node.js — port 5000)

cd server
npm install
# Edit .env if needed
npm run dev

3. Frontend (React — port 3000)

cd client
npm install
npm start

🐳 Docker (Full Stack)

docker-compose up --build
Service URL
🖥️ Frontend http://localhost:3000
⚙️ Backend http://localhost:5000
🤖 AI Service http://localhost:8001
📖 AI Docs http://localhost:8001/docs
📦 MongoDB mongodb://localhost:27017

🔑 Key Features Deep-Dive

🤖 AI Priority Suggestion (Real-time)

As you type a task title, description, or set a due date — the AI model automatically predicts the best priority level with confidence scores. You can:

  • Accept the AI suggestion in one click
  • Override it manually (the AI learns from your choice via feedback)

📊 AI Summary on Dashboard

The dashboard fetches a real extractive summary from the Python /summarize_overdue endpoint, showing an intelligent natural-language overview of your overdue tasks.

🔁 AI Retraining

  • Automatic: Scheduled retraining from feedback every N hours (configurable)
  • On task creation: User's chosen priority is submitted as feedback
  • Manual: Trigger retrain from AI Lab in the UI
  • On task status change: Completing a task sends feedback to AI

📡 WebSocket Live Monitor

See every WebSocket event (incoming + outgoing) in real-time with timestamps, direction indicators, and event names. You can also emit custom events directly from the UI.

🔧 API Explorer

Test every Python AI endpoint — predict priority, summarize tasks, submit feedback, retrain, manage the scheduler, evaluate the model — all from the browser, no Postman needed.


🗝️ API Reference

Node.js Backend (localhost:5000)

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login Login
GET /api/auth/me Get current user
PUT /api/auth/profile Update name/email
PUT /api/auth/preferences Update theme/notifications (saves to DB)
PUT /api/auth/password Change password
GET /api/tasks Get all tasks (auto-updates overdue status)
POST /api/tasks Create task (triggers AI prediction + feedback)
PUT /api/tasks/:id Update task
DELETE /api/tasks/:id Delete task
POST /api/tasks/:id/duplicate Duplicate task
GET /api/tasks/overdue/summary AI summary of overdue tasks

Python AI Service (localhost:8001)

Method Endpoint Description
GET /health Health check
GET /model_info Model info + metadata
POST /predict_priority Predict task priority
POST /summarize_overdue Summarize overdue tasks
POST /feedback Submit labeled feedback
POST /update_model Train with labeled samples
POST /evaluate_model Evaluate model accuracy
POST /admin/retrain_now Force retrain from feedback
GET /admin/scheduler_status Scheduler status
POST /admin/start_scheduler Start auto-retrain
POST /admin/stop_scheduler Stop auto-retrain
POST /admin/reload_scheduler Change scheduler interval
POST /reset_model Reset model (admin)
GET /export_model Download model file (admin)
POST /bulk_train_csv Bulk train from CSV (admin)

⌨️ Keyboard Shortcuts

Key Action
D Dashboard
T My Tasks
N New Task
A AI Lab
L Live Monitor
X API Explorer
S Settings

🛠️ Tech Stack

Layer Technology
Frontend React 18, Context API, CSS Variables, Socket.io-client
Backend Node.js, Express 4, Mongoose, Socket.io, JWT
AI Service Python, FastAPI, scikit-learn (Naive Bayes + TF-IDF), NLTK
Database MongoDB
Real-time WebSocket (Socket.io)
Deployment Docker + Docker Compose
Design Custom CSS Design System (Syne + DM Sans fonts)

📜 License

MIT License © 2025 — SmartTask v2.0

About

Smart Task Manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages