How sohampawar022005/permitgraph works
PermitGraph is regulatory-intelligence and compliance infrastructure, not a government application portal. Its central workflow ingests regulatory text, produces candidate rules for human verification, evaluates verified rules, and relates approvals in a dependency graph; regulatory changes can then be analyzed for impact. The API exposes these capabilities to the web UI and REST-client CLI. The README documents the product pipeline and major capabilities; sampled source confirms selected wiring, including API application workflow and web/CLI API use. Unsampled integrations are not inferred beyond documented relationships.
Main entry points: routers REST endpoints · graph.py Approval graph · change_service.py Change service · workflow_service.py Application workflow
Components 24
Regulatory ingestion
- Regulatory text
- Document OCR
packages/document-engine/document_engine/pipeline.py - Section extraction
packages/regulatory-parser/regulatory_parser/sections.py - Rule candidates
packages/regulatory-parser/regulatory_parser/candidates.py - Document service
apps/api/app/services/document_service.py
Rules and analysis
- Rules evaluation
packages/rules-engine/rules_engine/engine.py - Rules service
apps/api/app/services/rules_service.py - Approval graph
packages/graph-engine/graph_engine/graph.py - Graph adapter
packages/graph-engine/graph_engine/adapters/neo4j_adapter.py - Change detection
packages/change-detection/change_detection/diff.py - Change service
apps/api/app/services/change_service.py - Impact analysis
packages/impact-analysis/impact_analysis/engine.py
Review and workflow
- Human verification
apps/api/app/services/verification_service.py - Application workflow
apps/api/app/services/workflow_service.py - Workflow and SLA
packages/workflow-engine/workflow_engine/workflow.py
API and persistence
- Audit records
apps/api/app/models/audit.py - REST endpoints
apps/api/app/routers - API application
apps/api/app/main.py - Relational database
User clients
- Web interface
apps/web/src/pages/DiscoverPage.tsx - Web API client
apps/web/src/lib/api.ts - Operator CLI
cli/permitgraph_cli/main.py - CLI REST client
cli/permitgraph_cli/client.py
Other components
- Operators and users
Connections 27
- Regulatory text → Document OCR: ingests
README.md - Document OCR → Section extraction: extracts text
README.md - Section extraction → Rule candidates: produces candidates
README.md - Rule candidates → Human verification: submits for review
README.md - Human verification → Rules evaluation: verifies rules
README.md - Rules evaluation → Approval graph: supports approvals
README.md - Approval graph → Change detection: tracks dependencies
README.md - Change detection → Impact analysis: flags affected items
README.md - API application → REST endpoints: registers routes
apps/api/app/main.py - REST endpoints → Application workflow: starts and transitions
apps/api/app/routers/applications.py - Application workflow → Workflow and SLA: applies transitions
apps/api/app/services/workflow_service.py - Application workflow → Audit records: records events
apps/api/app/services/workflow_service.py - REST endpoints → Human verification: routes review actions
apps/api/app/routers/review.py - REST endpoints → Relational database: reads and writes
apps/api/app/routers/applications.py - API application → Relational database: initializes metadata
apps/api/app/main.py - Operators and users → Web interface: uses
README.md - Web interface → Web API client: requests data
apps/web/src/pages/DiscoverPage.tsx - Web API client → REST endpoints: calls REST API
- Operators and users → Operator CLI: uses
cli/permitgraph_cli/main.py - Operator CLI → CLI REST client: dispatches commands
cli/permitgraph_cli/main.py - CLI REST client → REST endpoints: calls REST API
cli/permitgraph_cli/client.py - REST endpoints → Document service: handles documents
- REST endpoints → Rules service: serves rules
- REST endpoints → Change service: handles changes
- Change service → Change detection: detects changes
- Change service → Impact analysis: analyzes impact
- Approval graph → Graph adapter: uses adapter
packages/graph-engine/graph_engine/adapters/neo4j_adapter.py