A full-stack Kanban board application built with the MERN stack (MongoDB, Express, React, Node.js). Manage your tasks with drag-and-drop functionality, priority levels, and real-time database synchronization.
- β Create, read, update, and delete tasks
- π― Three status columns: To Do, In Progress, Done
- π¨ Priority levels: Low, Medium, High
- π±οΈ Drag and drop tasks between columns
- πΎ MongoDB database integration
- π Modern and responsive UI
- β‘ Fast development with Vite
- MongoDB - NoSQL database for storing tasks
- Express.js - Backend web framework
- React - Frontend library with Vite
- Node.js - JavaScript runtime
- Axios - HTTP client for API calls
task24/
βββ client/ # React frontend (Vite)
β βββ src/
β β βββ components/ # React components
β β β βββ KanbanColumn.jsx
β β β βββ TaskCard.jsx
β β β βββ TaskModal.jsx
β β βββ services/ # API service layer
β β β βββ api.js
β β βββ App.jsx # Main app component
β β βββ main.jsx # Entry point
β βββ .env # Environment variables
β βββ package.json
βββ server/ # Express backend
β βββ src/
β β βββ models/ # Mongoose models
β β β βββ Task.js
β β βββ routes/ # API routes
β β β βββ taskRoutes.js
β β βββ controllers/ # Route controllers
β β β βββ taskController.js
β β βββ config/ # Configuration
β β β βββ database.js
β β βββ index.js # Server entry point
β βββ .env.example # Environment template
β βββ package.json
βββ package.json # Root scripts
βββ .gitignore
βββ README.md
- Node.js (v14 or higher)
- MongoDB (local installation or MongoDB Atlas account)
- npm or yarn
git clone https://github.com/alex-web13-2001/task24.git
cd task24# Install root dependencies
npm install
# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm installIf you have MongoDB installed locally, it will connect to mongodb://localhost:27017/task24 by default.
- Create a free account at MongoDB Atlas
- Create a new cluster
- Get your connection string
- Create
.envfile in theserverdirectory:
cd server
cp .env.example .env- Edit
.envand add your MongoDB URI:
PORT=5000
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/task24?retryWrites=true&w=majority
NODE_ENV=development# From the root directory
npm run devThis will start:
- Backend server on http://localhost:5000
- Frontend app on http://localhost:5173
# Terminal 1 - Start backend server
cd server
npm run dev
# Terminal 2 - Start frontend
cd client
npm run dev| Method | Endpoint | Description |
|---|---|---|
| GET | /api/tasks |
Get all tasks |
| GET | /api/tasks/:id |
Get task by ID |
| POST | /api/tasks |
Create new task |
| PUT | /api/tasks/:id |
Update task |
| DELETE | /api/tasks/:id |
Delete task |
| PUT | /api/tasks/batch/update |
Update multiple tasks |
{
title: String (required),
description: String,
status: String (enum: ['todo', 'in-progress', 'done']),
priority: String (enum: ['low', 'medium', 'high']),
order: Number,
createdAt: Date,
updatedAt: Date
}- Create a task: Click the "+ Add Task" button in the header
- Edit a task: Click the βοΈ icon on any task card
- Delete a task: Click the ποΈ icon on any task card
- Move a task: Drag and drop task cards between columns
- Set priority: Use the priority dropdown when creating/editing tasks
npm run dev- Run both client and server concurrentlynpm run client- Run only the React frontendnpm run server- Run only the Express backendnpm run install-all- Install all dependencies
npm start- Start server in production modenpm run dev- Start server with nodemon (auto-reload)
npm run dev- Start Vite dev servernpm run build- Build for productionnpm run preview- Preview production build
- Set environment variables on your hosting platform
- Ensure MongoDB URI is configured
- Run
npm startin the server directory
- Update
VITE_API_URLin client.envto your backend URL - Build the app:
npm run buildin client directory - Deploy the
distfolder to your hosting platform
- Backend: Heroku, Railway, Render, DigitalOcean
- Frontend: Vercel, Netlify, GitHub Pages
- Database: MongoDB Atlas (free tier available)
PORT=5000
MONGODB_URI=mongodb://localhost:27017/task24
NODE_ENV=developmentVITE_API_URL=http://localhost:5000/api- Make sure MongoDB is running locally, or
- Check your MongoDB Atlas connection string
- Verify network access is allowed in MongoDB Atlas
- Ensure the backend server is running
- Check that CORS is enabled in
server/src/index.js
- Open browser console to check for errors
- Verify the API URL in
client/.env - Ensure backend server is running on the correct port
MIT
Created with β€οΈ using MERN stack