133feff75d
6 chantiers v1 sur 7 livrés (DataTable refonte reportée car nécessite 2-3j en propre — TanStack Table + virtualisation + filter builder). v1-A — Tests (4 → 22 fichiers) : - Avatar, AvatarGroup, UserCard, MetricCard, ProfileHeader, Tooltip, Sheet, Drawer, Slider, ToggleGroup, Tabs, Pagination, Accordion, Switch, Badge, ConfirmDialog, Popover, Menu, Text, PricingCard, FeatureCard, Toast — chacun avec render + clavier + axe-core. v1-B — Storybook (7 → 23 fichiers) : - Avatar, UserCard, ProfileHeader, MetricCard, PricingCard, FeatureCard, Sheet (4 sides), HoverCard, Slider, ToggleGroup, Menu+ContextMenu, Toast (avec démo "Empiler 5"), Tabs, Pagination, Accordion, Badge. v1-D — Visual regression Playwright : - playwright.config.ts (light + dark, threshold strict 0.2) - e2e/visual.spec.ts (20 stories critiques) - Step CI + upload report en cas de fail v1-E — Site doc Starlight rempli : - 11 pages composants détaillées (Button, Input, Tooltip, Dialog, Toast, Avatar, ThemePicker, MetricCard, PricingCard, ToggleGroup, Slider) avec API, anatomie, do/don't, A11y. v1-F — Publishing Verdaccio : - verdaccio/config.yaml, docker-compose.verdaccio.yml, .npmrc - README setup local + déploiement prod + backups + sécurité v1-G — Gouvernance : - LICENSE, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md - CODEOWNERS, PR template, 3 issue templates (bug/feature/rfc) Bug fix bonus : tooltip dark mode (text-primary comme bg + text-inverse comme texte → blanc-sur-blanc invisible). Remplacé par neutral-900/0 en light + bg-raised/text-primary en dark. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
86 lines
2.3 KiB
Markdown
86 lines
2.3 KiB
Markdown
# Verdaccio — registre privé DSMMG
|
|
|
|
Verdaccio est utilisé pour publier les packages `@managemate/*` en
|
|
interne, sans exposition publique. Le registre tourne en local via
|
|
Docker Compose et peut être déployé sur l'infra ManageMate
|
|
(`npm.dinawo.fr` recommandé).
|
|
|
|
## Démarrer en local
|
|
|
|
```sh
|
|
docker compose -f docker-compose.verdaccio.yml up -d
|
|
open http://localhost:4873
|
|
```
|
|
|
|
## Premier compte (admin)
|
|
|
|
```sh
|
|
npm adduser --registry http://localhost:4873
|
|
# Username: admin
|
|
# Password: <fort>
|
|
# Email: dev@managemate.fr
|
|
```
|
|
|
|
Le htpasswd est stocké dans le volume `dsmmg-verdaccio-storage`.
|
|
|
|
## Publier les packages
|
|
|
|
À partir du root du monorepo, après un build complet :
|
|
|
|
```sh
|
|
pnpm build
|
|
pnpm changeset version # consume les changesets, bump versions
|
|
pnpm -r --filter "@managemate/*" publish --registry http://localhost:4873
|
|
```
|
|
|
|
Ou via le script raccourci :
|
|
|
|
```sh
|
|
pnpm release
|
|
```
|
|
|
|
## Déploiement production
|
|
|
|
Le `docker-compose.verdaccio.yml` est utilisable tel quel sur un host
|
|
docker. Recommandations production :
|
|
|
|
1. **Reverse proxy** (Caddy, Nginx, Traefik) avec **HTTPS** obligatoire.
|
|
Exemple Caddy :
|
|
|
|
```caddy
|
|
npm.dinawo.fr {
|
|
reverse_proxy localhost:4873
|
|
}
|
|
```
|
|
|
|
2. **Backups** réguliers du volume `dsmmg-verdaccio-storage` (contient
|
|
les tarballs publiés et le htpasswd). Cible : snapshot quotidien
|
|
conservé 30j.
|
|
|
|
3. **Rate limiting** sur le reverse proxy (~ 60 req/min/IP) pour éviter
|
|
le bruteforce sur le htpasswd.
|
|
|
|
4. **Auth supplémentaire** possible : intégration LDAP/SAML via
|
|
`verdaccio-ldap` ou `verdaccio-saml` plugins si l'org grandit.
|
|
|
|
5. **Monitoring** : `/_stats/heap` exposé par Verdaccio, à scraper
|
|
par Prometheus si infra existe.
|
|
|
|
## Sécurité
|
|
|
|
- `auth: htpasswd` uniquement par défaut. Pas d'inscription publique
|
|
(max_users: 50 limite).
|
|
- `@managemate/*` : `access: $authenticated` — seuls les users
|
|
authentifiés peuvent installer.
|
|
- Le proxy `uplinks.npmjs` permet de récupérer les deps publiques
|
|
(Radix, React, etc.) en passant par Verdaccio (cache).
|
|
|
|
## Migration vers npm public (futur)
|
|
|
|
Si le DSMMG devient open source un jour :
|
|
|
|
1. Renommer le scope `@managemate` → `@managemate-group` (ou autre)
|
|
sur npm public.
|
|
2. Publier sur https://registry.npmjs.org en `--access public`.
|
|
3. Garder Verdaccio en cache local pour la CI.
|