A modern, responsive React-based Single Page Application (SPA) for efficient personal task management with stunning UI/UX, authentication, and database integration.
This project is fully implemented and ready for testing!
- β All Priority 1 features complete (Auth, CRUD, Dashboard)
- β All Priority 2 features complete (OTP, Search, Filters, Statistics)
- β All Priority 3 features complete (Google OAuth, Navigation, Error Handling)
- β Database schema created and indexed
- β Full backend implementation (Express.js + MySQL)
- β Full frontend implementation (React + Vite)
- β Comprehensive documentation
π Jump to Quick Start or Read SETUP_CHECKLIST.md for detailed instructions
- SETUP_CHECKLIST.md β Start here! Step-by-step setup + 12 test scenarios
- QUICK_REFERENCE.md - Copy-paste commands and quick fixes
- TROUBLESHOOTING.md - Common issues and solutions
- FINAL_STATUS.md - What's been implemented
- IMPLEMENTATION_COMPLETE.md - Detailed breakdown
- β Add, Edit, Delete Tasks - Full CRUD operations for task management
- π Task Status Management - Organize tasks by TODO, In Progress, Done
- π Search & Filter - Search by name/description and filter by status, priority, deadline
- β° Deadline System - Set deadlines for tasks with visual warnings for approaching/overdue tasks
- π Statistics Dashboard - Quick overview of total tasks, completed, and overdue tasks
- πΎ Data Persistence - LocalStorage backup + MySQL database storage
- π± Responsive Design - Beautiful on mobile, tablet, and desktop
- π¨ Modern UI - Tailwind CSS with animations, 3D effects, and hero banners
- π User Registration & Login - Secure authentication with JWT
- π Google OAuth 2.0 - One-click Google login
- If email exists: Direct login
- If email not exists: Automatic account creation with OTP verification
- π Forgot Password - Password recovery with 6-digit OTP via email
- π§ Email OTP Verification - 6-character OTP with 5-minute expiration
- π¨ Auth Page - Split layout with hero banner and login/register card
- π PopMessage - Toast notifications (success/error) at top-right, auto-dismiss in 3 seconds
- β‘ Loading Animations - Modern, unique loading effects
- πͺ Hero Banners - Prominent project showcases with animations
- π Modern Effects - Smooth animations, 3D transforms, glass-morphism, gradients
- π― Micro-interactions - Intuitive hover effects and transitions
- Node.js (v16 or higher)
- npm or yarn
- MySQL (v8 or higher)
- Git
git clone https://github.com/thomas-tran-fullstack/Task_Manager.git
cd task-managercd frontend
npm install
npm run devcd backend
npm install# Create MySQL database
mysql -u root -p < database/schema.sql
# Or manually:
# 1. Open MySQL
# 2. Create database: CREATE DATABASE task_manager;
# 3. Use database: USE task_manager;
# 4. Import schema: source path/to/schema.sql;Backend (.env)
PORT=5000
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=task_manager
JWT_SECRET=your_jwt_secret_key_here
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=thomastran.fullstack@gmail.com
SMTP_PASSWORD=**** **** ****
Frontend (.env)
VITE_API_URL=http://localhost:5000/api
VITE_GOOGLE_CLIENT_ID=your_google_client_id
# Terminal 1: Backend
cd backend
npm run dev
# Terminal 2: Frontend
cd frontend
npm run devAccess the application at http://localhost:5173
- Sign Up: Create account with email and password
- Login: Use registered email and password
- Google OAuth: Click "Login with Google" for instant access
- Forgot Password: Click "Forgot Password" β Enter email β Verify with OTP β Reset password
- Add Task: Click "Add Task" button β Fill form β Set deadline β Submit
- Edit Task: Click task card β Click edit icon β Modify β Save
- Delete Task: Click task card β Click delete icon β Confirm
- Change Status: Drag task between columns or click status button
- Set Deadline: Select date/time when creating or editing task
- Search: Use search bar to find tasks by name/description
- Filter by Status: Use status filter dropdown
- Filter by Priority: Use priority filter dropdown
- Filter by Deadline: Select time range (Today, This Week, Overdue)
- Reset Filters: Click "Reset" button to clear all filters
- Success: Green popup appears for 3 seconds
- Error: Red popup appears for 3 seconds
- Overdue: Red badge on task card
- Approaching: Yellow badge on task card (24 hours before deadline)
task-manager/
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ Auth/
β β β β βββ LoginForm.jsx
β β β β βββ RegisterForm.jsx
β β β β βββ HeroBanner.jsx
β β β β βββ OTPVerification.jsx
β β β β βββ ForgotPassword.jsx
β β β βββ Task/
β β β β βββ TaskCard.jsx
β β β β βββ TaskForm.jsx
β β β β βββ TaskBoard.jsx
β β β β βββ TaskFilter.jsx
β β β β βββ TaskSearch.jsx
β β β βββ Dashboard/
β β β β βββ Dashboard.jsx
β β β β βββ StatisticsWidget.jsx
β β β β βββ ProgressChart.jsx
β β β βββ Common/
β β β β βββ PopMessage.jsx
β β β β βββ LoadingSpinner.jsx
β β β β βββ HeroBanner.jsx
β β β β βββ Navbar.jsx
β β β βββ Layout/
β β β βββ MainLayout.jsx
β β β βββ AuthLayout.jsx
β β βββ pages/
β β β βββ AuthPage.jsx
β β β βββ DashboardPage.jsx
β β β βββ TasksPage.jsx
β β β βββ NotFoundPage.jsx
β β βββ services/
β β β βββ api.js
β β β βββ authService.js
β β β βββ taskService.js
β β β βββ storageService.js
β β β βββ toastService.js
β β βββ context/
β β β βββ AuthContext.jsx
β β β βββ TaskContext.jsx
β β β βββ ToastContext.jsx
β β βββ hooks/
β β β βββ useAuth.js
β β β βββ useTasks.js
β β β βββ useForm.js
β β β βββ useToast.js
β β βββ utils/
β β β βββ validation.js
β β β βββ formatters.js
β β β βββ constants.js
β β β βββ helpers.js
β β βββ styles/
β β β βββ globals.css
β β β βββ animations.css
β β β βββ tailwind.css
β β βββ App.jsx
β β βββ main.jsx
β βββ public/
β βββ index.html
β βββ tailwind.config.js
β βββ postcss.config.js
β βββ vite.config.js
β βββ package.json
β
βββ backend/
β βββ src/
β β βββ routes/
β β β βββ auth.js
β β β βββ tasks.js
β β β βββ user.js
β β βββ controllers/
β β β βββ authController.js
β β β βββ taskController.js
β β β βββ userController.js
β β βββ middleware/
β β β βββ auth.js
β β β βββ errorHandler.js
β β β βββ validation.js
β β βββ models/
β β β βββ User.js
β β β βββ Task.js
β β β βββ OTPVerification.js
β β βββ services/
β β β βββ authService.js
β β β βββ taskService.js
β β β βββ emailService.js
β β β βββ tokenService.js
β β βββ config/
β β β βββ database.js
β β β βββ googleOAuth.js
β β βββ index.js
β β βββ server.js
β βββ database/
β β βββ schema.sql
β βββ .env
β βββ .gitignore
β βββ package.json
β βββ README.md
β
βββ database/
β βββ schema.sql
β
βββ .gitignore
βββ README.md
βββ TODO.md
- React 18 with Vite for fast development and optimized builds
- Reason: Excellent component reusability, large ecosystem, optimal for SPA
- Tailwind CSS with custom animations and configurations
- Reason: Utility-first approach enables rapid UI development, highly customizable, excellent for responsive design
- React Context API for global state (Auth, Tasks, Toast)
- Reason: Lightweight, built-in, sufficient for this project scope
- MySQL for robust, relational data storage
- Reason: Reliable, scalable, excellent for structured data like tasks and users
- JWT (JSON Web Tokens) for session management
- Google OAuth 2.0 for third-party authentication
- OTP via Email for secure verification
- Reason: Industry standard, secure, supports both traditional and OAuth2 flows
- Axios with interceptors for automatic token refresh
- Reason: Better error handling than Fetch, supports request/response interceptors
- Express.js with Node.js
- Reason: Lightweight, high performance, excellent for REST APIs
- LocalStorage for offline task backup
- MySQL Database for primary data storage
- Reason: Ensures data persistence and enables offline functionality
POST /api/auth/register
Content-Type: application/json
{
"email": "user@example.com",
"password": "securePassword123",
"name": "User Name"
}
Response (200):
{
"success": true,
"message": "User registered successfully",
"token": "jwt_token_here",
"user": { ... }
}
POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "securePassword123"
}
Response (200):
{
"success": true,
"token": "jwt_token_here",
"user": { ... }
}
POST /api/auth/google
Content-Type: application/json
{
"idToken": "google_id_token_here"
}
Response (200):
{
"success": true,
"isNewUser": false,
"token": "jwt_token_here",
"user": { ... }
}
POST /api/auth/forgot-password
Content-Type: application/json
{
"email": "user@example.com"
}
Response (200):
{
"success": true,
"message": "OTP sent to email"
}
POST /api/auth/verify-otp
Content-Type: application/json
{
"email": "user@example.com",
"otp": "123456"
}
Response (200):
{
"success": true,
"resetToken": "temporary_token_here"
}
POST /api/auth/reset-password
Content-Type: application/json
{
"resetToken": "temporary_token_here",
"newPassword": "newSecurePassword123"
}
Response (200):
{
"success": true,
"message": "Password reset successfully"
}
GET /api/tasks
Authorization: Bearer jwt_token
Query Parameters:
- status: TODO|In Progress|Done
- priority: Low|Medium|High
- search: search_term
- sortBy: createdAt|deadline|priority
Response (200):
{
"success": true,
"tasks": [ ... ]
}
POST /api/tasks
Authorization: Bearer jwt_token
Content-Type: application/json
{
"title": "Task Title",
"description": "Task Description",
"priority": "Medium",
"deadline": "2024-12-31T23:59:59Z",
"status": "TODO"
}
Response (201):
{
"success": true,
"task": { ... }
}
PUT /api/tasks/:id
Authorization: Bearer jwt_token
Content-Type: application/json
{
"title": "Updated Title",
"description": "Updated Description",
"priority": "High",
"deadline": "2024-12-31T23:59:59Z",
"status": "In Progress"
}
Response (200):
{
"success": true,
"task": { ... }
}
DELETE /api/tasks/:id
Authorization: Bearer jwt_token
Response (200):
{
"success": true,
"message": "Task deleted successfully"
}
GET /api/tasks/statistics
Authorization: Bearer jwt_token
Response (200):
{
"success": true,
"statistics": {
"totalTasks": 25,
"completedTasks": 10,
"overdueTasks": 3,
"inProgressTasks": 12,
"completionRate": 40
}
}
Toast notifications displayed at top-right corner
// Usage
const { showMessage } = useToast();
showMessage('Task created successfully', 'success');
showMessage('Error creating task', 'error');Unique, modern loading effect while fetching data
Split layout with project logo, description, and authentication card
Modern card with 3D hover effect, deadline indicators, and action buttons
- Code splitting and lazy loading for routes
- Image optimization with proper formats
- MinifiedCSS and JavaScript in production
- Efficient database queries with indexing
- LocalStorage sync to reduce API calls
- Debounced search and filter operations
- Password hashing with bcrypt (10 rounds)
- JWT token-based authentication with 24-hour expiration
- Refresh token rotation for enhanced security
- Email verification for account recovery
- OTP time-based expiration (5 minutes)
- CORS enabled only for allowed origins
- Input validation and sanitization on all endpoints
- Protected API endpoints with middleware
- Secure HTTP headers with helmet.js
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
Error: Unable to connect to database
Solution:
1. Verify MySQL is running
2. Check credentials in .env
3. Ensure database exists: CREATE DATABASE task_manager;
Error: Invalid client configuration
Solution:
1. Verify Google Client ID in .env
2. Check redirect URI in Google Console
3. Ensure .env variables are loaded
Error: Email not sending
Solution:
1. Check SMTP credentials in .env
2. Enable "Less secure app access" for Gmail
3. Use app password instead of regular password
4. Check email spam folder
Error: Access to XMLHttpRequest blocked by CORS
Solution:
1. Verify backend CORS is configured
2. Check frontend VITE_API_URL
3. Ensure API URL matches backend origin
- Push code to GitHub
- Connect repository to Vercel/Netlify
- Set environment variables
- Deploy with
npm run build
- Configure Procfile
- Set environment variables
- Deploy with Git push
- Run migrations:
npm run migrate
- Email Notifications: Send reminders 24 hours before deadline
- Task Sharing: Share tasks with other users or teams
- Recurring Tasks: Support for daily/weekly/monthly recurring tasks
- Subtasks: Break down tasks into smaller subtasks
- File Attachments: Attach files to tasks
- Task Comments: Collaborate with comments on tasks
- Activity History: Track all changes to tasks
- Dark Mode: Full dark mode support
- Mobile App: React Native mobile application
- Advanced Analytics: Task completion trends, productivity insights
- Calendar View: Kanban and calendar view options
- Integration: Sync with Google Calendar, Slack notifications
- Offline Sync: Better offline support with Service Workers
- Tagging System: Add tags/labels to tasks
- Priority Levels: More granular priority system
- Time Tracking: Track time spent on tasks
- Team Management: Multi-user support and collaboration
MIT License - See LICENSE file for details
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For support email: thomastran.fullstack@gmail.com
Last Updated: March 25, 2026 Version: 1.0.0 Developer: Tran Bao Toan