A modern, feature-rich to-do list application with user authentication, task scheduling, and smart email notifications. Built with React, Node.js, and MongoDB.
- π User Authentication - Secure registration and login with JWT
- π Task Management - Create, update, delete, and organize tasks
- β° Smart Notifications - Email alerts 15 minutes before task deadlines
- π± Responsive Design - Works seamlessly on desktop and mobile
- π― Real-time Updates - Instant UI updates without page refresh
- π Task Analytics - Dashboard with task statistics and status tracking
- π Production Ready - Fully deployable with environment configuration
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- bcryptjs - Password hashing
- Nodemailer - Email notifications
- node-cron - Task scheduling
- React.js - UI framework
- TailwindCSS - Styling
- React Router - Navigation
- Axios - HTTP client
Before running this project, make sure you have:
- Node.js (v14 or higher)
- MongoDB (local installation or MongoDB Atlas account)
- Gmail account (for email notifications)
- Git (for cloning the repository)
[git clone https://github.com/yourusername/taskmanager-fullstack.git](https://github.com/csharikrishna/TO-Do.git)
cd taskmanager-fullstack# Navigate to server directory
cd server
# Install dependencies
npm install
# Create environment file
cp .env.example .envConfigure your .env file:
# Database
MONGO_URL=mongodb://localhost:27017/todoapp
# JWT Secret (use a long, secure string)
JWT_SECRET=your_super_secret_jwt_key_make_it_long_and_secure
# Email Configuration
EMAIL_USER=your.email@gmail.com
EMAIL_PASS=your_gmail_app_password
# Server Port
PORT=5000Gmail Setup for Notifications:
- Enable 2-factor authentication on your Google account
- Generate an App Password: Account Settings β Security β App passwords
- Use the generated password in
EMAIL_PASS
# Navigate to client directory
cd ../client
# Install dependencies
npm install
# Create environment file
cp .env.example .envConfigure your .env file:
REACT_APP_API_URL=http://localhost:5000/apiOption A: Local MongoDB
# Install MongoDB Community Server
# Start MongoDB service
mongodOption B: MongoDB Atlas (Recommended)
- Create account at MongoDB Atlas
- Create a new cluster
- Get connection string and update
MONGO_URLin backend.env
Start Backend Server:
cd server
npm run devStart Frontend (in another terminal):
cd client
npm start- Backend: http://localhost:5000
- Frontend: http://localhost:3000
Build Frontend:
cd client
npm run buildStart Production Server:
cd server
npm start- Register a new account or login with existing credentials
- Create tasks with titles, descriptions, and deadlines
- Manage tasks by marking as complete or deleting
- Receive notifications via email 15 minutes before deadlines
- Add Task: Click "Add Task" and fill in details
- Complete Task: Click "Complete" button on task card
- Delete Task: Click "Delete" button (with confirmation)
- View Statistics: Check dashboard for task counts and status
- Automated email notifications sent 15 minutes before task deadlines
- Notifications sent only once per task
- HTML-formatted emails with task details
- Create account at Render
- Connect your GitHub repository
- Create new Web Service with:
- Runtime: Node
- Build Command:
npm install - Start Command:
npm start
- Set environment variables in Render dashboard
- Create account at Vercel
- Connect your GitHub repository
- Set build configuration:
- Framework: React
- Build Command:
npm run build - Output Directory:
build
- Add environment variable:
REACT_APP_API_URL
- Create cluster at MongoDB Atlas
- Configure network access and database user
- Get connection string and update production environment variables
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login user |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/tasks/add |
Create new task | β |
| GET | /api/tasks |
Get user tasks | β |
| PUT | /api/tasks/:id |
Update task | β |
| DELETE | /api/tasks/:id |
Delete task | β |
Register User:
POST /api/auth/register
{
"email": "user@example.com",
"password": "securepassword"
}Create Task:
POST /api/tasks/add
{
"title": "Complete project",
"description": "Finish the TaskManager application",
"deadline": "2025-07-10T15:30:00.000Z"
}Backend (/server/.env):
MONGO_URL- MongoDB connection stringJWT_SECRET- JWT signing secretEMAIL_USER- Gmail address for notificationsEMAIL_PASS- Gmail app passwordPORT- Server port (default: 5000)
Frontend (/client/.env):
REACT_APP_API_URL- Backend API URL
The notification system checks for upcoming deadlines every minute. You can modify the notification timing in /server/utils/notificationService.js:
// Change notification timing (currently 15 minutes)
const fifteenMinutesFromNow = new Date(now.getTime() + 15 * 60000);-
Authentication Flow:
- Register new account
- Login with credentials
- Access protected routes
-
Task Management:
- Create tasks with various deadlines
- Update task status
- Delete tasks
-
Notification System:
- Create task with deadline 10 minutes from now
- Check email for notification
- Verify notification sent only once
Use tools like Postman or curl to test API endpoints:
# Test login
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password"}'
# Test creating task (with auth token)
curl -X POST http://localhost:5000/api/tasks/add \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{"title":"Test Task","deadline":"2025-07-10T15:30:00.000Z"}'taskmanager-fullstack/
βββ server/ # Backend application
β βββ controllers/ # Route handlers
β βββ middleware/ # Authentication middleware
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ utils/ # Notification service
β βββ index.js # Server entry point
β βββ package.json # Backend dependencies
βββ client/ # Frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Route components
β β βββ App.js # Main app component
β β βββ api.js # API service
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
βββ README.md # Project documentation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style and conventions
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation if needed
This project is licensed under the MIT License - see the LICENSE file for details.
- React team for the amazing framework
- MongoDB for the flexible database
- TailwindCSS for the utility-first styling
- Express.js for the web framework
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed description
- Contact the maintainers
Made with β€οΈ by CS HARI KRISHNA