Metadata-Version: 2.4
Name: KG-ARCHMAP
Version: 0.7.2
Summary: Static architecture analysis and visualization for software projects.
Author: Kaua Gabriel
License: MIT License
        
        Copyright (c) 2026 Kaua Gabriel (Kaua-KGzin)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
License-File: NOTICE.md
Keywords: architecture,archmap,dependency-graph,static-analysis,visualization
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.2.0; extra == 'dev'
Requires-Dist: ruff>=0.11.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Description-Content-Type: text/markdown

# ArchMAP

[![CI](https://github.com/Kaua-KGzin/ArchMAP/actions/workflows/ci.yml/badge.svg)](https://github.com/Kaua-KGzin/ArchMAP/actions/workflows/ci.yml)
[![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
[![Version](https://img.shields.io/badge/version-0.7.0-orange)](./CHANGELOG.md)

Static architecture analysis for software repositories.

ArchMAP scans source code, builds dependency graphs, detects cycles, reports architectural risks, and serves an interactive web UI.

Supported languages:
- Python
- JavaScript
- TypeScript
- Rust
- Go
- PHP
- Java
- C#
- C/C++

## Status

- Current release: `v0.7.0`
- Primary runtime: Python `>=3.11`
- Interactive UI: built-in static UI + Node dev server option
- Distribution: PyPI package + Windows executable

## Installation

### From PyPI

```bash
pip install archmap
```

### For local development

```bash
git clone https://github.com/Kaua-KGzin/ArchMAP
cd ArchMAP
python -m pip install -e ".[dev]"
```

## Quick demo

Run the bundled sample project:

```bash
archmap analyze examples/sample-project --format both --include-cytoscape
archmap serve examples/sample-project
```

Useful API endpoints while `serve` is running:

- `GET /api/graph`
- `GET /api/health`
- `GET /api/project`
- `POST /api/reanalyze`

## CLI overview

### Analyze

```bash
archmap analyze <path> --format json|mermaid|both
```

Quality gates for CI:

```bash
archmap analyze . --fail-on-risks --top 10
```

Use `analyze` for the full report, quality gates, Mermaid, JSON, and Cytoscape exports.

### Explain

```bash
archmap explain <path>
```

Prints a simple architecture summary for tired humans:

```text
auth -> users, payments
payments -> gateway
```

### Risk

```bash
archmap risk <file> [path]
```

Shows blast radius, incoming/outgoing dependencies, and the file risk score.

### Improve

```bash
archmap improve [path] --out-script .codeatlas/refactor.ps1
```

Suggests a cleaner project structure, such as `/auth`, `/payments`, `/users`,
and can generate a helper refactor script.

### Serve

```bash
archmap serve <path> --host 0.0.0.0 --port 3000
```

### Diff

```bash
archmap diff HEAD~5 HEAD
archmap history --repo . --limit 12
```

## Git workflow (professional flow)

Branch promotion model:

`feat/* -> dev -> release/* -> main`

Also supported:
- `feature/*` (legacy alias)
- `fix/*`
- `docs/*`

Rules:

1. No direct feature merge into `main`.
2. `release/*` accepts only stabilization changes.
3. CI must pass before merge.
4. Update docs/changelog when behavior changes.

See:
- [CONTRIBUTING.md](./CONTRIBUTING.md)
- [docs/BRANCHING.md](./docs/BRANCHING.md)

## Repository layout

```text
ArchMAP/
+-- .github/                  # CI/release workflows and PR template
+-- docs/                     # MkDocs documentation
+-- examples/                 # sample project for demos
+-- logs/                     # runtime/archive log organization
+-- scripts/                  # automation helpers (smoke, benchmark, exe build)
+-- src/archmap/              # Python source code
+-- tests/                    # automated test suite
+-- web-ui/                   # Node dev server + static assets
+-- archmap.spec              # PyInstaller spec
+-- NOTICE.md                 # original distribution notice
`-- README.md
```

## Logs and artifacts

- Runtime logs: `logs/runtime/` (git-ignored)
- Historical logs: `logs/archive/`
- Build artifacts: generated locally (`build/`, `dist/`) and should not be committed as source changes

## Windows executable

Build locally:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/build-exe.ps1 -Clean
```

This script:
- Builds `dist/archmap.exe`
- Creates a versioned binary copy
- Writes `dist/archmap-build-info.json` with SHA256
- Runs executable smoke test (`archmap.exe version`)

## Node development server utilities

For frontend/API exploration with dynamic Python analysis:

```bash
npm run serve:web -- --path .
```

## Original distributor rights

Original distributor and primary author: **Kaua Gabriel / Kauã Gabriel** (Kaua-KGzin).

Redistributions must preserve:
- [LICENSE](./LICENSE)
- [NOTICE.md](./NOTICE.md)

## License

MIT. See [LICENSE](./LICENSE).
