Skip to content
This repository was archived by the owner on Jul 5, 2026. It is now read-only.

D3lK1ch1/ProjectManagement

Repository files navigation

CPM Engine — GitHub Commit Critical Chain Analysis

A Symfony 8 REST API implementing the PERT/CPM critical path algorithm, demonstrated against real GitHub commit history.

Was previously a PM web-app, with the desire to use what I have learned to implement on my GitHub repos and finish my projects more efficiently.


What This Is

This project implements the CPM (Critical Path Method) algorithm - topological sort, forward pass, backward pass, slack calculation, and critical path identification — and applies it to a GitHub repository's commit history as its input data.

Each commit becomes an activity. Each parent→child relationship becomes a dependency. Merge commits produce fan-in edges, so parallel development branches appear as parallel paths in the critical chain analysis.

The result: for any public GitHub repo, you can see which commits formed the longest elapsed-time thread (the critical chain), and which branches had buffer before they needed to merge.

What This Is Not

CPM is a prospective planning tool — it needs estimated durations set before work begins. GitHub commit data is inherently retrospective. This project applies CPM to historical data, which produces a valid retrospective analysis but is not a PM planning tool. No GitHub data source (commits, issues, PRs) closes this gap without user-supplied duration estimates.

This mismatch was identified during development. The project was closed out as a working portfolio artifact rather than extended into something it couldn't be.


Built With

  • PHP 8.4 — language runtime
  • Symfony 8.0 — REST API framework, dependency injection, routing
  • Doctrine ORM — entity mapping and migrations
  • SQLite — local development database (var/data.db)
  • Mermaid.js — critical chain diagram rendering in the demo
  • GitHub REST API — commit history source

Getting Started

Prerequisites

  • PHP 8.4+
  • Composer

Installation

git clone <repo-url>
cd ProjectManagement
composer install
php bin/console doctrine:migrations:migrate
php bin/console doctrine:fixtures:load
php -S localhost:8000 -t public public/index.php

Visit http://localhost:8000 — the demo page loads automatically.


API Endpoints

  • GET /api/projects — list all imported projects
  • GET /api/projects/{id} — project name and id
  • GET /api/projects/{id}/critical-path — ES, EF, LS, LF, slack, is_critical per activity
  • GET /api/projects/{id}/network-diagram — nodes, edges, Mermaid string, project duration
  • POST /api/github/import — body { "url": "https://github.com/{owner}/{repo}" }, returns { "project_id": <int> }

Known Limitations

  • No pagination — only the most recent 100 commits are fetched per import
  • Duration is elapsed hours — time between a commit and its most recent in-window parent, rounded to the nearest hour. Commits in the same session show < 1h. This is elapsed time, not effort.
  • No URL normalization.git suffix and trailing slash variants are treated as separate projects
  • Re-import replaces — same URL overwrites existing activities in place, same project_id
  • No route-level test for the import endpoint — mapper logic has unit tests; controller persistence is manually verified

Status

Closed. The CPM engine and GitHub importer are complete and working. Further development (issues/PRs as activities, prospective planning input, deployment) would require a different data model that this project's architecture doesn't support without a redesign.

About

A webapp analyzing GitHub repos and turn them into PM insights, for the sake of accountability based on PM essentials.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors