A full-stack Task Management application built using the MERN stack (MongoDB, Express, React, Node.js).
- User Authentication: Secure login and signup functionality
- Task Management: Create, read, update, and delete tasks
- Task Status: Mark tasks as completed or incomplete
- Responsive Design: Works on desktop, tablet, and mobile devices
- Data Persistence: All tasks are stored in MongoDB
- React.js: UI components and state management
- React Router: Navigation and routing
- Axios: API requests
- CSS/SCSS: Styling
- Node.js: Runtime environment
- Express.js: Web application framework
- MongoDB: NoSQL database
- Mongoose: MongoDB object modeling
- JWT: Authentication mechanism
task-management/
├── client/ # React frontend
│ ├── public/ # Static files
│ ├── src/ # Source files
│ │ ├── components/ # UI components
│ │ ├── pages/ # Page components
│ │ ├── context/ # Context API
│ │ ├── services/ # API services
│ │ └── App.js # Main App component
│ └── package.json # Frontend dependencies
├── server/ # Node.js backend
│ ├── config/ # Configuration files
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Custom middleware
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ ├── index.js # Entry point
│ └── package.json # Backend dependencies
└── README.md # Project documentation
- Node.js (v14.x or later)
- npm or yarn
- MongoDB (local installation or MongoDB Atlas account)
-
Clone the repository
git clone https://github.com/your-username/task-management.git cd task-management -
Set up environment variables
Create a
.envfile in the server directory with the following content:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key -
Install backend dependencies
cd server npm install -
Install frontend dependencies
cd ../client npm install
-
Start the backend server
cd server npm startThe server will run on
http://localhost:5000. -
Start the frontend development server
cd client npm startThe application will open in your browser at
http://localhost:3000.
POST /api/auth/register- Register a new userPOST /api/auth/login- Login a user
GET /api/tasks/my- Get tasks assigned to the authenticated userGET /api/tasks/all- Get all tasks (admin only)POST /api/tasks- Create a new task (admin only)PATCH /api/tasks/:taskId- Update task statusDELETE /api/tasks/:taskId- Delete a task (admin only)PUT /api/tasks/:taskId/assign- Assign users to a task (admin only)POST /api/tasks/:taskId/comments- Add comment to a taskGET /api/tasks/:taskId/comments- Get comments for a specific task
GET /api/notifications- Get all notifications for the authenticated user
GET /api/users- Get all users (admin only)GET /api/profile- Get authenticated user's profile
The React frontend can be deployed to Netlify, Vercel, or any static site hosting service:
cd client
npm run build- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Developed with ❤️ by Abhishek