A full-stack task management application. Organize, prioritize, and track your tasks efficiently with JWT-based authentication and real-time updates.
Live Demo: taskmanager-vishal-project.vercel.app
- About
- Features
- Tech Stack
- Project Structure
- Getting Started
- Available Scripts
- Environment Variables
- Deployment
- API Documentation
- Contributing
- License
TaskManager is a full-stack MERN application that allows users to:
- Create, read, update, and delete tasks
- Authenticate securely with JWT tokens
- Persist data with MongoDB Atlas
- Access tasks from anywhere with a clean, responsive UI
This project demonstrates best practices in:
- Frontend: React with localStorage and API integration
- Backend: Node.js/Express with REST APIs, middleware, and authentication
- Database: MongoDB with Mongoose schemas
- Deployment: Vercel (frontend) + Render (backend)
✅ User Authentication
- Secure JWT-based login/signup
- Password encryption with bcryptjs
- Token stored in localStorage
✅ Task Management
- Create tasks with title and description
- Edit existing tasks
- Delete tasks
- View all tasks in a responsive list
✅ Data Persistence
- All tasks saved to MongoDB Atlas
- Real-time sync with backend API
- Persistent user sessions
✅ Responsive Design
- Mobile-friendly UI
- Bootstrap styling
- Smooth user experience
✅ Security
- CORS enabled for cross-origin requests
- JWT authentication on protected routes
- Environment variables for sensitive data
- React 18 - UI library
- JavaScript (ES6+) - Programming language
- Bootstrap 5 - Styling & responsive design
- Fetch API - HTTP requests
- Node.js - Runtime
- Express.js - Web framework
- MongoDB Atlas - Cloud database
- Mongoose - ODM for MongoDB
- JWT (jsonwebtoken) - Authentication
- bcryptjs - Password hashing
- CORS - Cross-origin resource sharing
- dotenv - Environment variables
- Vercel - Frontend hosting
- Render - Backend hosting
TaskManager/
├── public/ # Static files
├── src/
│ ├── components/ # React components
│ │ ├── Navbar.js
│ │ ├── TaskForm.js
│ │ └── TaskList.js
│ ├── pages/ # Page components
│ │ ├── Home.js
│ │ ├── Login.js
│ │ └── Signup.js
│ ├── App.js # Main app component
│ ├── index.js # React entry point
│ └── index.css # Global styles
├── package.json # Dependencies & scripts
└── README.md # This file
Backend Repository: taskmanager-backend
- Node.js (v14+) installed
- npm or yarn package manager
- Git for version control
-
Clone the repository: git clone https://github.com/vishal-singh-web/TaskManager.git cd TaskManager
-
Install dependencies: npm install
-
Create
.envfile (in root directory): REACT_APP_API_URL=https://your-backend-url.onrender.com
text
Replace your-backend-url with your actual Render backend URL.
- Start the development server: npm start
text
Open http://localhost:3000 in your browser.
Runs the app in development mode at http://localhost:3000.
The page reloads when you make changes.
Launches the test runner in interactive watch mode.
Builds the app for production in the build/ folder.
Optimized and ready for deployment.
Only use if you need full control over webpack and build tools.
Create a .env file in the root directory:
REACT_APP_API_URL=https://your-backend-url.onrender.com
text
Never commit .env to Git! Add to .gitignore:
.env
.env.local
text
- Push code to GitHub git add . git commit -m "Prepare for deployment" git push origin main
text
- Deploy on Vercel
- Go to vercel.com
- Click "New Project"
- Import your GitHub repo
- Set
REACT_APP_API_URLin Environment Variables - Click "Deploy"
Deploy your backend separately: taskmanager-backend on Render
Get your backend URL and add to frontend .env.
https://your-backend-url.onrender.com
text
POST /api/auth/signup
- Create a new user account
- Body:
{ email, password, name } - Returns: JWT token
POST /api/auth/login
- Login with existing credentials
- Body:
{ email, password } - Returns: JWT token
GET /api/fetchtasks
- Fetch all tasks for logged-in user
- Headers:
token: <token>
POST /api/addtask
- Create a new task
- Headers:
token: <token> - Body:
{ title, description, status, priority }
PUT /api/updatetask/:id
- Update a task
- Headers:
token: <token> - Body:
{ title, description, status, priority }
DELETE /api/delettask/:id
- Delete a task
- Headers:
token: <token>
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m "Add AmazingFeature") - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is not licensed. All rights reserved by the author.
Vishal Singh
- GitHub: @vishal-singh-web
- LinkedIn: https://www.linkedin.com/in/vishalsingh-profile/
Have questions or found a bug? Open an Issue
Made with ❤️ by Vishal Singh