Project Management Automation
Build a project management system with automated status tracking, deadline alerts, resource allocation, and progress reporting.
Project management data model
Project management tools like Asana, Monday, and Linear are powerful but expensive and over-featured for small teams. Building your own gives you exactly the features you need, integrated with your existing systems, at a fraction of the cost. The core data model has four entities. Ask Claude Code: Create a Next.js project with TypeScript, Tailwind, and Prisma for a project management tool. Define the database schema. Project (id, name, description, status as planning or active or on_hold or completed, startDate, targetEndDate, actualEndDate optional, ownerId, budget optional, priority as low or medium or high or critical, tags as JSON array, progress as integer 0 to 100 computed from task completion). Task (id, projectId, title, description, status as todo or in_progress or in_review or done, priority as low or medium or high or urgent, assigneeId optional, dueDate optional, estimatedHours optional, actualHours optional, parentTaskId optional for subtasks, order for sorting within a project, createdAt, updatedAt, completedAt optional). TeamMember (id, name, email, role, capacity as hours per week available for project work, skills as JSON array). TimeEntry (id, taskId, memberId, hours, date, notes optional). Seed with 3 sample projects (one active, one planning, one on hold), 40 tasks across the projects, and 5 team members with varied skills and capacity. Ask Claude Code: Generate realistic project data. One project should be on track (70 percent of tasks done, deadline in 3 weeks). One should be at risk (30 percent of tasks done, deadline in 1 week). One should be healthy but early (planning phase, no overdue tasks). This varied data lets you test all dashboard states.
Task tracking and automation
The task board is the daily operating view. Team members need to see what to work on, update progress, and flag blockers. Ask Claude Code: Build a task board at src/app/projects/[id]/board/page.tsx. Show a Kanban view with columns for each status: To Do, In Progress, In Review, and Done. Each column shows its tasks as cards with: the task title, assignee avatar, priority indicator (coloured dot), due date (red if overdue, yellow if due today), and estimated hours remaining. Add drag-and-drop between columns to update status. Add automation rules. Ask Claude Code: Create an automation engine at src/lib/automation.ts. Define rules that trigger on task status changes. When a task moves to In Progress: if no assignee is set, prompt for assignment. Log the start time for time tracking. When a task moves to In Review: send a notification to the reviewer (the project owner by default). When a task moves to Done: log the completion time, calculate actual duration, and update the project progress percentage. When a task becomes overdue: change its priority to urgent if it was lower, send a notification to the assignee and project owner. Add recurring task support. Ask Claude Code: Some tasks repeat regularly — weekly status reports, monthly audits, daily checks. Create a RecurringTask type with a frequency (daily, weekly, monthly, quarterly) and a template (the task details to clone). When a recurring task is completed, automatically create the next instance with the new due date. Show recurring tasks differently on the board — a small repeat icon to distinguish them from one-off tasks. Build a task dependency system. Ask Claude Code: Tasks can depend on other tasks. Task B cannot start until Task A is completed. In the data model, add a dependencies field to Task (array of task IDs that must be done first). On the board, show a lock icon on tasks with unmet dependencies. When a dependency is completed, unlock the dependent task and notify the assignee that it is ready to start. Common error: circular dependencies (A depends on B, B depends on C, C depends on A) create deadlocks. Validate dependency additions and reject any that would create a cycle.
Resource allocation and capacity planning
Resource allocation answers the question: who should work on what, and do we have enough people? Ask Claude Code: Create a resource view at src/app/resources/page.tsx. Show each team member with: their name and role, their weekly capacity (for example, 32 hours available for project work out of 40 total), their current allocation (sum of estimated hours on assigned in-progress and upcoming tasks this week), their utilisation percentage (allocation divided by capacity — 100 percent means fully loaded, over 100 percent means overloaded), and a list of their assigned tasks sorted by due date. Visualise workload distribution. Ask Claude Code: Create a workload chart showing all team members as horizontal bars. The bar length represents capacity, filled portion represents allocation, and the colour indicates status: green for under 80 percent (has capacity), yellow for 80 to 100 percent (near capacity), and red for over 100 percent (overloaded). This instantly reveals bottlenecks — if one person is at 150 percent while another is at 40 percent, tasks need redistribution. Add a capacity planning timeline. Ask Claude Code: Create a timeline view showing resource allocation over the next 4 weeks. For each week, show each team member's expected workload based on task due dates and estimated hours. Identify weeks where the team is overcommitted: total tasks due that week exceed total available capacity. Suggest rebalancing: move tasks from overloaded members to those with capacity, or shift task due dates to spread the workload. Build a skill-based assignment helper. Ask Claude Code: When a task needs assignment, suggest team members based on: skill match (the task tags match the member's skills), current capacity (members with more availability score higher), past performance (members who completed similar tasks faster score higher), and deadline proximity (if the task is urgent, prefer members who can start immediately over those finishing other tasks). Show the suggestions ranked by fit score when the assignee field is clicked. Common error: capacity planning assumes perfect knowledge of task duration. In practice, estimates are often wrong. Track estimated versus actual hours for completed tasks and show the team's estimation accuracy. If the team consistently underestimates by 30 percent, multiply all estimates by 1.3 for planning purposes.
Automated status reporting
Status reports are essential for stakeholder communication but painful to write manually. Automating them saves hours each week and ensures consistency. Ask Claude Code: Create a status report generator at src/lib/status-report.ts. The generator collects data from the project and produces a structured report. For each project, calculate: overall progress (percentage of tasks completed), velocity (tasks completed per week over the last 4 weeks), schedule status (on track, at risk, or behind based on comparing progress to the deadline), tasks completed this week, tasks started this week, tasks overdue, blockers (tasks in review for more than 3 days, tasks with unmet dependencies past their due date), and upcoming milestones (tasks due in the next 2 weeks). Generate a narrative summary. Ask Claude Code: Write a report narrative from the data. Instead of raw numbers, produce readable sentences. Example: Project Alpha is 68 percent complete with 3 weeks remaining. This week the team completed 8 tasks and started 5 new ones. The project is on track to meet its deadline. Two tasks are overdue: Database migration (assigned to Alice, due 3 days ago) and API documentation (unassigned, due yesterday). Recommend assigning the documentation task to Bob, who has capacity this week. Build automated report distribution. Ask Claude Code: Create a weekly report cron job that runs every Friday at 4 PM. For each active project, generate the status report, format it as a clean HTML email, and send it to the project owner and configured stakeholders. Include a link to the full project dashboard for details. Store each generated report in the database for historical reference. Add a report customisation interface. Ask Claude Code: Create a settings page where project owners configure their report: which metrics to include (some projects care about budget, others do not), the distribution list (who receives the email), the frequency (weekly, fortnightly, or monthly), and custom sections (add project-specific notes that appear in every report). Add a manual report trigger — the Generate Report Now button — for ad-hoc updates before meetings. Common error: automated reports must handle edge cases gracefully. A project with zero tasks completed this week should not report velocity of 0 tasks per week — instead, say No tasks were completed this week. Consider reviewing task blockers. Always check for zero-division and empty data sets.
Time tracking and budget management
Time tracking connects effort to outcomes. Budget tracking ensures projects stay financially viable. Ask Claude Code: Build a time tracking system. Add a timer component to each task card. Clicking Start begins a timer that runs until the user clicks Stop. The elapsed time is saved as a TimeEntry linked to the task and the team member. Also allow manual time entry for retrospective logging — select a task, enter the hours and date, add optional notes. Show time tracking reports. Ask Claude Code: Create a time tracking dashboard at src/app/time/page.tsx. Show: a weekly timesheet view (rows are team members, columns are days, cells show hours logged), time by project (pie chart showing how team hours are distributed across projects), time by task (which tasks consume the most effort), estimated versus actual comparison (a table showing each completed task's estimate next to the actual hours, highlighting tasks that took more than 50 percent over estimate), and billable versus non-billable breakdown (if applicable). Add budget tracking. Ask Claude Code: Each project can have an optional budget (in hours or currency). As time is logged, calculate: total hours spent, total cost (hours multiplied by team member hourly rate — configurable per member), budget consumed as a percentage, burn rate (cost per week over the last 4 weeks), and projected total cost at the current burn rate. If the projected cost exceeds the budget, show a warning: At the current burn rate, this project will exceed its budget by 15 percent. Consider reducing scope or increasing the budget. Add a profitability view. Ask Claude Code: For projects with both a budget (what the client pays or the project is worth) and time tracking (what it costs in team hours), calculate profitability: revenue minus cost. Show a profitability dashboard with each project's margin. Flag projects where profitability has turned negative. This is especially valuable for agencies and consultancies where project profitability directly affects the business. Common error: time tracking only works if the team actually uses it. Make it as frictionless as possible: one click to start, one click to stop, automatic prompts to log time at the end of each day, and gentle reminders for days with zero logged hours. Never use time tracking punitively — it is for project planning, not for surveillance.
Integrations and deployment
A project management tool must integrate with where work actually happens — code repositories, communication tools, and calendars. Ask Claude Code: Build a GitHub integration. When a pull request is created with a task ID in the title or description (e.g., PM-42), automatically link the PR to the task. When the PR is merged, move the task to In Review (or Done, configurable per project). Show linked PRs on the task detail page so project managers can see the code changes associated with each task without leaving the project management tool. Add a Slack or email notification integration. Ask Claude Code: Create a notification dispatcher at src/lib/notifications.ts. Send notifications for: task assignments (you have been assigned Task X in Project Y), approaching deadlines (Task X is due tomorrow), status changes (Alice moved Task X to Done), overdue alerts, and blocker alerts. Let users configure their notification preferences: which events they want to hear about and through which channel (email, in-app, or Slack webhook). Add calendar integration. Ask Claude Code: Generate ICS calendar files for project milestones and task deadlines. Create a Subscribe to Calendar button on the project page that generates a unique iCal URL. When tasks are created, updated, or completed, the calendar updates automatically. Team members add this URL to their Google Calendar or Outlook to see project deadlines alongside their meetings. Build an API for external integrations. Ask Claude Code: Create a REST API at src/app/api/v1/ with endpoints for projects (list, get, create, update), tasks (list, get, create, update, move), time entries (list, create), and team members (list, get). Authenticate with API keys. Document the API with request and response examples. This enables integration with tools like Zapier, Make, or custom scripts. Deploy to Vercel with a PostgreSQL database. Ask Claude Code: Configure production deployment. Set up cron jobs for: weekly status report generation (Fridays at 4 PM), daily deadline checking and notification (7 AM), and daily time tracking reminders (5 PM for members who have not logged any time). Set up the GitHub webhook for PR integration. Test the complete system with a real project: create tasks, assign team members, track time, generate a status report, and verify notifications are sent correctly.
Operations Management
This guide is hands-on and practical. The full curriculum covers the conceptual foundations in depth with structured lessons and quizzes.
Go to lesson