A Task Management Application that allows users to add, edit, delete, and reorder tasks with a drag-and-drop interface. Tasks are categorized into To-Do, In Progress, and Done, and changes are instantly saved to a database for persistence.
- π Authentication: Users must sign in with Google (via Firebase Authentication).
- β
Task Management:
- Add, edit, delete, and reorder tasks.
- Drag-and-drop functionality to move tasks between categories.
- π‘ Real-time Sync:
- Instant updates using MongoDB Change Streams / WebSockets.
- πΎ Database & Persistence:
- All tasks are stored in MongoDB via an Express.js API.
- π¨ Modern UI:
- Built with Vite + React, featuring a clean, responsive design.
- π± Fully Responsive:
- Optimized for both desktop and mobile users.
- Demo
- Tech Stack
- Installation
- Configuration
- Usage
- API Endpoints
- Deployment
- Troubleshooting
- Contributors
- License
π Live Demo: Task Management App
Frontend:
- Vite.js + React
- Tailwind CSS + DaisyUI
- Firebase Authentication
- Drag & Drop:
react-beautiful-dnd
/@hello-pangea/dnd
- State Management:
@tanstack/react-query
Backend:
- Node.js + Express.js
- MongoDB (via
mongodb
package) - Real-time Sync: WebSockets / Change Streams
- Install Node.js (>=16)
- Install MongoDB (if running locally)
- Install Git
git https://github.com/ashraful2871/Task-Management.git
cd Task-Management
- Navigate to the server directory:
cd server
- Install dependencies:
npm install
- Create a
.env
file and add your MongoDB credentials:USER_DB=your-mongo-db-name USER_PASS=your-mongo-db-password
- Start the backend server:
The API should now be running on
npm start
http://localhost:5000
.
- Navigate to the client directory:
cd ../client
- Install dependencies:
npm install
- Create a
.env.local
file and add your Firebase credentials:VITE_API_URL=http://localhost:5000 VITE_apiKey=your-api-key VITE_authDomain=your-auth-domain VITE_projectId=your-project-id VITE_storageBucket=your-storage-bucket VITE_messagingSenderId=your-messaging-sender-id VITE_appId=your-app-id
- Run the frontend:
Your app should now be running at
npm run dev
http://localhost:5173
.
- Go to Firebase Console.
- Create a new project and enable Google Authentication.
- Get the API credentials and add them to
.env.local
in the frontend.
- If using MongoDB Atlas, create a database and obtain the connection URI.
- If running locally, ensure MongoDB is installed and running.
- Sign in with Google to access the app.
- Create tasks under "To-Do".
- Drag tasks between categories.
- Edit or delete tasks.
- Reorder tasks within categories.
Method | Endpoint | Description |
---|---|---|
POST | /tasks |
Add a new task |
GET | /tasks |
Retrieve all tasks for the logged-in user |
PUT | /tasks/:id |
Update task details (title, description, category) |
DELETE | /tasks/:id |
Delete a task |
- Install Vercel CLI:
npm install -g vercel
- Deploy backend:
vercel --prod
- Deploy frontend:
vercel --prod
Your app should now be live π.
-
MongoDB not connecting?
- Check
.env
and verify credentials. - Ensure MongoDB is running (
mongod
).
- Check
-
Firebase authentication issues?
- Verify API keys and Firebase settings.
-
Vite issues?
- Try clearing cache:
rm -rf node_modules package-lock.json npm install
- Try clearing cache:
I've added a warning in the README.md
to ensure .env
files are not pushed to GitHub and included a proper .gitignore
setup. Hereβs the updated section:
π¨ DO NOT push .env
files containing sensitive API keys or database credentials to GitHub.
Make sure you have a .gitignore
file in place to prevent accidental exposure.
# Ignore environment variables
.env
.env.local
.env.production
.env.development
# Ignore node_modules
node_modules/
- Add
.env
files to.gitignore
(already included above). - Use environment variables on deployment platforms (e.g., Vercel, Firebase, etc.).
- NEVER hardcode API keys in your codebase.
π Keeping your credentials safe is crucial! If you've accidentally pushed a .env
file, immediately revoke your API keys and regenerate them.
- Your Name - Md. Ashraful Islam
This project is licensed under the MIT License.