Skip to content

hamzzaaamalik/deltagraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeltaGraph - Explainable Customization Analyzer

DeltaGraph is a production-ready backend system that helps enterprises understand and manage their ERP customizations. It ingests repository code, builds dependency graphs, and answers crucial questions about code customization and impact.

Problem

Enterprise systems often have complex customizations that are difficult to understand:

  • Where is a field or metric calculated?
  • What breaks if we change or remove something?
  • Which customizations diverge from standard code?

These questions are hard to answer without deep system knowledge or extensive manual code review.

Solution

DeltaGraph solves these problems by:

  1. Static Analysis: Parsing TS/JS, SQL, and YAML files to extract functions, tables, and dependencies
  2. Graph Building: Creating a comprehensive dependency graph that shows relationships between components
  3. Delta Detection: Comparing standard vs custom implementations to highlight divergences
  4. Natural Language Interface: Answering questions with evidence-based paths to the sources

Key Features

  • Customization Classification: Tags objects as standard or custom based on location/naming
  • Impact Analysis: Calculates downstream effects of changes with risk scoring
  • Data Lineage: Shows where fields are calculated with evidence paths
  • Explainable Results: All answers include concrete evidence (file paths, line numbers)

Quickstart

# Clone the repository
git clone https://github.com/hamzzaaamalik/deltagraph.git
cd deltagraph

# Setup environment
cp .env.example .env

# Generate demo repository zip
bash scripts/make_demo_zip.sh

# Start the application
docker compose up -d

# Run the demo flow
bash scripts/demo_flow.sh

API Endpoints

Endpoint Description
POST /ingest Ingest a repository (ZIP upload or Git URL)
POST /ask Ask a natural language question about the code
GET /graph/node/:id Get a node and its connections
GET /graph/impact?key=<objectKey> Analyze impact of changing an object
GET /delta/summary Get summary of standard vs custom differences
GET /search?text=<query> Search objects by name or content

Security

  • API Key Authentication: All endpoints require an API key
  • Source Code Safety: NL router only sees question text, never source code
  • Local Processing: All analysis happens on your machine, no external services required

Demo Repository

The included demo repository contains:

  • Standard pricing, VAT calculation, and GL posting modules
  • Custom overrides for EU B2C pricing and VAT rates
  • ETL jobs for invoice processing and financial reporting
  • Database schema with realistic tables and relationships
  • Seeded bug: VAT rates stored as percentages but expected as fractions

Extensibility

DeltaGraph is designed for extensibility:

  • Parsers: Add support for ABAP, COBOL, or other languages
  • Importers: Support for SAP transports, database dumps, or API integrations
  • Security: Add path-based RBAC for multi-tenant deployments
  • Search: Implement vector search for semantic code understanding

Architecture

DeltaGraph is built on modern, proven technologies:

  • Backend: Node.js with Fastify for high-performance API
  • Database: PostgreSQL for reliable storage and graph operations
  • Containers: Docker and Docker Compose for easy deployment
  • Static Analysis: Custom parsers with pattern matching and signature detection

License

MIT

About

DeltaGraph is a production-ready backend system that helps enterprises understand and manage their ERP customizations. It ingests repository code, builds dependency graphs, and answers crucial questions about code customization and impact.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors