- Backend NestJS : CRUD api_entries + categories, upload YAML multi-fichiers, génération docs AsyncAPI (@asyncapi/cli@6.0.0) et OpenAPI (redocly) - Fix: route wildcard GET /api/apis/:id/*path pour servir les assets statiques (CSS/JS) générés par AsyncAPI HTML template (contournement bug path-to-regexp v8) - Frontend Angular 19 : pages catalog, browse, api-detail, doc-viewer, upload (DSFR) - Seeder de données de démo (idempotent) - Docker Compose dev + Dockerfiles + manifests K8s - Documentation : README, architecture, référence API REST Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
2.5 KiB
2.5 KiB
Datacat
Catalogue de données d'API. Importez des fichiers YAML (AsyncAPI ou OpenAPI) et générez automatiquement de la documentation HTML interactive.
Architecture
Monorepo pnpm avec quatre sous-projets :
datacat/
├── back/ # API REST — NestJS + TypeORM + PostgreSQL
├── front-public/ # Interface web — Angular 19 + DSFR
├── shared/ # Types TypeScript partagés (@datacat/shared)
└── infra/ # Docker Compose, Dockerfiles, Kubernetes
Prérequis
- Node.js 22 LTS
- pnpm 10
- Docker (recommandé)
Démarrage rapide
# Démarrer tous les services (PostgreSQL + backend + frontend)
docker compose -f infra/docker-compose.yml up -d
# Suivre les logs
docker compose -f infra/docker-compose.yml logs -f
URLs de développement
| Service | URL |
|---|---|
| Frontend | http://localhost:4200 |
| API | http://localhost:3010/api |
| Health check | http://localhost:3010/health |
Utilisation
- Ouvrir http://localhost:4200
- Naviguer par catégories via Parcourir ou voir toutes les APIs via Catalogue
- Cliquer sur Importer pour ajouter un fichier YAML AsyncAPI ou OpenAPI
- Une fois la génération terminée (statut GENERATED), cliquer sur Voir la documentation
Stack technique
| Couche | Technologie |
|---|---|
| Backend | NestJS 11, TypeORM 0.3, PostgreSQL 17 |
| Frontend | Angular 19, DSFR |
| Types partagés | TypeScript 5.8 strict |
| Génération docs AsyncAPI | @asyncapi/cli@6.0.0 |
| Génération docs OpenAPI | @redocly/cli |
Développement sans Docker
# Backend (port 3000)
cd back && pnpm install && pnpm run start:dev
# Frontend (port 4200, avec proxy vers l'API)
cd front-public && pnpm install && pnpm run start
Créer
front-public/proxy.conf.jsonsi absent :{ "/api": { "target": "http://localhost:3010", "secure": false } }
Rebuild complet
docker compose -f infra/docker-compose.yml down
docker volume rm datacat_front_node_modules datacat_back_node_modules
docker compose -f infra/docker-compose.yml build --no-cache
docker compose -f infra/docker-compose.yml up -d
Documentation
documentation/architecture.md— flux, schéma DB, servicesdocumentation/api-reference.md— référence complète des endpoints RESTdocumentation/CLAUDE.md— guide d'implémentation interne