A full-stack, feature-rich Todo application built with React, Node.js, and MongoDB. Manage your tasks efficiently with a modern, responsive interface and powerful productivity features.
- User Registration & Login with JWT tokens
- Password Encryption using bcryptjs
- Protected Routes with authentication middleware
- Password Change functionality
- Session Management with secure token storage
- Create Todos with title, description, category, priority, due dates, and tags
- Read Todos with advanced filtering and sorting
- Update Todos - mark complete/incomplete, edit details
- Delete Todos with confirmation dialogs
- Real-time Updates using Socket.io
- Categories (Work, Personal, Shopping, Health, Education, General)
- Priority Levels (High, Medium, Low)
- Due Dates with overdue indicators
- Tags System for better organization
- Search Functionality across titles and descriptions
- Multiple Sort Options (Date, Title, Priority, Due Date)
- Dashboard with overview statistics
- Progress Tracking with completion percentages
- Category-wise Analytics
- Overdue Tasks monitoring
- Real-time Stats updates
- Responsive Design for all devices
- Modern UI with glass morphism effects
- Loading States and error handling
- Intuitive Navigation with active states
- Server Status indicator
Frontend:
- React 18
- React Router DOM
- Axios
- Socket.io Client
- date-fns
- CSS3 with Custom Properties
Backend:
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT Authentication
- bcryptjs
- Socket.io
- Express Validator
- Helmet & CORS
- Node.js (v14 or higher)
- MongoDB (local or cloud instance)
- npm or yarn
- Clone the repository
git clone https://github.com/techgit41/Advanced-Todo-App
cd advanced-todo-app
- Backend Setup
cd backend
npm install
# Create environment file
cp .env.example .env
# Edit .env with your configurations
npm run dev
- Frontend Setup (in a new terminal)
cd frontend
npm install
npm start
Backend (.env)
MONGODB_URI=mongodb://localhost:27017/advanced-todoapp
PORT=5000
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
NODE_ENV=development
Frontend (.env)
REACT_APP_API_URL=http://localhost:5000
advanced-todo-app/
โโโ backend/
โ โโโ server.js # Express server
โ โโโ package.json # Backend dependencies
โ โโโ .env # Environment variables
โโโ frontend/
โโโ public/
โ โโโ index.html # HTML template
โโโ src/
โ โโโ components/
โ โ โโโ Auth/ # Login & Register
โ โ โโโ Dashboard/ # Overview dashboard
โ โ โโโ Layout/ # Navigation & Footer
โ โ โโโ Stats/ # Analytics & statistics
โ โ โโโ Todos/ # Todo management
โ โ โโโ User/ # User profile
โ โโโ contexts/ # React contexts (Auth)
โ โโโ hooks/ # Custom hooks (useApi)
โ โโโ config/ # API configuration
โ โโโ App.js # Main App component
โ โโโ App.css # Global styles
โ โโโ index.js # React entry point
โ โโโ index.css # Base styles
โโโ package.json # Frontend dependencies
- Register a new account or Login with existing credentials
- Access the Dashboard to see your productivity overview
- Create Todos using the "Add Todo" button
- Organize tasks with categories, priorities, and due dates
- Track Progress through the Statistics page
- Manage Account in the Profile section
- Real-time Updates: See changes instantly across all devices
- Advanced Filtering: Filter by category, priority, completion status
- Smart Search: Find todos by title or description
- Progress Analytics: Monitor your productivity with detailed stats
- Responsive Design: Use on desktop, tablet, or mobile
POST /api/auth/register
- User registrationPOST /api/auth/login
- User loginPUT /api/auth/change-password
- Change passwordGET /api/auth/profile
- Get user profile
GET /api/todos
- Get all todos (with filtering)POST /api/todos
- Create new todoPUT /api/todos/:id
- Update todoDELETE /api/todos/:id
- Delete todo
GET /api/todos/stats
- Get todo statistics
GET /api/health
- Server status
{
username: String,
email: String,
password: String (hashed),
createdAt: Date
}
{
title: String,
description: String,
category: String,
priority: String (enum: low, medium, high),
dueDate: Date,
completed: Boolean,
userId: ObjectId,
tags: [String],
createdAt: Date,
updatedAt: Date
}
# Set environment variables
heroku config:set JWT_SECRET=your-production-secret
heroku config:set MONGODB_URI=your-mongodb-uri
heroku config:set NODE_ENV=production
# Deploy
git subtree push --prefix backend heroku main
# Build
npm run build
# Deploy build folder to your preferred platform
Backend (.env)
MONGODB_URI=your-production-mongodb-uri
PORT=5000
JWT_SECRET=your-super-secret-jwt-key
NODE_ENV=production
Frontend (.env)
REACT_APP_API_URL=https://your-backend.herokuapp.com
Connection Issues:
- Ensure backend is running on port 5000
- Check MongoDB connection
- Verify CORS configuration
Authentication Issues:
- Clear browser localStorage
- Check JWT token expiration
- Verify password requirements
Todo Operations:
- Check network requests in browser dev tools
- Verify todo ownership
- Check server logs for validation errors
Enable debug logs by checking browser console and backend terminal for detailed error messages.
# Terminal 1 - Backend
cd backend
npm run dev
# Terminal 2 - Frontend
cd frontend
npm start
- Backend Health Check: Visit
http://localhost:5000/api/health
- Frontend Application: Visit
http://localhost:3000
- Create Test User: Register a new account
- Test Features: Create, update, delete todos to verify functionality
cd frontend
npm run build
I welcome contributions! Please feel free to submit pull requests, report bugs, or suggest new features.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- React community for excellent documentation
- MongoDB for robust database solutions
- Express.js team for the lightweight web framework
- All contributors who help improve this project
If you have any questions or need help with setup:
- Check the troubleshooting section above
- Open an issue on GitHub
โญ Star this repo if you found it helpful!
๐ Found a bug? Open an issue and we'll fix it!
๐ก Have a feature request? We'd love to hear your ideas!
Built with โค๏ธ using React, Node.js, and MongoDB