Task Management Soft

Task Management Soft

April 2025

About the Project

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

For All Users

  • ๐Ÿ” 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

Admin-Exclusive Features

  • ๐Ÿ“ˆ Comprehensive admin statistics dashboard
    • ๐Ÿฅง Task distribution visualization (Pie chart)
    • ๐Ÿ“Š User task assignment overview (Bar chart)
  • ๐Ÿ‘ฅ User management capabilities

๐Ÿ› ๏ธ Technologies

  • ๐Ÿ–ฅ๏ธ 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

๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

  • Node.js (v14.0.0 or later)
  • npm (v6.0.0 or later)
  • MongoDB instance (local or cloud-based)

โš™๏ธ Installation

  1. Clone the repository:
    git clone https://github.com/sculptorofcode/task-management-soft.git
    
  2. Navigate to the project directory:
    cd task-management-soft
    
  3. Install dependencies:
    npm install
    
  4. Set up your environment variables (see Configuration section).
  5. Run the development server:
    npm run dev
    
  6. Open http://localhost:3000 in your browser to see the application.

๐Ÿ”ง Configuration

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.

๐Ÿ“˜ Usage

๐Ÿ‘ค User Role

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 Role

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

๐Ÿ”‘ Admin Credentials

๐Ÿ”Œ API Endpoints

EndpointMethodDescriptionAccess
/api/tasks/my-tasksGETFetch tasks for the logged-in user๐Ÿ‘ค User
/api/tasks/:id/statusPUTUpdate the status of a specific task๐Ÿ‘ค User
/api/tasks/:idGETFetch a single task by ID๐Ÿ‘ค User
/api/tasksPOSTCreate a new task๐Ÿ‘ค User
/api/tasks/:idDELETEDelete a task by ID๐Ÿ‘ค User
/api/statisticsGETFetch 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

๐ŸŽจ Customizing the App

๐Ÿ” User Authentication

The app uses NextAuth.js for authentication. To add or customize providers, modify the authOptions in src/app/api/auth/[...nextauth]/options.tsx.

๐Ÿ“ Task Model

The Task model is defined in src/models/Task.tsx. Modify this file to adjust the task schema according to your needs.

๐Ÿงช Testing

Run the test suite with:
npm test
To run tests in watch mode:
npm run test:watch

๐Ÿšข Deployment

  1. Build the application:
    npm run build
    
  2. Start the production server:
    npm start
    
For platform-specific deployment instructions, refer to the Next.js deployment documentation.

๐Ÿ”ฎ Future Improvements

  • ๐Ÿ” 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

๐Ÿค Contributing

We welcome contributions! Please follow these steps:
  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request
Please ensure your code adheres to our coding standards and includes appropriate tests.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgements


For any questions or support, please open an issue or contact the maintainers.

Comments

No comments yet. Be the first to share your thoughts!

Technologies Used

NextJsMongoDBNextAuth