From b713be161431729305701f80b3b6f53d2f07f62a Mon Sep 17 00:00:00 2001 From: ertopogo Date: Fri, 20 Feb 2026 19:36:00 +0100 Subject: Initial commit: schemas infrastructure Arauco avec serveur web --- .gitignore | 2 + Dockerfile | 13 + SCHEMA_CENTRAL.md | 154 ++++++ docker-compose.yml | 10 + macro/vue_ensemble.mmd | 87 ++++ micro/applications/korradi_stack.mmd | 87 ++++ micro/iam/keycloak_iam.mmd | 79 ++++ micro/reseau/topologie_reseau.mmd | 78 ++++ micro/vms/araucaria_host.mmd | 70 +++ micro/vms/chillka.mmd | 34 ++ micro/vms/huitral.mmd | 68 +++ micro/vms/lautaro.mmd | 32 ++ micro/vms/npagnun.mmd | 44 ++ server/package-lock.json | 878 +++++++++++++++++++++++++++++++++++ server/package.json | 15 + server/public/index.html | 515 ++++++++++++++++++++ server/server.js | 94 ++++ 17 files changed, 2260 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 SCHEMA_CENTRAL.md create mode 100644 docker-compose.yml create mode 100644 macro/vue_ensemble.mmd create mode 100644 micro/applications/korradi_stack.mmd create mode 100644 micro/iam/keycloak_iam.mmd create mode 100644 micro/reseau/topologie_reseau.mmd create mode 100644 micro/vms/araucaria_host.mmd create mode 100644 micro/vms/chillka.mmd create mode 100644 micro/vms/huitral.mmd create mode 100644 micro/vms/lautaro.mmd create mode 100644 micro/vms/npagnun.mmd create mode 100644 server/package-lock.json create mode 100644 server/package.json create mode 100644 server/public/index.html create mode 100644 server/server.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9319e16 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +server/node_modules/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d650945 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:20-alpine +WORKDIR /app + +COPY server/package*.json ./server/ +RUN cd server && npm ci --production + +COPY server/ ./server/ +COPY macro/ ./macro/ +COPY micro/ ./micro/ + +EXPOSE 3030 + +CMD ["node", "server/server.js"] diff --git a/SCHEMA_CENTRAL.md b/SCHEMA_CENTRAL.md new file mode 100644 index 0000000..0325774 --- /dev/null +++ b/SCHEMA_CENTRAL.md @@ -0,0 +1,154 @@ +# Schema Central - Infrastructure Araucaria + +> Derniere mise a jour : 2026-02-19 +> Domaine : arauco.online | Reseau : 192.168.99.0/24 + +## Vue d'ensemble + +```mermaid +flowchart TB + subgraph external ["Acces Externe"] + ddns["DDNS Namecheap
arauco.online"] + router["Routeur Swisscom
Gateway 192.168.99.1"] + end + + subgraph lan ["Reseau LAN 192.168.99.0/24"] + + subgraph araucaria ["araucaria - Hote KVM
eth0/br0: .50 | eth1: .51"] + dnsmasq["dnsmasq :53
DNS local"] + kvm["KVM / virsh
libvirt"] + ssh_host["SSH :1220"] + lvm["LVM vgarauco0
5.31 TB total"] + end + + subgraph chillka ["chillka - .55
2 vCPU | 2 GB RAM | 500 GB"] + gitea["Gitea :3000
git.arauco.online"] + samba["Samba :139/445"] + http_chillka["HTTP :80"] + end + + subgraph npagnun ["npagnun - .35
2 vCPU | 8 GB RAM | 200 GB"] + keycloak["Keycloak :8080/8443
keycloak.arauco.local"] + kc_mgmt["KC Management :9000"] + pg_kc["PostgreSQL 15
:5432 interne"] + end + + subgraph huitral ["huitral - .22
2 vCPU | 8 GB RAM | 300 GB"] + ha_h["Home Assistant
reseau host"] + medusa_be["Medusa Backend :9000"] + medusa_sf["Medusa Storefront :8000"] + redis_h["Redis :6379"] + vikunja_h["Vikunja :3456"] + pg_vik["PostgreSQL 16
:5432 interne"] + dertopogo["der-topogo :3000"] + nginx_test["nginx test :8080"] + end + + subgraph lautaro ["lautaro - .108 - Raspberry Pi
Non accessible"] + ha_l["Home Assistant :8123"] + end + + subgraph dormant ["Volumes LVM dormants"] + lemolemo["lemolemo .33
10 GB"] + toki["toki .44
10 GB"] + copihue["copihue .11"] + huinca["huinca .66
70 GB"] + kura["kura
5 GB"] + end + end + + ddns -->|"arauco.online"| router + router -->|"NAT 2222 -> :1220"| ssh_host + router --- lan + + kvm -->|"virsh / br0"| chillka + kvm -->|"virsh / br0"| npagnun + kvm -->|"virsh / br0"| huitral + lvm -.->|"vgarauco0-*"| dormant + + dnsmasq -.->|"DNS"| chillka + dnsmasq -.->|"DNS"| npagnun + dnsmasq -.->|"DNS"| huitral + dnsmasq -.->|"DNS"| lautaro + + keycloak -->|"JDBC"| pg_kc + medusa_be --> redis_h + vikunja_h --> pg_vik +``` + +--- + +## Index des schemas detailles + +### Reseau + +| Schema | Fichier | Description | +|--------|---------|-------------| +| Topologie reseau | [topologie_reseau.mmd](micro/reseau/topologie_reseau.mmd) | IPs, interfaces, DNS, routage, acces externe | + +### Machines virtuelles + +| Schema | Fichier | Description | +|--------|---------|-------------| +| araucaria (host) | [araucaria_host.mmd](micro/vms/araucaria_host.mmd) | Hote KVM, interfaces, LVM, services, VMs gerees | +| npagnun | [npagnun.mmd](micro/vms/npagnun.mmd) | Ubuntu 24.04, Keycloak + PostgreSQL (Docker) | +| huitral | [huitral.mmd](micro/vms/huitral.mmd) | Debian 12, Docker: Medusa, Vikunja, HA, der-topogo, nginx | +| chillka | [chillka.mmd](micro/vms/chillka.mmd) | Gitea, Samba, HTTP, SSH | +| lautaro | [lautaro.mmd](micro/vms/lautaro.mmd) | Raspberry Pi, Home Assistant (non accessible) | + +### IAM / Identite + +| Schema | Fichier | Description | +|--------|---------|-------------| +| Keycloak IAM | [keycloak_iam.mmd](micro/iam/keycloak_iam.mmd) | OIDC, realms, clients, RBAC, flux d'authentification | + +### Applications + +| Schema | Fichier | Description | +|--------|---------|-------------| +| Korradi.dev | [korradi_stack.mmd](micro/applications/korradi_stack.mmd) | Stack applicatif: Next.js, Fastify, Widget SDK, Traefik | + +--- + +## Visualisation web + +Le serveur local permet de naviguer et visualiser tous les schemas dans le navigateur : + +```bash +cd schemas/server +npm install +npm start +# -> http://localhost:3030 +``` + +--- + +## Ajouter un nouveau schema + +1. Creer un fichier `.mmd` dans le sous-dossier appropriate (`micro/vms/`, `micro/iam/`, etc.) +2. Le serveur web le detectera automatiquement (hot-reload) +3. Mettre a jour ce fichier `SCHEMA_CENTRAL.md` pour ajouter une entree dans l'index + +### Convention de nommage + +- `micro/vms/.mmd` pour une machine virtuelle +- `micro/reseau/.mmd` pour le reseau +- `micro/iam/.mmd` pour l'identite / acces +- `micro/applications/.mmd` pour une application + +--- + +## Donnees de reference + +| Machine | IP | RAM | Stockage LVM | Etat | +|---------|-----|-----|-------------|------| +| araucaria (host) | .50 (br0), .51 (eth1) | - | vgarauco0 5.31 TB | actif | +| chillka | .55 | 2 GB | 500 GB | running | +| npagnun | .35 | 8 GB | 200 GB (vol nudo) | running | +| huitral | .22 | 8 GB | 300 GB | running | +| lautaro | .108 | - | - | non accessible | +| lemolemo | .33 | - | 10 GB | dormant | +| toki | .44 | - | 10 GB | dormant | +| copihue | .11 | - | - | dormant | +| huinca | .66 | - | 70 GB | dormant | +| kura | - | - | 5 GB | dormant | diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9917c0f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + ugnen: + build: . + container_name: ugnen + ports: + - "80:3030" + volumes: + - ./macro:/app/macro + - ./micro:/app/micro + restart: unless-stopped diff --git a/macro/vue_ensemble.mmd b/macro/vue_ensemble.mmd new file mode 100644 index 0000000..99bda1f --- /dev/null +++ b/macro/vue_ensemble.mmd @@ -0,0 +1,87 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 60, 'subGraphTitleMargin': {'top': 10, 'bottom': 10}}, 'themeVariables': {'primaryColor': '#4a90d9', 'lineColor': '#5c6bc0'}}}%% +flowchart LR + subgraph external ["Acces Externe"] + direction TB + ddns["DDNS Namecheap
arauco.online"] + router["Routeur Swisscom
192.168.99.1"] + ddns --> router + end + + subgraph araucaria ["araucaria 192.168.99.50/.51 - Hote KVM"] + direction TB + dnsmasq["dnsmasq :53"] + kvm["KVM / virsh"] + ssh_host["SSH :1220"] + lvm["LVM 5.31 TB"] + end + + subgraph chillka ["chillka 192.168.99.55 - 2GB"] + direction TB + gitea["Gitea :3000"] + samba["Samba :139/445"] + http_c["HTTP :80"] + end + + subgraph npagnun ["npagnun 192.168.99.35 - 8GB"] + direction TB + keycloak["Keycloak
:8080 / :8443"] + kc_mgmt["KC Mgmt :9000"] + pg_kc["PostgreSQL 15
:5432 int"] + end + + subgraph huitral ["huitral 192.168.99.22 - 8GB"] + direction TB + ha_h["Home Assistant"] + medusa["Medusa
backend :9000
storefront :8000"] + redis_h["Redis :6379"] + vikunja_h["Vikunja :3456"] + pg_vik["PostgreSQL 16
:5432 int"] + dertopogo["der-topogo :3000"] + nginx_t["nginx :8080"] + end + + subgraph lautaro ["lautaro 192.168.99.108 RPi"] + ha_l["HA :8123
non accessible"] + end + + subgraph dormant ["LVM dormants"] + direction TB + d1["lemolemo .33 10GB"] + d2["toki .44 10GB"] + d3["copihue .11"] + d4["huinca .66 70GB"] + d5["kura 5GB"] + end + + router -->|"NAT
2222->1220"| ssh_host + kvm --> chillka + kvm --> npagnun + kvm --> huitral + lvm -.-> dormant + + dnsmasq -.->|"DNS"| chillka + dnsmasq -.->|"DNS"| npagnun + dnsmasq -.->|"DNS"| huitral + dnsmasq -.->|"DNS"| lautaro + + keycloak --> pg_kc + medusa --> redis_h + vikunja_h --> pg_vik + + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef svcStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef vmStyle fill:#3a1e5f,stroke:#8a6ad9,color:#c8b0f0 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef iamStyle fill:#4a1e3a,stroke:#d94a8a,color:#f0a8c8 + classDef extStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class ddns,router extStyle + class dnsmasq,ssh_host netStyle + class kvm,lvm svcStyle + class gitea,samba,http_c svcStyle + class keycloak,kc_mgmt iamStyle + class pg_kc,pg_vik storStyle + class ha_h,medusa,redis_h,vikunja_h,dertopogo,nginx_t svcStyle + class ha_l dormStyle + class d1,d2,d3,d4,d5 dormStyle diff --git a/micro/applications/korradi_stack.mmd b/micro/applications/korradi_stack.mmd new file mode 100644 index 0000000..bbdf355 --- /dev/null +++ b/micro/applications/korradi_stack.mmd @@ -0,0 +1,87 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart TB + subgraph infra ["Infrastructure - Docker / Traefik"] + traefik["Traefik
Reverse Proxy
SSL termination"] + compose["docker-compose.yml
infra/"] + end + + subgraph frontend ["Frontend - apps/portal"] + nextjs["Next.js 15
React 19 + TypeScript"] + r3f["React Three Fiber
Scenes 3D"] + tailwind["Tailwind CSS
+ Radix + shadcn/ui"] + zustand["Zustand
State management"] + tanstack["TanStack Query
Data fetching"] + intl["next-intl
i18n"] + end + + subgraph backend ["Backend - services/event-hub"] + fastify["Fastify
API REST + tRPC"] + socketio["Socket.IO
Temps reel / WebSocket"] + zod["Zod
Validation schemas"] + end + + subgraph sdk ["Packages - packages/widget-sdk"] + widget_sdk["Widget SDK
Embeds + iframes sandboxes"] + events["Systeme d evenements
postMessage"] + end + + subgraph identity ["Identite - IAM"] + keycloak["Keycloak
npagnun:8080
OIDC / JWT"] + end + + subgraph data ["Donnees (prevu)"] + postgres["PostgreSQL
Prisma ORM"] + redis["Redis
Cache + sessions"] + end + + subgraph monitoring ["Observabilite (prevu)"] + otel["OpenTelemetry"] + sentry["Sentry
Error tracking"] + posthog["PostHog
Analytics"] + end + + subgraph tooling ["Tooling"] + turbo["TurboRepo
Monorepo"] + pnpm["PNPM
Package manager"] + end + + traefik --> nextjs + traefik --> fastify + nextjs --> zustand + nextjs --> tanstack + nextjs --> r3f + nextjs --> tailwind + nextjs --> intl + tanstack -->|"API calls"| fastify + fastify --> socketio + fastify --> zod + fastify -->|"Prisma"| postgres + fastify --> redis + nextjs -->|"OIDC"| keycloak + fastify -->|"Token verify"| keycloak + widget_sdk --> events + widget_sdk -->|"iframe"| nextjs + turbo --> frontend + turbo --> backend + turbo --> sdk + + classDef infraStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef feStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef beStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef sdkStyle fill:#3a1e5f,stroke:#8a6ad9,color:#c8b0f0 + classDef iamStyle fill:#4a1e3a,stroke:#d94a8a,color:#f0a8c8 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + classDef toolStyle fill:#3a3a1e,stroke:#9a9a4a,color:#e0e0a8 + + class traefik,compose infraStyle + class nextjs,r3f,tailwind,zustand,tanstack,intl feStyle + class fastify,socketio,zod beStyle + class widget_sdk,events sdkStyle + class keycloak iamStyle + class postgres,redis storStyle + class otel,sentry,posthog dormStyle + class turbo,pnpm toolStyle + + style data stroke-dasharray: 5 5 + style monitoring stroke-dasharray: 5 5 diff --git a/micro/iam/keycloak_iam.mmd b/micro/iam/keycloak_iam.mmd new file mode 100644 index 0000000..ff7f0c7 --- /dev/null +++ b/micro/iam/keycloak_iam.mmd @@ -0,0 +1,79 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 60, 'rankSpacing': 60, 'padding': 20}}}%% +flowchart LR + + subgraph client ["Cote Client"] + direction TB + user_b["Navigateur
Utilisateur"] + bearer["Token JWT
dans le header"] + user_b --> bearer + end + + subgraph keycloak ["Keycloak - npagnun 192.168.99.35"] + direction TB + + subgraph endpoints ["Endpoints"] + direction LR + http[":8080 HTTP"] + https[":8443 HTTPS"] + health[":9000 Health"] + end + + subgraph config ["Configuration"] + direction LR + realms["Realms
master + custom"] + clients_kc["Clients OIDC
portal, event-hub"] + users["Users
& Groups"] + roles["Roles RBAC
& Permissions"] + end + + subgraph auth_flow ["Flux OIDC"] + direction LR + step1["1. /auth/realms/.../protocol/openid-connect/auth"] + step2["2. Login form + consent"] + step3["3. Callback avec code"] + step4["4. Exchange code -> tokens"] + step1 --> step2 --> step3 --> step4 + end + end + + subgraph db ["Base de donnees"] + postgres["PostgreSQL 15
:5432 Docker interne
DB: keycloak
User: keycloak"] + end + + subgraph applications ["Applications"] + direction TB + portal["Portal Korradi
Next.js"] + eventhub["Event Hub
Fastify"] + widget["Widget SDK"] + end + + subgraph model ["Modele de donnees"] + direction LR + org["Organisation"] --> sp["Spaces"] --> ctx["Contexts"] --> wdg["Widgets"] + end + + user_b -->|"Login request"| endpoints + step4 -->|"access_token
+ refresh_token"| user_b + bearer -->|"Authorization: Bearer ..."| applications + + keycloak --> postgres + + portal -->|"Token verify"| keycloak + eventhub -->|"Token verify"| keycloak + widget -->|"Token verify"| keycloak + + roles -.->|"RBAC / ABAC"| model + + classDef iamStyle fill:#4a1e3a,stroke:#d94a8a,color:#f0a8c8 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef appStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef userStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef modelStyle fill:#3a1e5f,stroke:#8a6ad9,color:#c8b0f0 + classDef flowStyle fill:#3a2a1e,stroke:#aa7a4a,color:#e8c8a0 + + class user_b,bearer userStyle + class http,https,health,realms,clients_kc,users,roles iamStyle + class step1,step2,step3,step4 flowStyle + class postgres storStyle + class portal,eventhub,widget appStyle + class org,sp,ctx,wdg modelStyle diff --git a/micro/reseau/topologie_reseau.mmd b/micro/reseau/topologie_reseau.mmd new file mode 100644 index 0000000..95d9364 --- /dev/null +++ b/micro/reseau/topologie_reseau.mmd @@ -0,0 +1,78 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60}}}%% +flowchart LR + subgraph internet ["Internet"] + direction TB + ddns["DDNS Namecheap
arauco.online
git.arauco.online
www.arauco.online"] + upstream["Forwarders DNS
8.8.8.8 / 8.8.4.4 / 1.1.1.1"] + end + + subgraph swisscom ["Routeur Swisscom"] + gw["Gateway 192.168.99.1"] + nat["NAT ext:2222
-> .51:1220"] + end + + subgraph host_if ["araucaria - Interfaces"] + direction TB + eth0["eth0 .50/24
master br0
00:25:90:e7:47:e4"] + eth1["eth1 .51/24
SSH externe
00:25:90:e7:47:e5"] + br0["br0 Bridge .50/24"] + virbr0["virbr0 .122.1/24
DOWN"] + eth0 --- br0 + end + + subgraph dns_conf ["dnsmasq Config"] + dns_svc[":53 sur br0
domain=local
cache=1000
log=/var/log/dnsmasq.log"] + end + + subgraph records ["Enregistrements DNS"] + direction TB + r_araucaria[".50 arauco.online
.50 www.arauco.online
.51 araucaria-eth1"] + r_chillka[".55 git.arauco.online
.55 chillka.local"] + r_npagnun[".35 npagnun.local
.35 keycloak.arauco.local"] + r_huitral[".22 huitral.local"] + r_other[".33 lemolemo | .44 toki
.11 copihue | .66 huinca"] + end + + subgraph ptr ["PTR Records"] + direction TB + ptr1["50.99.168.192
araucaria.local"] + ptr2["51.99.168.192
araucaria-eth1.local"] + end + + subgraph vm_if ["Interfaces VM br0"] + direction TB + vnet1["vnet1 chillka
52:54:00:0f:28:80"] + vnet7["vnet7 npagnun
52:54:00:5e:06:1e"] + vnet8["vnet8 huitral
52:54:00:ce:24:7f"] + end + + subgraph routes ["Routes"] + direction TB + rt1["default via .1 eth0"] + rt2["default via .1 eth1"] + rt3[".0/24 br0 src .50"] + rt4[".0/24 eth1 src .51"] + end + + ddns --> nat + nat -->|"2222->1220"| eth1 + upstream --> dns_svc + dns_svc --> records + dns_svc --> ptr + br0 --- vnet1 + br0 --- vnet7 + br0 --- vnet8 + + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef dnsStyle fill:#1e4a4a,stroke:#4a9a9a,color:#a8e0e0 + classDef extStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef routeStyle fill:#3a3a1e,stroke:#9a9a4a,color:#e0e0a8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class ddns,upstream,nat,gw extStyle + class eth0,br0,eth1 netStyle + class virbr0 dormStyle + class dns_svc,r_araucaria,r_chillka,r_npagnun,r_huitral,r_other dnsStyle + class ptr1,ptr2 dnsStyle + class vnet1,vnet7,vnet8 netStyle + class rt1,rt2,rt3,rt4 routeStyle diff --git a/micro/vms/araucaria_host.mmd b/micro/vms/araucaria_host.mmd new file mode 100644 index 0000000..2c9835d --- /dev/null +++ b/micro/vms/araucaria_host.mmd @@ -0,0 +1,70 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60}}}%% +flowchart TB + subgraph net ["Reseau"] + direction LR + eth0["eth0
192.168.99.50/24"] + br0["br0 Bridge
192.168.99.50/24"] + eth1["eth1
192.168.99.51/24"] + virbr0["virbr0
192.168.122.1/24
DOWN"] + eth0 -->|"master"| br0 + end + + subgraph svc ["Services actifs"] + direction LR + ssh["SSH :1220
ext 2222 via eth1"] + dnsmasq["dnsmasq :53
sur br0"] + kvm_svc["KVM / virsh"] + ddns_s["DDNS
/opt/ddns/"] + end + + subgraph machines ["Machines Virtuelles"] + direction LR + + subgraph vm_chillka ["chillka - ID:2 running"] + direction TB + vm_c_spec["2 vCPU | 2 GB RAM"] + vm_c_net["vnet1 br0
52:54:00:0f:28:80"] + vm_c_disk["vda: vgarauco0-chillka
500 GB"] + end + + subgraph vm_npagnun ["npagnun - ID:8 running"] + direction TB + vm_n_spec["2 vCPU | 8 GB RAM"] + vm_n_net["vnet7 br0
52:54:00:5e:06:1e"] + vm_n_disk["vda: vgarauco0-nudo
200 GB"] + end + + subgraph vm_huitral ["huitral - ID:9 running"] + direction TB + vm_h_spec["2 vCPU | 8 GB RAM"] + vm_h_net["vnet8 br0
52:54:00:ce:24:7f"] + vm_h_disk["vda: vgarauco0-huitral
300 GB"] + end + end + + subgraph storage ["LVM vgarauco0"] + direction LR + lv_info["5.31 TB total
4.24 TB libre"] + lv_actifs["Actifs:
chillka 500GB
huitral 300GB
nudo 200GB"] + lv_dormants["Dormants:
huinca 70GB
lemolemo 10GB
toki 10GB
kura 5GB"] + end + + kvm_svc --> machines + br0 --> vm_c_net + br0 --> vm_n_net + br0 --> vm_h_net + + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef svcStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef vmStyle fill:#3a1e5f,stroke:#8a6ad9,color:#c8b0f0 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class eth0,br0,eth1 netStyle + class virbr0 dormStyle + class ssh,dnsmasq,kvm_svc,ddns_s svcStyle + class vm_c_spec,vm_n_spec,vm_h_spec vmStyle + class vm_c_net,vm_n_net,vm_h_net netStyle + class vm_c_disk,vm_n_disk,vm_h_disk storStyle + class lv_info,lv_actifs storStyle + class lv_dormants dormStyle diff --git a/micro/vms/chillka.mmd b/micro/vms/chillka.mmd new file mode 100644 index 0000000..be24eb0 --- /dev/null +++ b/micro/vms/chillka.mmd @@ -0,0 +1,34 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart TB + subgraph vm ["chillka - 192.168.99.55
2 vCPU | 2 GB RAM
LVM: vgarauco0-chillka (500 GB) | User: toshiro"] + + subgraph services ["Services systeme"] + gitea["Gitea
Port: 3000
systemd: gitea.service
Depot: /var/data/git/repositories"] + ssh["SSH
Port: 22"] + samba["Samba (SMB)
Ports: 139, 445
Partage de fichiers"] + http["Serveur HTTP
Port: 80"] + end + + subgraph dns_local ["DNS local"] + resolved["systemd-resolved
127.0.0.53:53
127.0.0.54:53"] + end + end + + subgraph external ["Acces reseau"] + clients["Clients LAN
192.168.99.0/24"] + dns["DNS:
chillka.local -> .55
git.arauco.online -> .55"] + end + + clients -->|":3000 HTTP"| gitea + clients -->|":22 SSH"| ssh + clients -->|":139/:445 SMB"| samba + clients -->|":80 HTTP"| http + dns -.-> vm + + classDef svcStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef dnsStyle fill:#1e4a4a,stroke:#4a9a9a,color:#a8e0e0 + + class gitea,ssh,samba,http svcStyle + class clients netStyle + class dns,resolved dnsStyle diff --git a/micro/vms/huitral.mmd b/micro/vms/huitral.mmd new file mode 100644 index 0000000..466ccbd --- /dev/null +++ b/micro/vms/huitral.mmd @@ -0,0 +1,68 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart LR + subgraph medusa_net ["lucien-sens-bon"] + direction TB + medusa_be["medusa-backend
:9000"] + medusa_sf["medusa-storefront
:8000"] + redis["redis:alpine
:6379"] + medusa_be --> redis + end + + subgraph vikunja_net ["vikunja"] + direction TB + vikunja["vikunja
:3456"] + vikunja_db["postgres:16
:5432 int"] + vikunja --> vikunja_db + end + + subgraph topogo_net ["der-topogo"] + topogo["der-topogo-app
:3000"] + end + + subgraph test_net ["test-site"] + nginx["nginx:alpine
:8080->80"] + end + + subgraph host_net ["reseau host"] + ha["Home Assistant
stable"] + end + + subgraph volumes ["Volumes Docker"] + direction TB + v1["app_media"] + v2["caddy_config"] + v3["caddy_data"] + end + + subgraph info ["huitral .22 Debian12
2vCPU 8GB 300GB"] + direction TB + dns_info["DNS: huitral.local"] + end + + subgraph clients_g ["Clients LAN .0/24"] + clients["Navigateurs
Applications"] + end + + topogo --- v1 + topogo --- v2 + topogo --- v3 + + clients -->|":9000"| medusa_be + clients -->|":8000"| medusa_sf + clients -->|":6379"| redis + clients -->|":3456"| vikunja + clients -->|":3000"| topogo + clients -->|":8080"| nginx + clients -->|"host"| ha + + classDef svcStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef configStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef haStyle fill:#1e4a4a,stroke:#4a9a9a,color:#a8e0e0 + + class medusa_be,medusa_sf,vikunja,topogo,nginx svcStyle + class redis,vikunja_db storStyle + class v1,v2,v3 storStyle + class clients,dns_info netStyle + class ha haStyle diff --git a/micro/vms/lautaro.mmd b/micro/vms/lautaro.mmd new file mode 100644 index 0000000..525de49 --- /dev/null +++ b/micro/vms/lautaro.mmd @@ -0,0 +1,32 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart TB + subgraph rpi ["lautaro - 192.168.99.108
Raspberry Pi | Debian armv7l
NON ACCESSIBLE - Donnees documentees"] + + subgraph docker_env ["Docker Engine"] + ha["Home Assistant
Port: 8123
network_mode: host"] + end + + subgraph config ["Configuration"] + compose["~/homeassistant/
docker-compose.yml"] + ha_config["configuration.yaml
secrets.yaml"] + end + end + + subgraph external ["Acces reseau"] + clients["Clients LAN
192.168.99.0/24"] + end + + ha --- compose + ha --- ha_config + clients -->|":8123"| ha + + classDef haStyle fill:#1e4a4a,stroke:#4a9a9a,color:#a8e0e0 + classDef configStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class ha haStyle + class compose,ha_config configStyle + class clients netStyle + + style rpi stroke-dasharray: 5 5 diff --git a/micro/vms/npagnun.mmd b/micro/vms/npagnun.mmd new file mode 100644 index 0000000..2c0202c --- /dev/null +++ b/micro/vms/npagnun.mmd @@ -0,0 +1,44 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart LR + subgraph kc_net ["keycloak_keycloak-network 172.18.0.0/16"] + direction TB + keycloak["keycloak
quay.io/keycloak:latest
:8080 :8443 :9000"] + postgres["keycloak-postgres
postgres:15
:5432 interne
DB: keycloak"] + keycloak -->|"JDBC"| postgres + end + + subgraph bridge_net ["bridge 172.17.0.0/16"] + direction TB + hello1["goofy_napier
hello-world Exited"] + hello2["determined_volhard
hello-world Exited"] + end + + subgraph config ["Config npagnun"] + direction TB + compose["/opt/keycloak/
docker-compose.yml"] + iso["ISO ubuntu-24.04
monte sur sda"] + vm_info["npagnun .35
Ubuntu 24.04
2vCPU 8GB
LVM: nudo 200GB"] + end + + subgraph access ["Acces reseau"] + direction TB + dns["keycloak.arauco.local
npagnun.local
-> 192.168.99.35"] + clients["Clients LAN .0/24"] + end + + clients -->|":8080 HTTP"| keycloak + clients -->|":8443 HTTPS"| keycloak + clients -->|":9000 health"| keycloak + dns -.-> keycloak + + classDef iamStyle fill:#4a1e3a,stroke:#d94a8a,color:#f0a8c8 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef configStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class keycloak,kc_mgmt iamStyle + class postgres storStyle + class dns,clients netStyle + class compose,iso,vm_info configStyle + class hello1,hello2 dormStyle diff --git a/server/package-lock.json b/server/package-lock.json new file mode 100644 index 0000000..1add3e1 --- /dev/null +++ b/server/package-lock.json @@ -0,0 +1,878 @@ +{ + "name": "araucaria-schemas-viewer", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "araucaria-schemas-viewer", + "version": "1.0.0", + "dependencies": { + "chokidar": "^4.0.0", + "express": "^4.21.0", + "ws": "^8.18.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.14.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/finalhandler": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ws": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", + "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..4602371 --- /dev/null +++ b/server/package.json @@ -0,0 +1,15 @@ +{ + "name": "araucaria-schemas-viewer", + "version": "1.0.0", + "description": "Visualiseur de schemas Mermaid pour l'infrastructure Araucaria", + "main": "server.js", + "scripts": { + "start": "node server.js", + "dev": "node server.js" + }, + "dependencies": { + "express": "^4.21.0", + "chokidar": "^4.0.0", + "ws": "^8.18.0" + } +} diff --git a/server/public/index.html b/server/public/index.html new file mode 100644 index 0000000..c903ecf --- /dev/null +++ b/server/public/index.html @@ -0,0 +1,515 @@ + + + + + + Arauco - Schemas Infrastructure + + + + + + +
+ +
+
+
+

Selectionnez un schema dans la barre laterale

+
+
+
+ +
+ + + + + diff --git a/server/server.js b/server/server.js new file mode 100644 index 0000000..cc685d1 --- /dev/null +++ b/server/server.js @@ -0,0 +1,94 @@ +const express = require('express'); +const path = require('path'); +const fs = require('fs'); +const { WebSocketServer } = require('ws'); +const chokidar = require('chokidar'); + +const PORT = process.env.PORT || 3030; +const SCHEMAS_ROOT = path.resolve(__dirname, '..'); + +const app = express(); +app.use(express.static(path.join(__dirname, 'public'))); + +function scanSchemas() { + const schemas = []; + + function walk(dir, category) { + if (!fs.existsSync(dir)) return; + for (const file of fs.readdirSync(dir)) { + const fullPath = path.join(dir, file); + if (fs.statSync(fullPath).isDirectory()) { + walk(fullPath, file); + } else if (file.endsWith('.mmd')) { + const relativePath = path.relative(SCHEMAS_ROOT, fullPath).replace(/\\/g, '/'); + schemas.push({ + name: file.replace('.mmd', ''), + category: category || 'root', + path: relativePath, + fullPath + }); + } + } + } + + walk(path.join(SCHEMAS_ROOT, 'macro'), 'macro'); + walk(path.join(SCHEMAS_ROOT, 'micro'), null); + return schemas; +} + +app.get('/api/schemas', (req, res) => { + const schemas = scanSchemas(); + const grouped = {}; + for (const s of schemas) { + if (!grouped[s.category]) grouped[s.category] = []; + grouped[s.category].push({ name: s.name, path: s.path }); + } + res.json(grouped); +}); + +app.get('/api/schema/:encodedPath', (req, res) => { + const schemaPath = decodeURIComponent(req.params.encodedPath); + const fullPath = path.join(SCHEMAS_ROOT, schemaPath); + const resolved = path.resolve(fullPath); + + if (!resolved.startsWith(SCHEMAS_ROOT)) { + return res.status(403).json({ error: 'Acces interdit' }); + } + if (!fs.existsSync(resolved)) { + return res.status(404).json({ error: 'Schema introuvable' }); + } + + const content = fs.readFileSync(resolved, 'utf-8'); + res.json({ path: schemaPath, content }); +}); + +const server = app.listen(PORT, () => { + console.log(`\n Araucaria Schemas Viewer`); + console.log(` -> http://localhost:${PORT}\n`); + console.log(` Schemas root: ${SCHEMAS_ROOT}`); + console.log(` Watching for .mmd changes...\n`); +}); + +const wss = new WebSocketServer({ server }); + +const watcher = chokidar.watch( + [path.join(SCHEMAS_ROOT, 'macro'), path.join(SCHEMAS_ROOT, 'micro')], + { ignoreInitial: true, persistent: true } +); + +watcher.on('all', (event, filePath) => { + if (!filePath.endsWith('.mmd')) return; + const relativePath = path.relative(SCHEMAS_ROOT, filePath).replace(/\\/g, '/'); + console.log(` [${event}] ${relativePath}`); + + const message = JSON.stringify({ type: 'reload', event, path: relativePath }); + for (const client of wss.clients) { + if (client.readyState === 1) client.send(message); + } +}); + +process.on('SIGINT', () => { + watcher.close(); + server.close(); + process.exit(0); +}); -- cgit v1.2.3