The Software Physics & Neural Architecture Engine. Decode Complexity. Visualize Technical Debt. Secure Your Logic.
PyBlueprint is an advanced static analysis dashboard designed for software architects and senior developers. Unlike standard linters that merely check syntax, PyBlueprint combines Neural Intelligence (AI) with Halstead Software Physics to provide a deep, structural health scan of your Python codebase.
It answers the critical question: "Is this code maintainable, secure, and logically sound?"
A unique, real-time visualization (powered by Plotly) that triangulates code health across three vectors:
- Maintainability: How hard is it to modify this code later?
- Structural Simplicity: Is the Cyclomatic Complexity too high?
- Security: Are there logic vulnerabilities?
Leverages the Salesforce CodeT5 transformer model to:
- Generate "Technical Briefs" (plain-English summaries of complex logic).
- Provide AI-driven refactoring strategies to reduce nesting and improve readability.
Goes beyond line counts to calculate scientific metrics:
- Program Volume (Bits): The information density of your logic.
- Mental Effort: The cognitive load required for a human to understand the algorithm.
- Difficulty: The statistical probability of introducing errors during changes.
An AST-based static scanner that proactively detects:
- Hardcoded secrets (API Keys, Passwords, Tokens).
- Dangerous execution vectors (
eval(),exec(),os.system).
- Core: Python 3.x
- Interface: Streamlit (Custom "Blueprint" Dark Mode)
- Visualization: Plotly Interactive Radar Charts
- AI Backend: Hugging Face Transformers (
Salesforce/codet5-base-multi-sum) - Static Analysis: Radon & Python AST
-
InstallationClone the repo and install the required scientific and AI libraries. git clone https://github.com/yourusername/PyBlueprint.git cd PyBlueprint pip install -r requirements.txt
-
Launch the Architect Engine Start the local server. The AI model (approx. 500MB) will auto-download on the first run.
streamlit run app.py
-
Usage Paste Code: Input raw Python source code into the dashboard buffer. Generate Blueprint: Click the analysis trigger. Review:
- Check the Radar Chart for immediate health visualization.
- Read the Neural Brief for logic verification.
- Consult the Security Audit for vulnerabilities.
PyBlueprint_v2/
βββ app.py # π₯οΈ The Architect Dashboard entry point
βββ requirements.txt # π¦ ML and Analytics dependencies
βββ modules/
βββ brain.py # π§ AI Logic (Neural Network Interface)
βββ inspector.py # π΅οΈ Static Analysis & Security Scanner
PyBluePrint - Created by Pushti Kadia