A robust Task Management application built with Next.js, MongoDB, and NextAuth. This application empowers users to efficiently manage tasks, view insightful statistics, and update task statuses in real-time. Admin users benefit from advanced features, including comprehensive statistics on task distribution and user assignments.
- โจ Features
- ๐ ๏ธ Technologies
- ๐ Getting Started
- ๐ง Configuration
- ๐ Usage
- ๐ API Endpoints
- ๐๏ธ Project Structure
- ๐จ Customizing the App
- ๐งช Testing
- ๐ข Deployment
- ๐ฎ Future Improvements
- ๐ค Contributing
- ๐ License
- ๐ Acknowledgements
- ๐ Secure user authentication via NextAuth
- โ Intuitive task creation, viewing, updating, and deletion
- ๐ Real-time task status management (Completed, In Progress, Not Started, Overdue)
- ๐ Personal task statistics dashboard
- ๐ Comprehensive admin statistics dashboard
- ๐ฅง Task distribution visualization (Pie chart)
- ๐ User task assignment overview (Bar chart)
- ๐ฅ User management capabilities
- ๐ฅ๏ธ Frontend: Next.js (React framework), TypeScript
- ๐ Backend: Next.js API routes
- ๐๏ธ Database: MongoDB
- ๐ Authentication: NextAuth.js
- ๐ Data Visualization: Recharts
- ๐จ Styling: Tailwind CSS
- ๐ State Management: React Context API
- ๐ Form Handling: React Hook Form
- ๐ API Requests: Axios
- Node.js (v14.0.0 or later)
- npm (v6.0.0 or later)
- MongoDB instance (local or cloud-based)
-
Clone the repository:
git clone https://github.com/sculptorofcode/task-management-soft.git
-
Navigate to the project directory:
cd task-management-soft
-
Install dependencies:
npm install
-
Set up your environment variables (see Configuration section).
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser to see the application.
Create a .env.local
file in the root directory and add the following environment variables:
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/mydatabase?retryWrites=true&w=majority
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
RESEND_API_KEY=your_resend_api_key
Replace the placeholder values with your actual MongoDB connection string, NextAuth secret, and Resend API key.
After signing in, regular users can:
- ๐ View and manage their assigned tasks
- โ Create new tasks
- ๐ Update task status
- ๐๏ธ Delete their own tasks
- ๐ Access personal task statistics
Admin users have additional capabilities:
- ๐ฅ๏ธ Access to an advanced dashboard showing:
- ๐ฅง Overall task distribution by status (Pie Chart)
- ๐ Task count per user (Bar Chart)
- ๐ง Ability to manage all users' tasks
- ๐ฅ Access to user management features
- Username / Email ID: [email protected]
- Password: tasksoft
Endpoint | Method | Description | Access |
---|---|---|---|
/api/tasks/my-tasks |
GET | Fetch tasks for the logged-in user | ๐ค User |
/api/tasks/:id/status |
PUT | Update the status of a specific task | ๐ค User |
/api/tasks/:id |
GET | Fetch a single task by ID | ๐ค User |
/api/tasks |
POST | Create a new task | ๐ค User |
/api/tasks/:id |
DELETE | Delete a task by ID | ๐ค User |
/api/statistics |
GET | Fetch task statistics | ๐ Admin |
๐๏ธ Project Structure
task-management-soft/
โ
โโโ public/
โ โโโ [Static files]
โ
โโโ src/
โ โโโ abstract/
โ โโโ app/
โ โ โโโ (auth)/
โ โ โ โโโ forgot-password/
โ โ โ โโโ login/
โ โ โ โโโ reset-password/
โ โ โโโ (backend)/
โ โ โ โโโ soft/
โ โ โ โโโ dashboard/
โ โ โ โโโ my-tasks/
โ โ โ โโโ statistics/
โ โ โ โโโ task/
โ โ โ โโโ task-list/
โ โ โ โโโ users/
โ โ โโโ api/
โ โ โ โโโ auth/
โ โ โ โโโ statistics/
โ โ โ โโโ task-lists/
โ โ โ โโโ tasks/
โ โ โ โโโ users/
โ โ โโโ fonts/
โ โ โโโ favicon.ico
โ โ โโโ globals.css
โ โ โโโ layout.tsx
โ โ โโโ page.tsx
โ โโโ assets/
โ โ โโโ css/
โ โ โโโ images/
โ โ โโโ scss/
โ โโโ components/
โ โโโ context/
โ โโโ database/
โ โโโ hooks/
โ โโโ lib/
โ โโโ models/
โ โโโ [Other project-specific directories]
โ
โโโ .env.local
โโโ .gitignore
โโโ next.config.js
โโโ package.json
โโโ README.md
โโโ tsconfig.json
The app uses NextAuth.js for authentication. To add or customize providers, modify the authOptions
in src/app/api/auth/[...nextauth]/options.tsx
.
The Task
model is defined in src/models/Task.tsx
. Modify this file to adjust the task schema according to your needs.
Run the test suite with:
npm test
To run tests in watch mode:
npm run test:watch
-
Build the application:
npm run build
-
Start the production server:
npm start
For platform-specific deployment instructions, refer to the Next.js deployment documentation.
- ๐ Implement task filtering and search functionality
- ๐ Add notification system for task deadlines
- ๐ฑ Enhance mobile responsiveness
- ๐ Expand admin reporting capabilities
- ๐ Integrate with external calendar services (e.g., Google Calendar, Apple Calendar)
- ๐ฑ๏ธ Implement drag-and-drop task management interface
- ๐ฅ Add team collaboration features
We welcome contributions! Please follow these steps:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Please ensure your code adheres to our coding standards and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or support, please open an issue or contact the maintainers.