# Gigafibre FSM — Ecosystem Overview > Synthèse complète pour développeurs et sysadmins — Avril 2026 --- ## 1. Vue d'ensemble Gigafibre FSM est une plateforme de gestion d'opérations pour un fournisseur internet fibre (FTTH) desservant **6 600+ clients** au Québec. Elle remplace un système legacy PHP/MariaDB vieux de 15 ans par un écosystème moderne composé de : - **4 applications web** (ops, field, client, website) - **1 backend Node.js** (targo-hub) servant d'orchestrateur central - **ERPNext v16** comme ERP et source de vérité des données - **95+ scripts de migration** pour le transfert depuis le système legacy - **Infrastructure Docker** avec Traefik, Authentik SSO, et monitoring **Monorepo** : `git.targo.ca/louis/gigafibre-fsm` ``` gigafibre-fsm/ ├── apps/ │ ├── ops/ → Quasar/Vue 3 PWA — outil interne (erp.gigafibre.ca/ops/) │ ├── field/ → Quasar/Vue 3 PWA — app mobile techniciens │ ├── client/ → Quasar/Vue 3 PWA — portail client (client.gigafibre.ca) │ └── website/ → React/Vite — site vitrine (www.gigafibre.ca) ├── services/ │ └── targo-hub/ → Node.js 20 — backend API (msg.gigafibre.ca) ├── erpnext/ → Scripts de setup des doctypes custom ├── scripts/migration/ → Importation legacy → ERPNext └── docs/ → Documentation architecture ``` --- ## 2. Infrastructure serveur ### Serveur principal : 96.125.196.67 (hubdocker) Tout roule sur un seul serveur Proxmox avec Docker. Le reverse proxy Traefik gère le TLS (Let's Encrypt) et le routage. | Service | URL | Container | Auth | |---------|-----|-----------|------| | ERPNext v16 | erp.gigafibre.ca | erpnext-frontend-1 | Aucun (API token) | | Ops App | erp.gigafibre.ca/ops/ | ops-frontend (nginx) | Authentik SSO | | Portail client | client.gigafibre.ca | erpnext-frontend-1 | Authentik client | | targo-hub | msg.gigafibre.ca | targo-hub | Authentik SSO | | n8n | n8n.gigafibre.ca | erpnext-n8n-1 | Authentik (GUI) / aucun (webhooks) | | Dispatch legacy | dispatch.gigafibre.ca | apps-dispatch-frontend-1 | Authentik SSO | | Oktopus ACS | oss.gigafibre.ca | oktopus-frontend-1 | Authentik SSO | | Site web | www.gigafibre.ca | apps-www-gigafibre-1 | Aucun | | GPS tracking | tracker.targointernet.com | traccar | Basic auth | ### Réseaux Docker | Réseau | Services connectés | |--------|-------------------| | `proxy` | Traefik, targo-hub, ops, dispatch, erpnext, n8n, authentik, oktopus, website, traccar | | `erpnext_erpnext` | ERPNext (backend, DB, redis, workers), targo-hub, n8n | | `fonoster_default` | Fonoster/Routr SIP (asterisk, postgres, nats, routr) | | `authentik-client_authentik-client` | Authentik client (server, worker, postgresql, redis) | ### Bases de données | DB | Host | Usage | |----|------|-------| | PostgreSQL (ERPNext) | erpnext-db-1:5432 | Toutes les données métier | | PostgreSQL (targo_cache) | erpnext-db-1:5432 | Cache devices + hosts (targo-hub) | | PostgreSQL (Fonoster) | fn-postgres:5432 | SIP routing (trunks, agents) | | MongoDB (Oktopus) | oktopus-mongo-1:27017 | TR-069 ACS device management | ### SSO (Authentik) - **Staff** : auth.targo.ca — protège ops, dispatch, n8n, hub - **Client** : id.gigafibre.ca — protège le portail client - Authentification via Traefik forwardAuth middleware --- ## 3. ERPNext — Modèle de données ERPNext est le coeur du système. Tous les CRUD passent par son API REST. ### Doctypes custom (module FSM) | Doctype | Rôle | Champs clés | |---------|------|-------------| | **Dispatch Job** | Tâche planifiée | tech, date, heure, durée, status, tags, published, is_recurring, recurrence_rule | | **Dispatch Technician** | Ressource humaine/matérielle | fullName, phone, resource_type, weekly_schedule, extra_shifts, tags | | **Dispatch Tag** | Compétence/catégorie | tag_name, color, category | | **Dispatch Tag Link** | Lien tag↔job/tech | tag, level (1-5), required | | **Dispatch Preset** | Preset de groupe partagé | preset_name, preset_type, preset_data (JSON) | | **Dispatch Offer** | Offre de travail (pool Uber) | job, mode, pricing, status, responses | | **Service Location** | Adresse de service | address, city, GPS, OLT port, network_id | | **Service Equipment** | Équipement client | serial, MAC, IP, firmware, OLT info | ### Doctypes ERPNext standard enrichis | Doctype | Champs custom ajoutés | |---------|----------------------| | Customer | legacy_customer_id, stripe_id, is_commercial, is_bad_payer, ppa_enabled | | Subscription | custom_description, actual_price, service_location | | Issue | linked dispatch jobs, legacy ticket ID | | Sales Invoice | QR code, portal payment link | --- ## 4. Ops App — Application principale ### Stack technique - **Framework** : Vue 3 (Composition API, `