[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'head -80 /opt/ligbox-spec-hub/repos/ligbox-ops-platform/docs/vms/README.md; echo "==="; head -50 /opt/ligbox-spec-hub/repos/ligbox-ops-platform/README.md; echo "==="; ls /opt/ligbox-spec-hub/repos/ligbox-ops-platform/app/; ls /opt/ligbox-spec-hub/repos/ligbox-ops-platform/app/modules/ 2>/dev/null | head -20'

Read VM inventory and app module structure

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'for vm in VM112 VM122 VM123; do echo "=== $vm ==="; grep -E "^##|^\- \*\*Spec|specs/" /opt/ligbox-spec-hub/repos/ligbox-ops-platform/docs/vms/${vm}.md 2>/dev/null | head -25; done'

Read spec assignments per VM doc


[REDACTED]

Shell

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'grep -r "monorepo\|multi-repo\|separar\|wizard\|finance" /opt/ligbox-spec-hub/repos/ligbox-ops-platform/specs/031-spec-hub-portal/ 2>/dev/null | head -15; ls /opt/ligbox-spec-hub/repos/ligbox-ops-platform/specs/031-spec-hub-portal/ 2>/dev/null'

Check spec 031 for repo structure guidance


[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'head -60 /opt/ligbox-spec-hub/repos/ligbox-ops-platform/specs/031-spec-hub-portal/spec.md'

Read spec 031 intro for hub architecture


Roger, **não é obrigatório separar em 3 repositórios Git agora** — mas **sim, faz sentido separar logicamente** Wizard, OPS e Financeiro **dentro** do `ligbox-ops-platform`.

## Situação actual

Hoje já existe separação **por VM**, mas tudo vive no **mesmo monorepo**:

| Domínio | VM | O que está no repo |
|---------|-----|-------------------|
| **Wizard** | VM112 | `deploy/vm112-*`, specs 001/017/022/025/026 |
| **OPS Desk** | VM122 | `api/`, `app/`, `worker/`, `frontend/`, specs 003–015/027 |
| **Financeiro** | VM123 | `deploy/vm123-*`, `app/vm123/`, specs 019/023/024 |

O `deploy/manifest.yaml` já define **o que cada VM recebe** — isso é a fronteira de deploy, não o nome da pasta Git.

---

## Recomendação: monorepo + 3 “projectos” lógicos

**Manter 1 repo** (`ligbox-ops-platform`) como fonte de verdade no CT130, e organizar assim:

```
ligbox-ops-platform/
├── specs/              # todas as specs (Spec Kit)
├── contracts/          # contratos partilhados (API, eventos)
├── projects/
│   ├── wizard/         # VM112 — onboard, Carbonio, purge
│   ├── ops-desk/       # VM122 — API, worker, UI desk
│   └── finance/        # VM123 — FOSSBilling, Odoo, console
├── deploy/
│   ├── vm112-*/
│   ├── vm122-*/
│   └── vm123-*/
└── docs/vms/           # ficha por VM (já existe)
```

**Porquê não 3 repos Git já?**

1. **Specs cruzam VMs** — ex.: spec 010 (desk-assist) liga VM112 ↔ VM122; spec 027 (RBAC) cobre VM122 e VM123.
2. **Contratos partilhados** — auth, webhooks, eventos entre Wizard → Desk → Finance.
3. **Menos drift** — foi o rsync entre pastas que causou confusão; mais repos = mais sync para gerir.
4. **Spec Kit + portal** — funciona melhor com um sítio central (CT130).

---

## Quando separar em repos Git distintos

Só vale a pena criar `ligbox-wizard`, `ligbox-ops-desk`, `ligbox-finance` quando:

- equipas **diferentes** com permissões distintas no Forgejo;
- **ciclos de release** independentes (Wizard mensal, OPS semanal…);
- VMs a fazer clone **só do que precisam** (repo grande demais).

Nesse caso, o modelo seria:

| Repo | Conteúdo |
|------|----------|
| `ligbox-contracts` | OpenAPI, eventos, schemas partilhados |
| `ligbox-wizard` | VM112 |
| `ligbox-ops-desk` | VM122 |
| `ligbox-finance` | VM123 |
| `ligbox-ops-platform` (meta) | specs + docs + manifest de versões |

Isso é **fase 2** — mais complexo, mas possível.

---

## O que falta hoje (mesmo no monorepo)

1. **`projects/`** — hoje o código OPS está na raiz (`app/`, `api/`) e parece “só VM122”.
2. **README por domínio** — Wizard / OPS / Finance com mapa de specs + deploy.
3. **`manifest.yaml` por path** — cada VM a puxar só a pasta certa (já parcialmente feito).
4. **Portal/Git** — menu por VM (já existe em `/specs/` e `/laptop/`).

---

## Resposta directa

| Pergunta | Resposta |
|----------|----------|
| Precisamos separar Wizard / OPS / Financeiro? | **Logicamente sim**, fisicamente em pastas/projectos |
| Precisamos de 3 repos Git? | **Não agora** — monorepo + manifest é suficiente |
| O que evita confusão? | `projects/wizard`, `projects/ops-desk`, `projects/finance` + `docs/vms/` |

Quer que eu **reorganize o repo** com a pasta `projects/` e actualize o portal + `manifest.yaml`? Posso fazer isso no CT130 e commitar no Forgejo.

[REDACTED]


<user_query>
reorganize . eu entedei o que vc quis explica tbm, cvoncordo que as Specs cobrem Vm diferentes
</user_query>


Reorganizando o monorepo com `projects/wizard`, `projects/ops-desk` e `projects/finance`, mantendo `specs/` na raiz.

[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'find /opt/ligbox-spec-hub/repos/ligbox-ops-platform -maxdepth 3 -type d | grep -vE "\.git|__pycache__|node_modules" | sort'

Full directory tree depth 3 on CT130 repo

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'cat /opt/ligbox-spec-hub/repos/ligbox-ops-platform/deploy/manifest.yaml; echo "==="; ls -la /opt/ligbox-spec-hub/repos/ligbox-ops-platform/deploy/vm112-spec022/ /opt/ligbox-spec-hub/repos/ligbox-ops-platform/deploy/vm123-finance-stack/ 2>/dev/null | head -30'

Read manifest and deploy folder contents


[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'diff -rq /opt/ligbox-spec-hub/repos/ligbox-ops-platform/app /opt/ligbox-spec-hub/repos/ligbox-ops-platform/api/app 2>/dev/null | head -20; echo "---"; cat /opt/ligbox-spec-hub/repos/ligbox-ops-platform/docker-compose.mvp.yml 2>/dev/null | head -40'

Compare app vs api/app and docker-compose paths

TodoWrite

Criar script de reorganização projects/ no CT130

Mover código/deploy para wizard, ops-desk, finance

Atualizar manifest, READMEs, docs/vms

Atualizar geradores portal /laptop e /specs

Commit e push no Forgejo


[REDACTED]

Shell

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'ls -la /opt/ligbox-spec-hub/repos/ligbox-ops-platform/*.yml /opt/ligbox-spec-hub/repos/ligbox-ops-platform/Dockerfile 2>/dev/null; ls /opt/ligbox-spec-hub/repos/ligbox-ops-platform/api/; ls /opt/ligbox-spec-hub/repos/ligbox-ops-platform/api/app/vm123/ 2>/dev/null | head -5'

Check root docker files and vm123 module


Criando e executando o script de reorganização no CT130.

[REDACTED]

Write

#!/bin/bash
# Reorganiza ligbox-ops-platform: projects/wizard | ops-desk | finance
set -euo pipefail
REPO=/opt/ligbox-spec-hub/repos/ligbox-ops-platform
cd "$REPO"

echo "=== Criar estrutura projects/ ==="
mkdir -p projects/wizard/deploy
mkdir -p projects/ops-desk
mkdir -p projects/finance/deploy
mkdir -p projects/finance/app
mkdir -p projects/integrations

echo "=== Wizard (VM112) ==="
git mv deploy/vm112-spec022 projects/wizard/deploy/ 2>/dev/null || mv deploy/vm112-spec022 projects/wizard/deploy/
git mv deploy/vm112-wizard-security projects/wizard/deploy/ 2>/dev/null || mv deploy/vm112-wizard-security projects/wizard/deploy/

echo "=== Finance (VM123) ==="
git mv deploy/vm123-finance-stack projects/finance/deploy/ 2>/dev/null || mv deploy/vm123-finance-stack projects/finance/deploy/
git mv deploy/vm122-fossbilling projects/finance/deploy/ 2>/dev/null || mv deploy/vm122-fossbilling projects/finance/deploy/
if [ -d api/app/vm123 ]; then
  git mv api/app/vm123 projects/finance/app/vm123 2>/dev/null || mv api/app/vm123 projects/finance/app/
fi

echo "=== Ops Desk (VM122) ==="
for item in api worker frontend assets tests docker-compose.mvp.yml; do
  if [ -e "$item" ] && [ ! -L "$item" ]; then
    git mv "$item" projects/ops-desk/ 2>/dev/null || mv "$item" projects/ops-desk/
  fi
done
if [ -d app ] && [ ! -L app ]; then
  git mv app projects/ops-desk/legacy-app 2>/dev/null || mv app projects/ops-desk/legacy-app
fi

echo "=== Integrations (VM104) ==="
if [ -d integrations/wazuh ]; then
  git mv integrations/wazuh projects/integrations/wazuh 2>/dev/null || mv integrations/wazuh projects/integrations/wazuh
  rmdir integrations 2>/dev/null || true
fi

echo "=== Symlinks retrocompat VM122 ==="
ln -sfn projects/ops-desk/api api
ln -sfn projects/ops-desk/worker worker
ln -sfn projects/ops-desk/frontend frontend
ln -sfn projects/ops-desk/docker-compose.mvp.yml docker-compose.mvp.yml

echo "=== Symlinks retrocompat deploy ==="
ln -sfn ../projects/wizard/deploy/vm112-spec022 deploy/vm112-spec022
ln -sfn ../projects/wizard/deploy/vm112-wizard-security deploy/vm112-wizard-security
ln -sfn ../projects/finance/deploy/vm123-finance-stack deploy/vm123-finance-stack
ln -sfn ../projects/finance/deploy/vm122-fossbilling deploy/vm122-fossbilling

echo "=== Done. Tree projects/: ==="
find projects -maxdepth 3 -type d | sort


[REDACTED]

# Projects — Ligbox Ops Platform

Monorepo organizado por **domínio de negócio**. As **specs** ficam na raiz (`specs/`) porque muitas cruzam VMs.

## Estrutura

| Projecto | VM | Pasta | Papel |
|----------|-----|-------|-------|
| **Wizard** | VM112 | `projects/wizard/` | Onboard, Carbonio, purge, domínios |
| **Ops Desk** | VM122 | `projects/ops-desk/` | API, worker, frontend MVP, RBAC |
| **Finance** | VM123 | `projects/finance/` | FOSSBilling, Odoo, OpenPanel, console |
| **Integrations** | VM104 | `projects/integrations/` | Wazuh SIEM |

## Specs (raiz — partilhadas)

```
specs/001-031/     # Spec Kit — podem referir VM112 + VM122 + VM123
contracts/         # OpenAPI, eventos partilhados
docs/vms/          # Ficha por VM
deploy/manifest.yaml  # O que cada VM faz pull/deploy
```

## Deploy por VM

Ver `deploy/manifest.yaml` — cada VM recebe apenas os paths do seu projecto.

## Retrocompatibilidade

Symlinks na raiz (`api`, `worker`, `frontend`, `deploy/vm*`) apontam para `projects/` — VMs antigas continuam a funcionar até actualizarem scripts.

# Wizard — VM112 (Onboard / Mail)

**IP:** `10.10.10.112` · SSH WAN `:2512`

## Conteúdo

```
deploy/
  vm112-spec022/          # Scripts Carbonio (admin, delete account)
  vm112-wizard-security/  # Segurança wizard
```

## Specs relacionadas (raiz `specs/`)

| Spec | Nome |
|------|------|
| 001 | webhook-vm112-integration |
| 017 | vm112-domain-orchestration |
| 022 | carbonio-account-exists-release |
| 025 | wizard-onboarding-continuity |
| 026 | purge-traefik-validation |
| 010 | desk-assist-takeover (fases VM112) |

## Integração

A **Ops Desk API** (`projects/ops-desk/`) orquestra VM112 via módulos `vm112_*` — não duplicar lógica aqui.

→ [Ficha VM112](../../docs/vms/VM112.md)

# Ops Desk — VM122 (Motor de Operações)

**IP:** `10.10.10.122` · SSH WAN `:2522` · Deploy: `/opt/ligbox-ops-platform`

## Conteúdo

```
api/                  # FastAPI — serviço principal
worker/               # Jobs async (audit, leads, onboard)
frontend/             # UI MVP desk
assets/               # Ícones, estáticos
tests/                # Testes API
docker-compose.mvp.yml
legacy-app/           # Cópia histórica app/ (canónico: api/app/)
```

## Specs relacionadas (raiz `specs/`)

| Spec | Nome |
|------|------|
| 003 | desk-auth-rbac |
| 004 | desk-account-management |
| 009 | ops-audit-overview |
| 010 | desk-assist-takeover |
| 012 | abandoned-onboarding-lead |
| 015 | desk-module-registry |
| 027 | desk-rbac-function-matrix |

## Arrancar (VM122)

```bash
cd /opt/ligbox-ops-platform   # ou projects/ops-desk no hub
docker compose -f docker-compose.mvp.yml up -d
```

→ [Ficha VM122](../../docs/vms/VM122.md)

# Finance — VM123 (FOSSBilling / Odoo / OpenPanel)

**IP:** `10.10.10.123` · SSH WAN `:2523`

## Conteúdo

```
deploy/
  vm123-finance-stack/    # Docker stack, bootstrap, OpenPanel bridge
  vm122-fossbilling/      # Integração FOSS (legado path)
app/
  vm123/                  # Clientes Odoo, FOSS, OpenPanel, provision
```

## Console UI

Deploy separado em `specs/019-ops-console-active-operations/deploy/` → `/opt/ligbox-ops-console`

## Specs relacionadas (raiz `specs/`)

| Spec | Nome |
|------|------|
| 019 | ops-console-active-operations |
| 023 | billing-recurrence-desk-visibility |
| 024 | openpanel-fossbilling |

## Bootstrap (VM123)

```bash
cd projects/finance/deploy/vm123-finance-stack
./bootstrap-vm123.sh
```

→ [Ficha VM123](../../docs/vms/VM123.md)

# Deploy manifest — Ligbox Ops Platform
# Fonte: CT130 Forgejo · git pull por VM

vm112:
  tag: main
  description: Wizard onboard + Carbonio mail
  project: projects/wizard
  paths:
    - projects/wizard/deploy/vm112-spec022
    - projects/wizard/deploy/vm112-wizard-security
  deploy_to:
    - /opt/ligbox-wizard-scripts

vm122:
  tag: main
  description: Ops Desk API + worker + frontend
  project: projects/ops-desk
  paths:
    - projects/ops-desk
  deploy_to: /opt/ligbox-ops-platform
  hub_mirror: /opt/ligbox-spec-hub/repos/ligbox-ops-platform/projects/ops-desk
  note: Symlinks api/worker/frontend na raiz do repo apontam para projects/ops-desk/

vm123:
  tag: main
  description: Finance stack + console
  project: projects/finance
  paths:
    - projects/finance/deploy/vm123-finance-stack
    - projects/finance/app/vm123
    - specs/019-ops-console-active-operations/deploy
  deploy_to:
    - /opt/vm123-finance-stack
    - /opt/ligbox-ops-console

vm104:
  tag: main
  description: Wazuh SIEM integration
  project: projects/integrations
  paths:
    - projects/integrations/wazuh
  deploy_to: /opt/wazuh-integration

ct130:
  tag: main
  description: Spec Hub Git + Portal
  paths:
    - .
  deploy_to: /opt/ligbox-spec-hub


[REDACTED]


[REDACTED]

StrReplace

SECTIONS = [
    ("C: LAPTOP — Arquivo", ["LAPTOP"]),
    ("Projectos", ["projects"]),
    ("Documentos", ["docs", "chat-bruto", ".specify"]),
    ("Specs (partilhadas)", ["specs"]),
    ("Deploy", ["deploy"]),
    ("Raiz", ["README.md", "BACKLOG.md", "contracts", "scripts", "activate.html"]),
]

SECTIONS = [
    ("C: LAPTOP — Arquivo", ["LAPTOP"]),
    ("Documentos", ["docs", "chat-bruto", ".specify"]),
    ("Specs", ["specs"]),
    ("Código — app", ["app", "api", "worker", "frontend"]),
    ("Deploy & Scripts", ["deploy", "scripts", "integrations"]),
    ("Raiz", ["README.md", "BACKLOG.md", "Dockerfile", "docker-compose.mvp.yml",
              "activate.html", "contracts", "tests"]),
]


[REDACTED]

'        ',
        '          💻 Projectos & Código',
        '
',
        '
Browse completo /laptop/
',
        '
Git Forgejo
',
        '
projects/ — mapa
',
        '
Wizard VM112
',
        '
projects/wizard/
',
        '
Ops Desk VM122
',
        '
projects/ops-desk/
',
        '
Finance VM123
',
        '
projects/finance/
',
        '
Deploy
',
        '
manifest.yaml
',
        '
Rede Proxmox
',
        '
chat-bruto/
',

'        ',
        '          💻 Código (monorepo)',
        '
',
        '
Git — ligbox-ops-platform
',
        '
README.md
',
        '
BACKLOG.md
',
        '
app/
',
        '
Rede Proxmox
',
        '
deploy/
',
        '
manifest.yaml
',
        '
chat-bruto/
',


[REDACTED]

Shell

scp -o StrictHostKeyChecking=no /tmp/ligbox-portal/reorganize-projects.sh /tmp/ligbox-portal/projects-README.md /tmp/ligbox-portal/wizard-README.md /tmp/ligbox-portal/ops-desk-README.md /tmp/ligbox-portal/finance-README.md /tmp/ligbox-portal/manifest.yaml /tmp/ligbox-portal/generate-laptop-portal.py /tmp/ligbox-portal/generate-specs-portal.py root@10.10.10.130:/tmp/reorg/

Upload reorg files to CT130


[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'bash /tmp/reorg/reorganize-projects.sh'

Execute repo reorganization on CT130


[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'REPO=/opt/ligbox-spec-hub/repos/ligbox-ops-platform
cp /tmp/reorg/projects-README.md $REPO/projects/README.md
cp /tmp/reorg/wizard-README.md $REPO/projects/wizard/README.md
cp /tmp/reorg/ops-desk-README.md $REPO/projects/ops-desk/README.md
cp /tmp/reorg/finance-README.md $REPO/projects/finance/README.md
cp /tmp/reorg/manifest.yaml $REPO/deploy/manifest.yaml
cp /tmp/reorg/generate-laptop-portal.py /opt/ligbox-spec-hub/portal/
cp /tmp/reorg/generate-specs-portal.py /opt/ligbox-spec-hub/portal/
ls -la $REPO/api $REPO/deploy/vm112-spec022 $REPO/projects/ops-desk/api | head -5
'

Install READMEs, manifest, portal generators


[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'python3 << "PY"
from pathlib import Path
repo = Path("/opt/ligbox-spec-hub/repos/ligbox-ops-platform")

# Update docs/vms/README.md deploy column
p = repo / "docs/vms/README.md"
text = p.read_text()
text = text.replace("| **112** | 10.10.10.112 | :2512 | Wizard onboard + Carbonio mail | `deploy/vm112-*` |",
    "| **112** | 10.10.10.112 | :2512 | Wizard onboard + Carbonio mail | `projects/wizard/` |")
text = text.replace("| **122** | 10.10.10.122 | :2522 | Ops Desk API + worker + UI MVP | `api/` `frontend/` `worker/` |",
    "| **122** | 10.10.10.122 | :2522 | Ops Desk API + worker + UI MVP | `projects/ops-desk/` |")
text = text.replace("| **123** | 10.10.10.123 | :2523 | FOSSBilling + Odoo + OpenPanel + Console UI | `deploy/vm123-*` |",
    "| **123** | 10.10.10.123 | :2523 | FOSSBilling + Odoo + OpenPanel + Console UI | `projects/finance/` |")
if "projects/" not in text.split("Mapa rápido")[0]:
    insert = """
## Estrutura do monorepo

```
ligbox-ops-platform/
├── specs/              # Spec Kit — cruzam VMs
├── contracts/          # API/eventos partilhados
├── projects/
│   ├── wizard/         # VM112
│   ├── ops-desk/       # VM122
│   ├── finance/        # VM123
│   └── integrations/   # VM104 Wazuh
├── deploy/manifest.yaml
└── docs/vms/
```

"""
    text = text.replace("---\n\n## Mapa rápido", insert + "## Mapa rápido", 1)
p.write_text(text)

# Update root README intro
r = repo / "README.md"
rt = r.read_text()
if "projects/" not in rt:
    block = """
## Estrutura do monorepo

| Projecto | VM | Pasta |
|----------|-----|-------|
| Wizard | VM112 | `projects/wizard/` |
| Ops Desk | VM122 | `projects/ops-desk/` |
| Finance | VM123 | `projects/finance/` |
| Integrations | VM104 | `projects/integrations/` |

**Specs** ficam em `specs/` (raiz) — muitas cruzam VMs. Ver `projects/README.md` e `deploy/manifest.yaml`.

"""
    rt = rt.replace("---\n\n## Início rápido Spec Kit", block + "---\n\n## Início rápido Spec Kit", 1)
    rt = rt.replace("Deploy em `/opt/ligbox-ops-platform/`:", "Deploy em `/opt/ligbox-ops-platform/` (conteúdo = `projects/ops-desk/` no Git):")
    r.write_text(rt)
print("docs updated")
PY
python3 /opt/ligbox-spec-hub/portal/generate-laptop-portal.py
python3 /opt/ligbox-spec-hub/portal/generate-specs-portal.py
docker restart spec-portal'

Update docs, regenerate portal, restart nginx


[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'cd /opt/ligbox-spec-hub/repos/ligbox-ops-platform && git status -sb | head -40 && git remote -v'

Check git status and remotes before commit


[REDACTED]

ssh -o StrictHostKeyChecking=no root@10.10.10.130 'cd /opt/ligbox-spec-hub/repos/ligbox-ops-platform && git add -A && git status -sb | tail -20 && git commit -m "$(cat <<'\''EOF'\''
Reorganize monorepo into projects/wizard, ops-desk, finance

Specs stay at repo root (cross-VM). Move deploy and code into logical
projects with README per domain, updated manifest.yaml, and symlinks at
legacy paths for VM122 backward compatibility.
EOF
)" && git push origin main'

Commit and push reorganization to Forgejo


[REDACTED]

curl -sk -o /dev/null -w "projects README: %{http_code}\n" "https://spec.ligbox.com.br/laptop/files/projects/README.md" && curl -sk "https://git.spec.ligbox.com.br/ligbox/ligbox-ops-platform/src/branch/main/projects" -o /dev/null -w "git projects: %{http_code}\n"

Verify projects visible on portal and Git


Roger, **reorganização concluída** e já está no Git Forgejo (commit `821675a`).

## Nova estrutura

```
ligbox-ops-platform/
├── specs/                    ← raiz (cruzam VMs — como concordámos)
├── contracts/
├── docs/vms/
├── deploy/manifest.yaml      ← actualizado por VM
└── projects/
    ├── wizard/               ← VM112 onboard/mail
    ├── ops-desk/             ← VM122 API + worker + frontend
    ├── finance/              ← VM123 FOSS/Odoo/OpenPanel
    └── integrations/         ← VM104 Wazuh
```

## O que foi movido

| Projecto | Conteúdo |
|----------|----------|
| **wizard** | `deploy/vm112-spec022`, `deploy/vm112-wizard-security` |
| **ops-desk** | `api/`, `worker/`, `frontend/`, `assets/`, `tests/`, `docker-compose.mvp.yml` |
| **finance** | `deploy/vm123-*`, `app/vm123/` (clientes Odoo/FOSS/OpenPanel) |
| **integrations** | `wazuh/` |

## Retrocompatibilidade

Symlinks na raiz para a VM122 não partir de imediato:

- `api` → `projects/ops-desk/api`
- `worker` → `projects/ops-desk/worker`
- `frontend` → `projects/ops-desk/frontend`
- `deploy/vm112-*`, `deploy/vm123-*` → apontam para `projects/`

## Onde ver

| Onde | URL |
|------|-----|
| **Git** | https://git.spec.ligbox.com.br/ligbox/ligbox-ops-platform/src/branch/main/projects |
| **Portal browse** | https://spec.ligbox.com.br/laptop/#/projects/README.md |
| **Specs menu** | https://spec.ligbox.com.br/specs/ → secção Projectos |
| **Manifest** | `deploy/manifest.yaml` |

## Próximo passo nas VMs

Quando quiser actualizar cada VM:

```bash
# VM122
cd /opt/ligbox-ops-platform && git pull

# VM123
git pull  # paths em projects/finance/
```

Quer que eu faça o `git pull` na VM122 e VM123 agora?

[REDACTED]


<user_query>
sim
</user_query>


Executando `git pull` na VM122 e VM123 para aplicar a reorganização.

[REDACTED]

ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 root@10.10.10.122 'hostname; ls -la /opt/ligbox-ops-platform/.git 2>/dev/null | head -3; git -C /opt/ligbox-ops-platform remote -v 2>/dev/null; git -C /opt/ligbox-ops-platform status -sb 2>/dev/null | head -5'

Check git status on VM122

ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 root@10.10.10.123 'hostname; ls -d /opt/ligbox-ops-platform /opt/vm123-finance-stack /opt/ligbox-ops-console 2>/dev/null; for d in /opt/ligbox-ops-platform /opt/vm123-finance-stack; do echo "=== $d ==="; git -C "$d" remote -v 2>/dev/null || echo "no git"; done'

Check git status on VM123


<user_query>
espere ...um piuco
</user_query>


Roger, sem problema — **paro aqui**.

Quando quiser continuar, avise e faço o `git pull` na VM122 e VM123 com calma (verifico remotes, conflitos e se os serviços sobem bem depois).

Enquanto isso, no CT130/Forgejo a reorganização `projects/` já está publicada e estável.

[REDACTED]


<user_query>
vc criou esta noca estrutura certo ?
</user_query>


<user_query>
Nova estrutura
ligbox-ops-platform/
├── specs/                    ← raiz (cruzam VMs — como concordámos)
├── contracts/
├── docs/vms/
├── deploy/manifest.yaml      ← actualizado por VM
└── projects/
    ├── wizard/               ← VM112 onboard/mail
    ├── ops-desk/             ← VM122 API + worker + frontend
    ├── finance/              ← VM123 FOSS/Odoo/OpenPanel
    └── integrations/         ← VM104 Wazuh
O que foi movido
</user_query>


Sim, Roger — **eu criei essa estrutura** no CT130, commitei no Forgejo e ela já está publicada.

## Confirmado — existe agora

```
ligbox-ops-platform/
├── specs/                    ← raiz (cruzam VMs)
├── contracts/
├── docs/vms/
├── deploy/manifest.yaml      ← actualizado por VM
└── projects/
    ├── wizard/               ← VM112
    ├── ops-desk/             ← VM122
    ├── finance/              ← VM123
    └── integrations/         ← VM104 Wazuh
```

**Commit:** `821675a` — `Reorganize monorepo into projects/wizard, ops-desk, finance`

---

## O que foi movido

| De (antes) | Para (agora) |
|------------|--------------|
| `deploy/vm112-*` | `projects/wizard/deploy/` |
| `api/`, `worker/`, `frontend/`, `assets/`, `tests/` | `projects/ops-desk/` |
| `app/` (cópia antiga) | `projects/ops-desk/legacy-app/` |
| `deploy/vm123-*`, `deploy/vm122-fossbilling` | `projects/finance/deploy/` |
| `api/app/vm123/` | `projects/finance/app/vm123/` |
| `integrations/wazuh/` | `projects/integrations/wazuh/` |

**Ficou na raiz (não moveu):**
- `specs/` — todas as specs
- `contracts/`, `docs/`, `LAPTOP/`, `chat-bruto/`, `.specify/`

---

## Retrocompatibilidade

Symlinks na raiz para não partir a VM122 de imediato:

- `api` → `projects/ops-desk/api`
- `worker` → `projects/ops-desk/worker`
- `frontend` → `projects/ops-desk/frontend`
- `deploy/vm112-*`, `deploy/vm123-*` → apontam para `projects/`

---

## Onde ver

| Local | URL |
|-------|-----|
| **Git** | https://git.spec.ligbox.com.br/ligbox/ligbox-ops-platform/tree/main/projects |
| **Portal** | https://spec.ligbox.com.br/laptop/#/projects/README.md |

---

## O que **ainda não** foi feito

- `git pull` na **VM122** e **VM123** — ficou em pausa quando pediu para esperar

Quando quiser, faço o pull nas VMs.

[REDACTED]


<user_query>
todo o Chat comecad no dia de hoje vc tem ele intergralmente aqui ? podemo salva-lo ?
</user_query>