Date : 25/01/2026 Status : PROPOSITION Projets :
connectors-api (existant, à enrichir)connectors-front (nouveau projet séparé)L'API se suffit à elle-même : tout est faisable via API REST. Le front est un consommateur comme un autre.
GitLab/
├── connectors-api/ # Backend Elysia (EXISTANT)
│ ├── src/
│ │ ├── services/
│ │ │ ├── registry.ts
│ │ │ ├── discovery.ts
│ │ │ ├── userAuth.ts # À enrichir (reset password)
│ │ │ ├── autodiscovery.ts # NOUVEAU
│ │ │ ├── audit.ts # NOUVEAU - Logs
│ │ │ └── versioning.ts # NOUVEAU - Versions
│ │ └── index.ts
│ └── package.json
│
└── connectors-front/ # NOUVEAU PROJET SÉPARÉ
├── src/
│ ├── routes/
│ │ ├── index.tsx
│ │ ├── auth/
│ │ ├── connectors/
│ │ └── admin/
│ ├── components/
│ └── lib/
│ └── api.ts # Client connectors-api
└── package.json
| Page | Route | Description |
|---|---|---|
| Login | /auth/login |
Email + password |
| Register | /auth/register |
Création compte |
| Forgot | /auth/forgot-password |
Demande reset |
| Reset | /auth/reset-password?token=xxx |
Nouveau mot de passe |
| Settings | /auth/settings |
Profil, change password, disable account |
Reset password flow :
POST /api/auth/forgot-passwordPOST /api/auth/reset-passwordDisable account :
disabled_at)| Page | Route | Description |
|---|---|---|
| Liste | /connectors |
Cards avec status connexion |
| Détail | /connectors/[id] |
Vue complète |
| Créer | /connectors/new |
Wizard création |
| Modifier | /connectors/[id]/edit |
Form édition |
Wizard création :
Étape 1: Infos de base
- Nom, display_name, description
- Base URL de l'API
- Icône (upload ou URL)
Étape 2: Authentification
- Type: OAuth2 / API Key / Bearer / Basic / Custom
- Config selon type (URLs, scopes, headers...)
Étape 3: Discovery
- Auto-detect swagger
- Ou URL swagger manuelle
- Ou exploration auto
Étape 4: Validation
- Test de connexion
- Preview endpoints découverts
| Type | Interface |
|---|---|
| OAuth2 | Bouton "Connecter" → popup OAuth → callback |
| API Key | Input texte + bouton "Sauvegarder" |
| Bearer | Input token + expiration optionnelle |
| Basic | Inputs user/password |
| Custom | Form dynamique selon auth_config |
UI intuitive :
┌─────────────────────────────────────────────┐
│ GitHub ● Connecté │
│ ───────────────────────────────────────── │
│ Compte: gouroubleu │
│ Expire: Jamais │
│ Scopes: repo, user, read:org │
│ │
│ [Déconnecter] [Rafraîchir] [Voir logs] │
└─────────────────────────────────────────────┘
| Vue | Description |
|---|---|
| Liste | Table triable avec filtres (entity, action, method) |
| Détail | Schema request/response, relations, tester |
| Tester | Form auto-généré depuis schema, exécution live |
Tester un endpoint :
┌─────────────────────────────────────────────┐
│ POST /user/repos │
│ ───────────────────────────────────────── │
│ │
│ name*: [mon-nouveau-repo ] │
│ description: [Description du repo ] │
│ private: [x] Oui │
│ auto_init: [ ] Non │
│ │
│ [Exécuter] │
│ │
│ ─── Réponse ─── │
│ Status: 201 Created │
│ { "id": 123, "name": "mon-nouveau-repo" } │
└─────────────────────────────────────────────┘
| Méthode | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Créer un compte |
| POST | /api/auth/login |
Connexion → JWT |
| POST | /api/auth/logout |
Déconnexion |
| POST | /api/auth/refresh |
Rafraîchir token |
| GET | /api/auth/me |
Profil utilisateur |
| PUT | /api/auth/me |
Modifier profil |
| POST | /api/auth/change-password |
Changer mot de passe (connecté) |
| POST | /api/auth/forgot-password |
Demander reset (envoie email) |
| POST | /api/auth/reset-password |
Reset avec token |
| POST | /api/auth/disable-account |
Désactiver compte |
| POST | /api/auth/verify-email |
Vérifier email (optionnel) |
| Méthode | Endpoint | Description |
|---|---|---|
| GET | /api/connectors |
Liste tous les connecteurs |
| POST | /api/connectors |
Créer connecteur (+ auto-discovery) |
| GET | /api/connectors/:id |
Détail connecteur |
| PUT | /api/connectors/:id |
Modifier connecteur |
| DELETE | /api/connectors/:id |
Supprimer connecteur |
| POST | /api/connectors/:id/rediscover |
Relancer discovery |
| GET | /api/connectors/:id/schema |
Schema complet |
| GET | /api/connectors/:id/endpoints |
Liste endpoints |
| GET | /api/connectors/:id/logs |
Logs du connecteur |
| Méthode | Endpoint | Description |
|---|---|---|
| GET | /api/user/connectors/:id |
Mon status connexion |
| GET | /api/user/connectors/:id/auth |
URL OAuth ou instructions |
| POST | /api/user/connectors/:id/token |
Sauver token/API key |
| DELETE | /api/user/connectors/:id/auth |
Révoquer |
| GET | /api/connectors/:id/callback |
Callback OAuth |
| Méthode | Endpoint | Description |
|---|---|---|
| GET | /api/endpoints/:id |
Détail endpoint |
| PUT | /api/endpoints/:id |
Modifier endpoint |
| DELETE | /api/endpoints/:id |
Supprimer endpoint |
| GET | /api/endpoints/:id/versions |
Historique versions |
| GET | /api/endpoints/:id/versions/:v |
Détail version |
| POST | /api/endpoints/:id/rollback/:v |
Rollback |
| Méthode | Endpoint | Description |
|---|---|---|
| GET | /api/audit/logs |
Liste logs (filtres) |
| GET | /api/audit/logs/:id |
Détail log |
| GET | /api/audit/stats |
Stats globales |
| Méthode | Endpoint | Description |
|---|---|---|
| POST | /api/fetch |
Exécuter requête via connecteur |
Table audit_logs :
CREATE TABLE audit_logs (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID REFERENCES users(id),
connector_id UUID REFERENCES config(id),
action VARCHAR(50) NOT NULL, -- 'fetch', 'create', 'update', 'delete', 'auth'
resource VARCHAR(100), -- 'connector', 'endpoint', 'token'
resource_id UUID,
details JSONB, -- Payload, response status, etc.
ip_address VARCHAR(50),
user_agent TEXT,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX idx_audit_user ON audit_logs(user_id, created_at DESC);
CREATE INDEX idx_audit_connector ON audit_logs(connector_id, created_at DESC);
Actions loggées :
| Action | Quand |
|--------|-------|
| auth.login | Connexion utilisateur |
| auth.logout | Déconnexion |
| connector.create | Création connecteur |
| connector.update | Modification connecteur |
| connector.delete | Suppression connecteur |
| connector.auth | Liaison compte (OAuth, token) |
| connector.revoke | Révocation token |
| fetch.execute | Appel API via proxy |
| endpoint.discover | Découverte endpoint |
| endpoint.import | Import swagger |
Endpoints API :
GET /api/audit/logs # Liste logs (filtres: user, connector, action, date)
GET /api/audit/logs/:id # Détail log
GET /api/connectors/:id/logs # Logs d'un connecteur
Table endpoint_versions :
CREATE TABLE endpoint_versions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
endpoint_id UUID REFERENCES endpoints(id) ON DELETE CASCADE,
version INT NOT NULL,
-- Snapshot des données
path VARCHAR(500),
method VARCHAR(10),
request_schema JSONB,
response_schema JSONB,
parameters JSONB,
-- Métadonnées
change_type VARCHAR(20), -- 'created', 'updated', 'deleted'
change_summary TEXT,
changed_by UUID REFERENCES users(id),
created_at TIMESTAMPTZ DEFAULT NOW(),
UNIQUE(endpoint_id, version)
);
CREATE INDEX idx_version_endpoint ON endpoint_versions(endpoint_id, version DESC);
Logique :
Endpoints API :
GET /api/endpoints/:id/versions # Historique versions
GET /api/endpoints/:id/versions/:v # Détail version
POST /api/endpoints/:id/rollback/:v # Rollback
GET /api/endpoints/:id/diff/:v1/:v2 # Diff entre versions
| Lib | Usage |
|---|---|
| Qwik | Framework |
| Qwik City | Routing |
| TailwindCSS | Styling |
| DaisyUI | Composants UI |
| @tanstack/query | Cache API |
POST /api/auth/forgot-password (envoie email via Supabase)POST /api/auth/reset-password (avec token) - TODO: notif-logger templatePOST /api/auth/change-passwordPUT /api/auth/me (modifier profil)POST /api/auth/disable-accountpassword_reset_tokens - Géré par Supabase GoTrueautodiscovery.tsPOST /api/connectors/:id/rediscoveraudit.tsaudit_logs (migration 002)/api/audit/logs, /api/audit/logs/:id, /api/audit/statsGET /api/connectors/:id/logsversioning.tsendpoint_versions (migration 003)/api/endpoints/:id/versions, /api/endpoints/:id/rollback/:v/api/endpoints/:id/diff/:v1/:v2connectors-frontEnvoi email reset password :
notif-logger (port 5300) - service existantto dynamiqueDéploiement front :
connectors.33800.nowhere84.com ?Priorité :
Versioning : snapshot complet ou delta/diff ?