A full-stack task management application built with the MERN stack (MongoDB, Express.js, React, Node.js).
- User authentication and authorization
- Department-based task management
- Real-time chat functionality
- Task notifications and alerts
- Admin user management
- Responsive design with Tailwind CSS
- Frontend: React.js, Tailwind CSS, Radix UI
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
Before running this application, make sure you have the following installed:
- Node.js (v14 or higher)
- MongoDB (local installation or MongoDB Atlas)
- npm or yarn package manager
```bash git clone cd tasky ```
```bash
npm install
npm run install-server
npm run install-client ```
Create a .env file in the server directory:
```bash cd server cp .env.example .env ```
Edit the .env file with your configuration:
```
PORT=5000
MONGODB_URI=mongodb://localhost:27017/tasky
JWT_SECRET=your_jwt_secret_key_here_make_it_long_and_secure
NODE_ENV=development
```
Make sure MongoDB is running on your system:
- Local MongoDB: Start the MongoDB service
- MongoDB Atlas: Use your Atlas connection string in the
.envfile
```bash npm run dev ```
```bash
npm run server
npm run client ```
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
``` tasky-mern/ ├── client/ # React frontend │ ├── public/ │ ├── src/ │ │ ├── components/ # Reusable components │ │ ├── pages/ # Page components │ │ ├── lib/ # Utilities and contexts │ │ └── hooks/ # Custom hooks │ └── package.json ├── server/ # Express backend │ ├── models/ # MongoDB models │ ├── routes/ # API routes │ ├── middleware/ # Custom middleware │ └── package.json └── package.json # Root package.json ```
npm run dev- Run both client and server in development modenpm run server- Run only the servernpm run client- Run only the clientnpm run build- Build the client for productionnpm start- Start the server in production mode
The application supports two types of users:
- Admin: Can manage users and have full access
- Staff: Regular users with limited permissions
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
GET /api/tasks/department/:id- Get tasks by departmentPOST /api/tasks- Create a new taskPUT /api/tasks/:id- Update a taskDELETE /api/tasks/:id- Delete a task
GET /api/users/department- Get users in departmentPUT /api/users/:id/approve- Approve a userDELETE /api/users/:id- Delete a user
GET /api/chat/department- Get department messagesPOST /api/chat- Send a message
GET /api/notifications/user- Get user notificationsPOST /api/notifications- Create notificationPUT /api/notifications/:id/read- Mark as read
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.