CPS Task Manager is a comprehensive, full-featured internal management dashboard designed to bring clarity and efficiency to team workflows. Built as a reusable and scalable solution, it provides a centralized platform for task management, scheduling, payments, and internal communication, inspired by modern tools like Notion and ClickUp.
This repository contains the complete monorepo-style project, housing both the backend API and the frontend client application.
- Node.js >= 22
- pnpm >= 9.0.0
- MongoDB (local or cloud instance)
-
Clone the repository:
git clone <your-repo-url> cd CPS Task Manager
-
Install dependencies:
pnpm install
-
Set up environment variables:
# Copy environment files cp apps/api/.env.example apps/api/.env cp apps/dashboard/.env.example apps/dashboard/.env -
Configure environment variables:
# apps/api/.env PORT=5000 MONGODB_URI=mongodb://localhost:27017/CPS Task Manager JWT_SECRET=your-super-secret-jwt-key NODE_ENV=development
-
Start development servers:
# Start both frontend and backend pnpm dev # Or start individually pnpm --filter api dev pnpm --filter dashboard dev
-
Access the applications:
- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:5000
- API Documentation: http://localhost:5000/api/v1/docs
- JWT-based Authentication with secure token management
- Role-Based Access Control (RBAC) with three tiers:
ADMIN: Full system accessMANAGER: Limited administrative accessMEMBER: Basic user access
- Protected Routes on both frontend and backend
- Session Management with automatic token refresh
- Kanban Board with drag-and-drop functionality
- Task Statuses: TODO, IN_PROGRESS, IN_REVIEW, COMPLETED, BLOCKED
- Priority Levels: LOW, NORMAL, HIGH
- Subtasks and Comments system
- Assignment and Reporting to users
- Estimated Time tracking
- Real-time Updates with optimistic UI
- Contest Creation and Assignment
- Platform Integration: Leetcode, Vjudge
- Status Tracking with visual progress indicators
- Priority Management and Time Estimation
- User Assignment and Reporting
- Problem Tracking with Online Judge integration
- Platform Support: Leetcode, Vjudge
- Location Management: Google Classroom, Website
- Status-based Organization with drag-and-drop
- Priority and Time Management
- User Registration and Profile Management
- Role Assignment and Permissions
- Profile Images with Cloudinary integration
- User Statistics and Activity Tracking
- Payment Tracking with detailed records
- Course Integration: CPC, JIPC, Bootcamp
- Batch Management and Class Organization
- Payment Status tracking
- Required Fields: Course, Batch, Class validation
- Campaign Management with task assignment
- User Assignment and Reporting
- Status Tracking and Progress Monitoring
- Priority Management and Time Estimation
- Class Scheduling and Organization
- Course Management: CPC, JIPC, Bootcamp
- Batch Organization and Class Numbers
- Status Tracking and Assignment
- Video Organization and Categorization
- Platform Integration and URL Management
- Status Tracking and Assignment
- Priority Management and Time Estimation
- Real-time Statistics across all modules
- User Activity tracking and Performance Metrics
- Payment Analytics and Revenue Tracking
- Task Completion rates and Progress Monitoring
- Interactive Charts with Chart.js integration
CPS Task Manager/
├── apps/
│ ├── api/ # Backend REST API
│ ├── dashboard/ # Frontend Next.js App
│ └── docs/ # Documentation Site
├── packages/
│ ├── ui/ # Shared UI Components
│ ├── eslint-config/ # Shared ESLint Config
│ └── typescript-config/ # Shared TypeScript Config
└── turbo.json # Turborepo Configuration
- Framework: Express.js with ES Modules
- Database: MongoDB with Mongoose ODM
- Authentication: JWT with bcrypt password hashing
- Validation: Zod schema validation
- Documentation: Swagger/OpenAPI integration
- Logging: Winston logger with structured logging
- File Upload: Cloudinary integration
Key Components:
- Models: User, Task, Contest, Problem, Payment, Marketing, Class, Video, Comment
- Controllers: RESTful API controllers with async/await
- Middleware: Authentication, Authorization, Error handling
- Routes: Modular route organization
- Utils: Async handler, logger utilities
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS with custom components
- State Management: React Context + Custom Hooks
- Forms: React Hook Form with Zod validation
- UI Components: Headless UI + Heroicons
- Charts: Chart.js with react-chartjs-2
- Drag & Drop: @hello-pangea/dnd for Kanban boards
Key Features:
- Responsive Design: Mobile-first approach
- Dark/Light Mode: Theme support
- Real-time Updates: Optimistic UI patterns
- Error Handling: Toast notifications
- Loading States: Skeleton loaders
- Accessibility: ARIA labels and keyboard navigation
- Runtime: Node.js 18+
- Framework: Express.js 5.x
- Database: MongoDB with Mongoose 8.x
- Authentication: JWT + bcrypt
- Validation: Zod 3.x
- Documentation: Swagger/OpenAPI
- File Storage: Cloudinary
- Logging: Winston
- Development: Nodemon
- Framework: Next.js 15.x (App Router)
- Language: TypeScript 5.x
- Styling: Tailwind CSS 4.x
- UI Components: Headless UI + Heroicons
- Forms: React Hook Form + Zod
- Charts: Chart.js + react-chartjs-2
- Drag & Drop: @hello-pangea/dnd
- Animations: Framer Motion
- HTTP Client: Axios
- Notifications: React Hot Toast
- Package Manager: pnpm 9.x
- Monorepo: Turborepo
- Linting: ESLint with shared configs
- Formatting: Prettier
- Type Checking: TypeScript
- Build Tool: Next.js + Turborepo
POST /api/v1/auth/register- User registrationPOST /api/v1/auth/login- User loginGET /api/v1/auth/profile- Get user profilePUT /api/v1/auth/profile- Update user profile
GET /api/v1/users- Get all users (Admin/Manager)GET /api/v1/users/:id- Get user by IDPUT /api/v1/users/:id- Update userDELETE /api/v1/users/:id- Delete user (Admin)
GET /api/v1/tasks- Get all tasksPOST /api/v1/tasks- Create taskGET /api/v1/tasks/:id- Get task by IDPUT /api/v1/tasks/:id- Update taskDELETE /api/v1/tasks/:id- Delete task
GET /api/v1/contests- Get all contestsPOST /api/v1/contests- Create contestGET /api/v1/contests/:id- Get contest by IDPUT /api/v1/contests/:id- Update contestDELETE /api/v1/contests/:id- Delete contest
GET /api/v1/problems- Get all problemsPOST /api/v1/problems- Create problemGET /api/v1/problems/:id- Get problem by IDPUT /api/v1/problems/:id- Update problemDELETE /api/v1/problems/:id- Delete problem
GET /api/v1/payments- Get all payments (Admin/Manager)POST /api/v1/payments- Create paymentGET /api/v1/payments/:id- Get payment by IDPUT /api/v1/payments/:id- Update paymentDELETE /api/v1/payments/:id- Delete payment
GET /api/v1/marketing- Get all marketing tasksPOST /api/v1/marketing- Create marketing taskGET /api/v1/marketing/:id- Get marketing task by IDPUT /api/v1/marketing/:id- Update marketing taskDELETE /api/v1/marketing/:id- Delete marketing task
GET /api/v1/classes- Get all classesPOST /api/v1/classes- Create classGET /api/v1/classes/:id- Get class by IDPUT /api/v1/classes/:id- Update classDELETE /api/v1/classes/:id- Delete class
GET /api/v1/videos- Get all videosPOST /api/v1/videos- Create videoGET /api/v1/videos/:id- Get video by IDPUT /api/v1/videos/:id- Update videoDELETE /api/v1/videos/:id- Delete video
GET /api/v1/stats/dashboard- Dashboard statisticsGET /api/v1/stats/tasks- Task statisticsGET /api/v1/stats/payments- Payment statisticsGET /api/v1/stats/users- User statistics
Root Level:
pnpm dev # Start all applications in development mode
pnpm build # Build all applications
pnpm lint # Lint all applications
pnpm format # Format code with Prettier
pnpm check-types # Type check all applicationsAPI (/apps/api):
pnpm dev # Start development server with nodemon
pnpm start # Start production serverDashboard (/apps/dashboard):
pnpm dev # Start development server on port 3000
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm check-types # Type checkBackend (/apps/api/.env):
PORT=5001
MONGODB_URI=mongodb://localhost:27017/CPS Task Manager
JWT_SECRET=your-super-secret-jwt-key
NODE_ENV=development
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secretFrontend (/apps/dashboard/.env):
NEXT_PUBLIC_API_URL=http://localhost:5001/api/v1User Model:
{
name: String,
email: String (unique),
password: String (hashed),
role: Enum ['ADMIN', 'MANAGER', 'MEMBER'],
profileImage: String (Cloudinary URL),
createdAt: Date,
updatedAt: Date
}Task Model:
{
title: String,
description: String,
status: Enum ['TODO', 'IN_PROGRESS', 'IN_REVIEW', 'COMPLETED', 'BLOCKED'],
priority: Enum ['LOW', 'NORMAL', 'HIGH'],
assignedTo: ObjectId (ref: User),
reportedTo: ObjectId (ref: User),
estimatedTime: String,
subtasks: Array,
comments: Array,
createdAt: Date,
updatedAt: Date
}Contest Model:
{
courseName: Enum ['CPC', 'JIPC', 'Bootcamp'],
batchNo: Number,
contestName: String,
platform: Enum ['Leetcode', 'Vjudge'],
status: Enum ['TODO', 'IN_PROGRESS', 'IN_REVIEW', 'COMPLETED', 'BLOCKED'],
priority: Enum ['LOW', 'NORMAL', 'HIGH'],
assignedTo: ObjectId (ref: User),
reportedTo: ObjectId (ref: User),
estimatedTime: String,
createdAt: Date,
updatedAt: Date
}Problem Model:
{
courseName: Enum ['CPC', 'JIPC', 'Bootcamp'],
batchNo: Number,
problemName: String,
onlineJudge: Enum ['Leetcode', 'Vjudge'],
status: Enum ['TODO', 'IN_PROGRESS', 'IN_REVIEW', 'COMPLETED', 'BLOCKED'],
priority: Enum ['LOW', 'NORMAL', 'HIGH'],
assignedTo: ObjectId (ref: User),
reportedTo: ObjectId (ref: User),
estimatedTime: String,
platform: Enum ['Google Classroom', 'Website'],
createdAt: Date,
updatedAt: Date
}# Build the Docker image
docker build -t CPS Task Manager .
# Run the container
docker run -p 3000:3000 -p 5001:5001 CPS Task ManagerBackend:
cd apps/api
npm install --production
npm startFrontend:
cd apps/dashboard
npm install --production
npm run build
npm start- Set
NODE_ENV=production - Configure MongoDB connection string
- Set secure JWT secret
- Configure Cloudinary credentials
- Set up reverse proxy (nginx) if needed
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Use Prettier for code formatting
- Follow ESLint rules
- Write meaningful commit messages
- Add TypeScript types where applicable
This project is licensed under the ISC License. See the LICENSE file for details.
- Documentation: Check the
/docsdirectory for detailed guides - Issues: Report bugs and feature requests via GitHub Issues
- Discussions: Join our GitHub Discussions for community support
Tagline: CPS Task Manager: Where Teams Work in Sync.
Built with ❤️ using Next.js, Express, MongoDB, and TypeScript
Made for teams who want to work smarter, not harder.