A simple, intuitive React.js application for managing and visualizing task priorities across team members. Built with modern web technologies including React, TypeScript, Tailwind CSS, and shadcn/ui components.
- π Task Management: Create, edit, delete, and complete tasks with titles, scores, and optional deadlines
- β Task Completion System: Mark tasks as done, view completion history, and restore completed tasks
- π§Ή Bulk Operations: Clear all completed tasks for any team member with confirmation
- π₯ Team Member Management: Add, edit, and remove team members with custom modal dialogs
- π― Dual Drag & Drop:
- Reorder tasks within team member sections
- Reorder team members themselves
- π Enhanced Workload Distribution: Real-time stacked bar chart showing both active and completed task scores
- π Task Analytics: Visual breakdown of active vs completed tasks with color-coded indicators
- πΎ JSON Database: Local file-based storage with automatic persistence via RESTful API
- π Auto-Recovery: Database file created automatically if missing
- π API Documentation: Interactive Swagger UI documentation at
/api/docs
- π Modern Design: Built with shadcn/ui components for consistent, accessible UI
- π± Responsive Layout: Works seamlessly on desktop, tablet, and mobile devices
- π¨ Purple Theme: Beautiful purple color scheme throughout the application
- β‘ Visual Feedback:
- Color-coded task cards with deadline indicators (overdue = red, upcoming = yellow)
- Purple score badges for task points
- Smooth drag-and-drop animations with rotation and scaling effects
- π Custom Modals: Professional confirmation and alert dialogs (no browser popups)
- βΏ Accessibility: Proper ARIA labels and keyboard navigation support
- No Authentication Required: Simple, immediate access
- Real-time Updates: Charts and displays update instantly when data changes
- Type Safety: Full TypeScript implementation
- Component Architecture: Modular, reusable React components
- Framework: React 18+ with TypeScript
- Build Tool: Vite 5+
- Styling: Tailwind CSS 3+ with custom purple theme
- UI Components: shadcn/ui for accessible, modern components
- Drag & Drop: @dnd-kit for smooth task and team member reordering
- Charts: Recharts for responsive workload visualization
- Date Handling: date-fns for deadline formatting
- Icons: Lucide React for consistent iconography
- Runtime: Node.js 18+
- Framework: Express.js for RESTful API
- Database: JSON file-based storage (
data/data.json
) - API Documentation: Swagger UI with interactive testing
- CORS: Enabled for local development
- UUID: For generating unique IDs
- TypeScript: Full type safety with strict configuration
- ESLint: Code linting and formatting
- PostCSS: CSS processing with Tailwind
- Playwright: Browser automation and testing (via MCP)
-
Clone the repository:
git clone https://github.com/agusmakmun/team-workload-distribution.git cd team-priority
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Start both servers:
# Start both API server and dev server npm start # OR start them separately: # npm run server # API server on :8980 # npm run dev # Frontend on :5173
-
Open your browser: Navigate to
http://localhost:5173
Note: The database file (data/data.json
) is created automatically with sample data if it doesn't exist.
The application includes comprehensive API documentation powered by Swagger UI:
- Access URL: http://localhost:8980/api/docs
- Interactive Testing: Test all API endpoints directly from the browser
- Complete Schemas: Full data model documentation for Task, TeamMember, and AppData
- Request/Response Examples: See exactly what data to send and expect back
GET /api/data
- Retrieve all application dataPUT /api/data
- Update all application dataPOST /api/tasks
- Create a new taskPUT /api/tasks/{id}
- Update an existing taskDELETE /api/tasks/{id}
- Delete a taskPUT /api/tasks/reorder
- Reorder tasks within team member sectionsPUT /api/team-members/reorder
- Reorder team member display orderGET /api/health
- API health check
The Swagger documentation provides detailed request/response schemas, example payloads, and allows you to test API calls directly from the interface.
If you prefer using Docker:
# Clone the repository
git clone https://github.com/agusmakmun/team-workload-distribution.git
cd team-priority
# Run with Docker Compose
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the application
docker-compose down
The application will be available at:
- Frontend: http://localhost:5173
- API: http://localhost:8980
- API Docs: http://localhost:8980/api/docs
The application uses a local JSON file (data/data.json
) for data persistence. This file is automatically created by the server and contains all team members and tasks.
- The
data/data.json
file is ignored by Git to prevent committing local data - Use
data/data.json.sample
as a template for the database structure - The API server automatically manages data persistence and provides RESTful endpoints
The application comes with sample data including three team members (John, Doe, Felix) and example tasks to help you get started immediately.
- Click "Manage Team" in the header
- Add new members by entering their name and clicking "Add"
- Edit existing members by clicking the edit icon
- Delete members using the trash icon (requires confirmation)
- Click "Add Task" within any team member's card
- Fill in the task details:
- Title: Descriptive name for the task
- Score: Numerical value (1-100) representing complexity/effort
- Assign to: Team member (pre-selected based on which card you clicked)
- Deadline: Optional due date
- Click "Create Task"
- βοΈ Edit: Click the edit icon on any task card to modify details
- ποΈ Delete: Click the trash icon (shows custom confirmation modal)
- β Mark as Done: Click the checkmark icon to complete tasks
- π View History: Click the "History" button to see completed tasks for each team member
- π Restore Tasks: Restore completed tasks back to active status from history view
- π§Ή Clear All: Remove all completed tasks for a team member (with confirmation)
- π― Reorder Tasks: Drag and drop tasks within a team member's section to change priority
- π Visual Indicators:
- π‘ Yellow background: Deadline within 3 days
- π΄ Red background: Overdue tasks
- π£ Purple score badges: Task complexity points
- π’ Green background: Completed tasks in history view
- π₯ Reorder Members: Drag and drop entire team member cards to change display order
- βοΈ Edit Members: Click edit icon in team management dialog
- ποΈ Delete Members: Custom modal with warning about task deletion
β οΈ Validation: Prevents deletion of last team member
The enhanced stacked bar chart at the top shows:
- X-axis: Team member names
- Y-axis: Task scores (stacked view)
- Purple Bars: Active task scores (current workload)
- Green Bars: Completed task scores (achievement tracking)
- Legend: Color-coded legend for easy interpretation
- Summary Cards: Detailed stats showing active/completed task counts and scores
- Real-time Updates: Chart updates instantly when tasks are completed or restored
src/
βββ components/ # React components
β βββ Header.tsx # Application header with actions
β βββ WorkloadChart.tsx # Enhanced stacked bar chart visualization
β βββ TaskCard.tsx # Individual task display with completion controls
β βββ TaskHistoryDialog.tsx # Completed task history and management
β βββ TeamMemberSection.tsx # Team member task lists with history access
β βββ TaskFormDialog.tsx # Task creation/editing modal
β βββ TeamManagementDialog.tsx # Team management modal
β βββ ui/ # shadcn/ui components (button, dialog, card, etc.)
βββ lib/ # Utility functions
β βββ jsonFileStorage.ts # Enhanced data persistence with completion tracking
β βββ utils.ts # General utilities
βββ types/ # TypeScript type definitions
β βββ index.ts # App-wide type definitions (Task, TeamMember, AppData)
βββ App.tsx # Main application component
βββ main.tsx # Application entry point
βββ index.css # Global styles and Tailwind imports
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run lint
- Run ESLint
Handles all data operations including:
- Loading/saving to JSON file via REST API
- CRUD operations for tasks and team members
- Task completion and history management
- Task reordering and priority management
- Workload calculations with active/completed breakdown
- Bulk operations (clear all completed tasks)
Built with @dnd-kit for:
- Smooth drag animations
- Accessibility support
- Touch device compatibility
- Visual feedback during drag operations
Complete TypeScript coverage with interfaces for:
Task
: Individual task data structure with completion status and timestampsTeamMember
: Team member informationAppData
: Complete application state including completedTasks array- Extended task properties: status, completedAt, active/completed tracking
The application uses Tailwind CSS with CSS variables for theming. Key customization points:
- Colors: Modify CSS variables in
src/index.css
- Component Styles: Update shadcn/ui component files in
src/components/ui/
- Layout: Adjust grid layouts in main components
Extend the data model by:
- Adding fields to TypeScript interfaces in
src/types/index.ts
- Updating the storage layer in
src/lib/storage.ts
- Modifying UI components to display new fields
- Multi-team Support: Handle multiple teams in one instance
- Cloud Storage: Sync data across devices
- User Authentication: Personal workspaces
- Advanced Reporting: Time tracking and analytics
- Task Templates: Predefined task types and categories
- Due Date Notifications: Email/browser notifications for deadlines
- Bulk Task Operations: Multi-select and batch operations
- Task Comments: Add notes and updates to tasks
- Time Tracking: Log hours spent on completed tasks
- Mobile App: Native mobile version
- Real-time Collaboration: Live updates across users
- Integration APIs: Connect with external tools (Slack, Jira, GitHub)
- Advanced Filtering: Search and filter capabilities
- Export/Import: CSV, Excel, and JSON data export
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is open source and available under the MIT License.
- shadcn/ui for the beautiful component library
- Recharts for the charting functionality
- dnd-kit for the drag-and-drop system
- Tailwind CSS for the utility-first CSS framework
This project is licensed under the MIT License - see the LICENSE file for details.
- β Commercial use - Use this project in commercial applications
- β Modification - Modify the source code as needed
- β Distribution - Distribute the original or modified code
- β Private use - Use privately without restrictions
β οΈ Liability - No warranty or liability providedβ οΈ License notice - Include the original license and copyright notice
Built with β€οΈ using React and TypeScript