archiviz 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- archiviz-0.1.0/CHANGELOG.md +28 -0
- archiviz-0.1.0/LICENSE +18 -0
- archiviz-0.1.0/MANIFEST.in +16 -0
- archiviz-0.1.0/PKG-INFO +207 -0
- archiviz-0.1.0/README.md +161 -0
- archiviz-0.1.0/docs/exemples/analyse_projet_fullstack.md +174 -0
- archiviz-0.1.0/docs/exemples/analyse_projet_python.md +149 -0
- archiviz-0.1.0/docs/exemples/utilisation_api.md +209 -0
- archiviz-0.1.0/docs/langages/csharp.md +111 -0
- archiviz-0.1.0/docs/langages/docker.md +116 -0
- archiviz-0.1.0/docs/langages/go.md +101 -0
- archiviz-0.1.0/docs/langages/java.md +106 -0
- archiviz-0.1.0/docs/langages/javascript.md +126 -0
- archiviz-0.1.0/docs/langages/python.md +72 -0
- archiviz-0.1.0/docs/langages/rust.md +98 -0
- archiviz-0.1.0/docs/langages/sql.md +94 -0
- archiviz-0.1.0/pyproject.toml +89 -0
- archiviz-0.1.0/setup.cfg +4 -0
- archiviz-0.1.0/src/archiviz/__init__.py +15 -0
- archiviz-0.1.0/src/archiviz/analyseur/__init__.py +25 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_base.py +179 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_csharp.py +118 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_docker.py +100 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_go.py +96 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_java.py +118 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_javascript.py +128 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_python.py +139 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_rust.py +123 -0
- archiviz-0.1.0/src/archiviz/analyseur/adaptateur_sql.py +100 -0
- archiviz-0.1.0/src/archiviz/analyseur/gestionnaire_analyse.py +167 -0
- archiviz-0.1.0/src/archiviz/assistance_ia/__init__.py +5 -0
- archiviz-0.1.0/src/archiviz/assistance_ia/analyseur_ia.py +325 -0
- archiviz-0.1.0/src/archiviz/assistance_ia/correcteur_couches.py +211 -0
- archiviz-0.1.0/src/archiviz/graphe/__init__.py +7 -0
- archiviz-0.1.0/src/archiviz/graphe/arete.py +81 -0
- archiviz-0.1.0/src/archiviz/graphe/modele_graphe.py +192 -0
- archiviz-0.1.0/src/archiviz/graphe/noeud.py +111 -0
- archiviz-0.1.0/src/archiviz/interface_ligne_commande.py +207 -0
- archiviz-0.1.0/src/archiviz/interface_web/__init__.py +3 -0
- archiviz-0.1.0/src/archiviz/interface_web/index.html +938 -0
- archiviz-0.1.0/src/archiviz/serveur/__init__.py +5 -0
- archiviz-0.1.0/src/archiviz/serveur/serveur_web.py +202 -0
- archiviz-0.1.0/src/archiviz/surveillance/__init__.py +5 -0
- archiviz-0.1.0/src/archiviz/surveillance/observateur_fichiers.py +142 -0
- archiviz-0.1.0/src/archiviz/utils/__init__.py +1 -0
- archiviz-0.1.0/src/archiviz/utils/gestionnaire_erreurs.py +142 -0
- archiviz-0.1.0/src/archiviz.egg-info/PKG-INFO +207 -0
- archiviz-0.1.0/src/archiviz.egg-info/SOURCES.txt +54 -0
- archiviz-0.1.0/src/archiviz.egg-info/dependency_links.txt +1 -0
- archiviz-0.1.0/src/archiviz.egg-info/entry_points.txt +2 -0
- archiviz-0.1.0/src/archiviz.egg-info/requires.txt +26 -0
- archiviz-0.1.0/src/archiviz.egg-info/top_level.txt +1 -0
- archiviz-0.1.0/tests/__init__.py +1 -0
- archiviz-0.1.0/tests/test_analyseur.py +83 -0
- archiviz-0.1.0/tests/test_assistance_ia.py +124 -0
- archiviz-0.1.0/tests/test_modele_graphe.py +149 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Tous les changements notables dans ce projet seront documentés dans ce fichier.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-06-24
|
|
6
|
+
|
|
7
|
+
### Ajouté
|
|
8
|
+
- Système d'analyse multi-langages (Python, JavaScript, Java, Go, Rust, C#, SQL, Docker)
|
|
9
|
+
- Modèle de graphe unifié avec nœuds et arêtes
|
|
10
|
+
- Surveillance du système de fichiers avec watchdog
|
|
11
|
+
- Serveur web FastAPI avec WebSocket pour les mises à jour en temps réel
|
|
12
|
+
- Interface web interactive avec visualisation de graphe (vis.js)
|
|
13
|
+
- Assistance IA pour la réduction du bruit et la détection de motifs
|
|
14
|
+
- CLI `archiviz start` pour lancer l'analyse et le serveur
|
|
15
|
+
- Détection automatique des couches architecturales
|
|
16
|
+
- Détection des dépendances cycliques
|
|
17
|
+
- Détection des points de fragilité
|
|
18
|
+
- Filtres par type de nœud, langage et recherche
|
|
19
|
+
- Documentation complète
|
|
20
|
+
- Tests unitaires
|
|
21
|
+
|
|
22
|
+
### Fonctionnalités
|
|
23
|
+
- Analyse incrémentale avec surveillance en temps réel
|
|
24
|
+
- Visualisation interactive du graphe d'architecture
|
|
25
|
+
- Détection de motifs architecturaux (MVC, Microservices, Hexagonal, Couches)
|
|
26
|
+
- Explications en langage naturel des relations entre composants
|
|
27
|
+
- Masquage des dépendances standard et du code généré
|
|
28
|
+
- Fonctionnement 100% local sans dépendance cloud obligatoire
|
archiviz-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Archiviz — Proprietary Software License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Archiviz Team. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and its source code are the exclusive property of the Archiviz Team.
|
|
6
|
+
Unauthorized copying, distribution, modification, sublicensing, or use of this
|
|
7
|
+
software, in whole or in part, is strictly prohibited without the prior written
|
|
8
|
+
permission of the copyright holder.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
SOFTWARE.
|
|
17
|
+
|
|
18
|
+
For licensing inquiries, contact the Archiviz Team.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include CHANGELOG.md
|
|
4
|
+
include pyproject.toml
|
|
5
|
+
recursive-include src/archiviz *.py
|
|
6
|
+
recursive-include src/archiviz/interface_web *.html *.css *.js
|
|
7
|
+
recursive-include docs *.md
|
|
8
|
+
recursive-include tests *.py
|
|
9
|
+
global-exclude __pycache__
|
|
10
|
+
global-exclude *.pyc
|
|
11
|
+
global-exclude *.pyo
|
|
12
|
+
global-exclude *.pyd
|
|
13
|
+
global-exclude .git*
|
|
14
|
+
global-exclude .DS_Store
|
|
15
|
+
global-exclude *.swp
|
|
16
|
+
global-exclude *.swo
|
archiviz-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: archiviz
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Visualisation interactive et en temps réel de l'architecture de projets logiciels multi-langages
|
|
5
|
+
Author: Archiviz Team
|
|
6
|
+
License-Expression: LicenseRef-Proprietary
|
|
7
|
+
Project-URL: Homepage, https://github.com/archiviz/archiviz
|
|
8
|
+
Project-URL: Documentation, https://archiviz.readthedocs.io
|
|
9
|
+
Project-URL: Repository, https://github.com/archiviz/archiviz
|
|
10
|
+
Keywords: architecture,visualisation,code,multi-langages,analyse
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: fastapi>=0.104.0
|
|
22
|
+
Requires-Dist: uvicorn[standard]>=0.24.0
|
|
23
|
+
Requires-Dist: websockets>=12.0
|
|
24
|
+
Requires-Dist: watchdog>=3.0.0
|
|
25
|
+
Requires-Dist: networkx>=3.2
|
|
26
|
+
Requires-Dist: pydantic>=2.5.0
|
|
27
|
+
Requires-Dist: aiofiles>=23.2.0
|
|
28
|
+
Requires-Dist: python-multipart>=0.0.6
|
|
29
|
+
Requires-Dist: jinja2>=3.1.0
|
|
30
|
+
Requires-Dist: click>=8.1.0
|
|
31
|
+
Requires-Dist: rich>=13.7.0
|
|
32
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
33
|
+
Requires-Dist: toml>=0.10.0
|
|
34
|
+
Requires-Dist: pathspec>=0.11.0
|
|
35
|
+
Requires-Dist: orjson>=3.9.0
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
39
|
+
Requires-Dist: black>=23.12.0; extra == "dev"
|
|
40
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy>=1.7.0; extra == "dev"
|
|
42
|
+
Provides-Extra: ia
|
|
43
|
+
Requires-Dist: openai>=1.3.0; extra == "ia"
|
|
44
|
+
Requires-Dist: anthropic>=0.7.0; extra == "ia"
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
|
|
47
|
+
# Archiviz
|
|
48
|
+
|
|
49
|
+
> Visualisation interactive et en temps réel de l'architecture de projets logiciels multi-langages.
|
|
50
|
+
|
|
51
|
+
Archiviz analyse votre code source et génère un graphe interactif de son architecture — dépendances, couches, modules, classes, fonctions — accessible directement dans le navigateur.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Fonctionnalités
|
|
56
|
+
|
|
57
|
+
- **Analyse multi-langages** : Python, JavaScript/TypeScript, Java, Go, Rust, C#, SQL, Docker
|
|
58
|
+
- **Graphe interactif** : navigation, zoom, filtres par type et par langage, recherche
|
|
59
|
+
- **Temps réel** : mise à jour automatique du graphe dès qu'un fichier est modifié
|
|
60
|
+
- **Détection automatique** : couches architecturales, dépendances cycliques, points de fragilité
|
|
61
|
+
- **Assistance IA** (optionnel) : réduction du bruit, détection de motifs, explications en langage naturel
|
|
62
|
+
- **100 % local** : aucune dépendance cloud obligatoire
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install archiviz
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Requires Python >= 3.9
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Utilisation rapide
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Analyser le répertoire courant et ouvrir l'interface web
|
|
80
|
+
archiviz start
|
|
81
|
+
|
|
82
|
+
# Analyser un projet spécifique
|
|
83
|
+
archiviz start --repertoire /chemin/vers/projet
|
|
84
|
+
|
|
85
|
+
# Changer le port (défaut : 8000)
|
|
86
|
+
archiviz start --port 9000
|
|
87
|
+
|
|
88
|
+
# Activer l'assistance IA
|
|
89
|
+
archiviz start --ia
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Puis ouvrez [http://localhost:8000](http://localhost:8000) dans votre navigateur.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Options CLI
|
|
97
|
+
|
|
98
|
+
| Option | Court | Défaut | Description |
|
|
99
|
+
|--------|-------|--------|-------------|
|
|
100
|
+
| `--repertoire` | `-r` | `.` | Répertoire du projet à analyser |
|
|
101
|
+
| `--port` | `-p` | `8000` | Port du serveur web |
|
|
102
|
+
| `--hote` | `-H` | `localhost` | Hôte du serveur |
|
|
103
|
+
| `--ignore` | `-i` | — | Patterns à ignorer (séparés par virgule) |
|
|
104
|
+
| `--ia` | — | off | Activer l'assistance IA |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Utilisation programmatique
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from archiviz import ModeleGraphe, GestionnaireAnalyse
|
|
112
|
+
|
|
113
|
+
modele = ModeleGraphe()
|
|
114
|
+
gestionnaire = GestionnaireAnalyse(modele)
|
|
115
|
+
gestionnaire.analyser_repertoire("/chemin/vers/projet")
|
|
116
|
+
|
|
117
|
+
print(f"Composants : {len(modele.noeuds)}")
|
|
118
|
+
print(f"Relations : {len(modele.aretes)}")
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Architecture du package
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
archiviz/
|
|
127
|
+
├── analyseur/ Adaptateurs par langage (Python, JS, Java, Go, Rust, C#, SQL, Docker)
|
|
128
|
+
├── graphe/ Modèle de graphe unifié (noeuds, arêtes, cycles)
|
|
129
|
+
├── serveur/ Serveur FastAPI + WebSocket
|
|
130
|
+
├── interface_web/ Interface HTML/CSS/JS (vis-network)
|
|
131
|
+
├── surveillance/ Surveillance du système de fichiers (watchdog)
|
|
132
|
+
├── assistance_ia/ Intégration IA (OpenAI, Anthropic)
|
|
133
|
+
└── utils/ Gestion des erreurs
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Langages supportés
|
|
139
|
+
|
|
140
|
+
| Langage | Fichiers détectés | Éléments analysés |
|
|
141
|
+
|---------|-------------------|-------------------|
|
|
142
|
+
| Python | `.py` | modules, classes, fonctions, imports |
|
|
143
|
+
| JavaScript / TypeScript | `.js` `.ts` `.jsx` `.tsx` | modules, classes, fonctions, imports |
|
|
144
|
+
| Java | `.java` | packages, classes, interfaces, méthodes |
|
|
145
|
+
| Go | `.go` | packages, structs, fonctions |
|
|
146
|
+
| Rust | `.rs` | crates, modules, structs, fonctions |
|
|
147
|
+
| C# | `.cs` | namespaces, classes, interfaces, méthodes |
|
|
148
|
+
| SQL | `.sql` | tables, vues, procédures |
|
|
149
|
+
| Docker | `Dockerfile` `docker-compose.yml` | images, services, volumes |
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Dépendances optionnelles
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Outils de développement
|
|
157
|
+
pip install "archiviz[dev]"
|
|
158
|
+
|
|
159
|
+
# Assistance IA (OpenAI / Anthropic)
|
|
160
|
+
pip install "archiviz[ia]"
|
|
161
|
+
|
|
162
|
+
# Tout
|
|
163
|
+
pip install "archiviz[dev,ia]"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Développement
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Cloner et installer en mode édition
|
|
172
|
+
git clone https://github.com/archiviz/archiviz
|
|
173
|
+
cd archiviz
|
|
174
|
+
pip install -e ".[dev,ia]"
|
|
175
|
+
|
|
176
|
+
# Lancer les tests
|
|
177
|
+
pytest
|
|
178
|
+
|
|
179
|
+
# Linter
|
|
180
|
+
ruff check src/
|
|
181
|
+
|
|
182
|
+
# Formatage
|
|
183
|
+
black src/
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Documentation
|
|
189
|
+
|
|
190
|
+
- [Python](docs/langages/python.md)
|
|
191
|
+
- [JavaScript / TypeScript](docs/langages/javascript.md)
|
|
192
|
+
- [Java](docs/langages/java.md)
|
|
193
|
+
- [Go](docs/langages/go.md)
|
|
194
|
+
- [Rust](docs/langages/rust.md)
|
|
195
|
+
- [C#](docs/langages/csharp.md)
|
|
196
|
+
- [SQL](docs/langages/sql.md)
|
|
197
|
+
- [Docker](docs/langages/docker.md)
|
|
198
|
+
- [Analyse d'un projet Python](docs/exemples/analyse_projet_python.md)
|
|
199
|
+
- [Analyse d'un projet Fullstack](docs/exemples/analyse_projet_fullstack.md)
|
|
200
|
+
- [Utilisation de l'API programmatique](docs/exemples/utilisation_api.md)
|
|
201
|
+
- [Guide de publication PyPI](docs/publication_pypi.md)
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Licence
|
|
206
|
+
|
|
207
|
+
Proprietary — Copyright (c) 2026 Archiviz Team. Tous droits réservés.
|
archiviz-0.1.0/README.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Archiviz
|
|
2
|
+
|
|
3
|
+
> Visualisation interactive et en temps réel de l'architecture de projets logiciels multi-langages.
|
|
4
|
+
|
|
5
|
+
Archiviz analyse votre code source et génère un graphe interactif de son architecture — dépendances, couches, modules, classes, fonctions — accessible directement dans le navigateur.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Fonctionnalités
|
|
10
|
+
|
|
11
|
+
- **Analyse multi-langages** : Python, JavaScript/TypeScript, Java, Go, Rust, C#, SQL, Docker
|
|
12
|
+
- **Graphe interactif** : navigation, zoom, filtres par type et par langage, recherche
|
|
13
|
+
- **Temps réel** : mise à jour automatique du graphe dès qu'un fichier est modifié
|
|
14
|
+
- **Détection automatique** : couches architecturales, dépendances cycliques, points de fragilité
|
|
15
|
+
- **Assistance IA** (optionnel) : réduction du bruit, détection de motifs, explications en langage naturel
|
|
16
|
+
- **100 % local** : aucune dépendance cloud obligatoire
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install archiviz
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Requires Python >= 3.9
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Utilisation rapide
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Analyser le répertoire courant et ouvrir l'interface web
|
|
34
|
+
archiviz start
|
|
35
|
+
|
|
36
|
+
# Analyser un projet spécifique
|
|
37
|
+
archiviz start --repertoire /chemin/vers/projet
|
|
38
|
+
|
|
39
|
+
# Changer le port (défaut : 8000)
|
|
40
|
+
archiviz start --port 9000
|
|
41
|
+
|
|
42
|
+
# Activer l'assistance IA
|
|
43
|
+
archiviz start --ia
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Puis ouvrez [http://localhost:8000](http://localhost:8000) dans votre navigateur.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Options CLI
|
|
51
|
+
|
|
52
|
+
| Option | Court | Défaut | Description |
|
|
53
|
+
|--------|-------|--------|-------------|
|
|
54
|
+
| `--repertoire` | `-r` | `.` | Répertoire du projet à analyser |
|
|
55
|
+
| `--port` | `-p` | `8000` | Port du serveur web |
|
|
56
|
+
| `--hote` | `-H` | `localhost` | Hôte du serveur |
|
|
57
|
+
| `--ignore` | `-i` | — | Patterns à ignorer (séparés par virgule) |
|
|
58
|
+
| `--ia` | — | off | Activer l'assistance IA |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Utilisation programmatique
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from archiviz import ModeleGraphe, GestionnaireAnalyse
|
|
66
|
+
|
|
67
|
+
modele = ModeleGraphe()
|
|
68
|
+
gestionnaire = GestionnaireAnalyse(modele)
|
|
69
|
+
gestionnaire.analyser_repertoire("/chemin/vers/projet")
|
|
70
|
+
|
|
71
|
+
print(f"Composants : {len(modele.noeuds)}")
|
|
72
|
+
print(f"Relations : {len(modele.aretes)}")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Architecture du package
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
archiviz/
|
|
81
|
+
├── analyseur/ Adaptateurs par langage (Python, JS, Java, Go, Rust, C#, SQL, Docker)
|
|
82
|
+
├── graphe/ Modèle de graphe unifié (noeuds, arêtes, cycles)
|
|
83
|
+
├── serveur/ Serveur FastAPI + WebSocket
|
|
84
|
+
├── interface_web/ Interface HTML/CSS/JS (vis-network)
|
|
85
|
+
├── surveillance/ Surveillance du système de fichiers (watchdog)
|
|
86
|
+
├── assistance_ia/ Intégration IA (OpenAI, Anthropic)
|
|
87
|
+
└── utils/ Gestion des erreurs
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Langages supportés
|
|
93
|
+
|
|
94
|
+
| Langage | Fichiers détectés | Éléments analysés |
|
|
95
|
+
|---------|-------------------|-------------------|
|
|
96
|
+
| Python | `.py` | modules, classes, fonctions, imports |
|
|
97
|
+
| JavaScript / TypeScript | `.js` `.ts` `.jsx` `.tsx` | modules, classes, fonctions, imports |
|
|
98
|
+
| Java | `.java` | packages, classes, interfaces, méthodes |
|
|
99
|
+
| Go | `.go` | packages, structs, fonctions |
|
|
100
|
+
| Rust | `.rs` | crates, modules, structs, fonctions |
|
|
101
|
+
| C# | `.cs` | namespaces, classes, interfaces, méthodes |
|
|
102
|
+
| SQL | `.sql` | tables, vues, procédures |
|
|
103
|
+
| Docker | `Dockerfile` `docker-compose.yml` | images, services, volumes |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Dépendances optionnelles
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Outils de développement
|
|
111
|
+
pip install "archiviz[dev]"
|
|
112
|
+
|
|
113
|
+
# Assistance IA (OpenAI / Anthropic)
|
|
114
|
+
pip install "archiviz[ia]"
|
|
115
|
+
|
|
116
|
+
# Tout
|
|
117
|
+
pip install "archiviz[dev,ia]"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Développement
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Cloner et installer en mode édition
|
|
126
|
+
git clone https://github.com/archiviz/archiviz
|
|
127
|
+
cd archiviz
|
|
128
|
+
pip install -e ".[dev,ia]"
|
|
129
|
+
|
|
130
|
+
# Lancer les tests
|
|
131
|
+
pytest
|
|
132
|
+
|
|
133
|
+
# Linter
|
|
134
|
+
ruff check src/
|
|
135
|
+
|
|
136
|
+
# Formatage
|
|
137
|
+
black src/
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Documentation
|
|
143
|
+
|
|
144
|
+
- [Python](docs/langages/python.md)
|
|
145
|
+
- [JavaScript / TypeScript](docs/langages/javascript.md)
|
|
146
|
+
- [Java](docs/langages/java.md)
|
|
147
|
+
- [Go](docs/langages/go.md)
|
|
148
|
+
- [Rust](docs/langages/rust.md)
|
|
149
|
+
- [C#](docs/langages/csharp.md)
|
|
150
|
+
- [SQL](docs/langages/sql.md)
|
|
151
|
+
- [Docker](docs/langages/docker.md)
|
|
152
|
+
- [Analyse d'un projet Python](docs/exemples/analyse_projet_python.md)
|
|
153
|
+
- [Analyse d'un projet Fullstack](docs/exemples/analyse_projet_fullstack.md)
|
|
154
|
+
- [Utilisation de l'API programmatique](docs/exemples/utilisation_api.md)
|
|
155
|
+
- [Guide de publication PyPI](docs/publication_pypi.md)
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Licence
|
|
160
|
+
|
|
161
|
+
Proprietary — Copyright (c) 2026 Archiviz Team. Tous droits réservés.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Exemple : Analyse d'un projet Fullstack
|
|
2
|
+
|
|
3
|
+
Cet exemple montre comment analyser un projet fullstack avec frontend JavaScript et backend Python.
|
|
4
|
+
|
|
5
|
+
## Structure du projet
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
mon_projet_fullstack/
|
|
9
|
+
├── backend/
|
|
10
|
+
│ ├── app/
|
|
11
|
+
│ │ ├── __init__.py
|
|
12
|
+
│ │ ├── main.py
|
|
13
|
+
│ │ ├── models/
|
|
14
|
+
│ │ │ └── user.py
|
|
15
|
+
│ │ ├── services/
|
|
16
|
+
│ │ │ └── user_service.py
|
|
17
|
+
│ │ └── repositories/
|
|
18
|
+
│ │ └── user_repository.py
|
|
19
|
+
│ ├── requirements.txt
|
|
20
|
+
│ └── README.md
|
|
21
|
+
├── frontend/
|
|
22
|
+
│ ├── src/
|
|
23
|
+
│ │ ├── components/
|
|
24
|
+
│ │ │ ├── UserList.jsx
|
|
25
|
+
│ │ │ └── UserForm.jsx
|
|
26
|
+
│ │ ├── services/
|
|
27
|
+
│ │ │ └── api.js
|
|
28
|
+
│ │ ├── App.jsx
|
|
29
|
+
│ │ └── index.js
|
|
30
|
+
│ ├── package.json
|
|
31
|
+
│ └── README.md
|
|
32
|
+
└── docker-compose.yml
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Lancer l'analyse
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Naviguer vers le répertoire racine du projet
|
|
39
|
+
cd mon_projet_fullstack
|
|
40
|
+
|
|
41
|
+
# Lancer Archiviz
|
|
42
|
+
archiviz start
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Archiviz analysera automatiquement :
|
|
46
|
+
- Les fichiers Python du backend
|
|
47
|
+
- Les fichiers JavaScript/React du frontend
|
|
48
|
+
- Le fichier Docker Compose
|
|
49
|
+
- Les relations entre les composants
|
|
50
|
+
|
|
51
|
+
## Résultats attendus
|
|
52
|
+
|
|
53
|
+
### Statistiques
|
|
54
|
+
- **Composants** : ~30 (fichiers, modules, classes, fonctions, composants React)
|
|
55
|
+
- **Relations** : ~40 (imports, appels, dépendances)
|
|
56
|
+
- **Langages** : Python, JavaScript, Docker
|
|
57
|
+
|
|
58
|
+
### Couches détectées
|
|
59
|
+
- **Présentation** : Composants React (`UserList.jsx`, `UserForm.jsx`)
|
|
60
|
+
- **Application** : Services backend (`user_service.py`), API frontend (`api.js`)
|
|
61
|
+
- **Domaine** : Models backend (`user.py`)
|
|
62
|
+
- **Persistance** : Repositories backend (`user_repository.py`)
|
|
63
|
+
- **Infrastructure** : Docker Compose
|
|
64
|
+
|
|
65
|
+
### Relations détectées
|
|
66
|
+
- Frontend → Backend via API HTTP
|
|
67
|
+
- Backend → Base de données via repositories
|
|
68
|
+
- Composants React entre eux
|
|
69
|
+
- Services backend entre eux
|
|
70
|
+
|
|
71
|
+
## Exemple de code analysé
|
|
72
|
+
|
|
73
|
+
### Backend Python
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
# backend/app/main.py
|
|
77
|
+
from fastapi import FastAPI
|
|
78
|
+
from app.services.user_service import UserService
|
|
79
|
+
from app.repositories.user_repository import UserRepository
|
|
80
|
+
|
|
81
|
+
app = FastAPI()
|
|
82
|
+
|
|
83
|
+
@app.get("/api/users")
|
|
84
|
+
def get_users():
|
|
85
|
+
repository =UserRepository()
|
|
86
|
+
service = UserService(repository)
|
|
87
|
+
return service.get_all_users()
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Frontend JavaScript
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
// frontend/src/services/api.js
|
|
94
|
+
const API_BASE_URL = 'http://localhost:8000/api';
|
|
95
|
+
|
|
96
|
+
export async function getUsers() {
|
|
97
|
+
const response = await fetch(`${API_BASE_URL}/users`);
|
|
98
|
+
return response.json();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// frontend/src/components/UserList.jsx
|
|
102
|
+
import React, { useEffect, useState } from 'react';
|
|
103
|
+
import { getUsers } from '../services/api';
|
|
104
|
+
|
|
105
|
+
function UserList() {
|
|
106
|
+
const [users, setUsers] = useState([]);
|
|
107
|
+
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
getUsers().then(setUsers);
|
|
110
|
+
}, []);
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<div>
|
|
114
|
+
<h1>Utilisateurs</h1>
|
|
115
|
+
<ul>
|
|
116
|
+
{users.map(user => (
|
|
117
|
+
<li key={user.id}>{user.name}</li>
|
|
118
|
+
))}
|
|
119
|
+
</ul>
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export default UserList;
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Docker Compose
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
# docker-compose.yml
|
|
131
|
+
version: '3.8'
|
|
132
|
+
|
|
133
|
+
services:
|
|
134
|
+
backend:
|
|
135
|
+
build: ./backend
|
|
136
|
+
ports:
|
|
137
|
+
- "8000:8000"
|
|
138
|
+
depends_on:
|
|
139
|
+
- db
|
|
140
|
+
|
|
141
|
+
frontend:
|
|
142
|
+
build: ./frontend
|
|
143
|
+
ports:
|
|
144
|
+
- "3000:3000"
|
|
145
|
+
depends_on:
|
|
146
|
+
- backend
|
|
147
|
+
|
|
148
|
+
db:
|
|
149
|
+
image: postgres:13
|
|
150
|
+
environment:
|
|
151
|
+
POSTGRES_DB: mydb
|
|
152
|
+
POSTGRES_USER: user
|
|
153
|
+
POSTGRES_PASSWORD: password
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Visualisation
|
|
157
|
+
|
|
158
|
+
Dans l'interface web, vous verrez :
|
|
159
|
+
- Deux clusters principaux : backend et frontend
|
|
160
|
+
- Des connexions entre le frontend et le backend (API)
|
|
161
|
+
- Les conteneurs Docker et leurs dépendances
|
|
162
|
+
- Une coloration par langage (Python en bleu, JavaScript en jaune, Docker en cyan)
|
|
163
|
+
|
|
164
|
+
## Avec assistance IA
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
archiviz start --ia
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
L'IA détectera :
|
|
171
|
+
- L'architecture microservices (backend, frontend, db)
|
|
172
|
+
- Les appels HTTP entre frontend et backend
|
|
173
|
+
- Les dépendances de conteneurs Docker
|
|
174
|
+
- Les éventuels cycles de dépendances
|