SOGOMS v1.0.3 - Admin UI, Cron, Config reload

Phase 13 : sogoms-cron
- Jobs planifiés avec schedule cron standard
- Types: query_email, http, service
- Actions: list, trigger, status

Phase 16 : Réorganisation config/apps/{app}/
- Tous les fichiers d'une app dans un seul dossier
- Migration prokov vers nouvelle structure

Phase 17 : sogoms-admin
- Interface web d'administration (Go templates + htmx)
- Auth sessions cookies signées HMAC-SHA256
- Rôles super_admin / app_admin avec permissions

Phase 19 : Création d'app via Admin UI
- Formulaire création app avec config DB/auth
- Bouton "Scanner la base" : introspection + schema.yaml
- Rechargement automatique sogoway via SIGHUP

Infrastructure :
- sogoctl : socket de contrôle /run/sogoctl.sock
- sogoway : reload config sur SIGHUP sans restart

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-19 20:30:56 +01:00
parent a4694a10d1
commit 65da4efdad
76 changed files with 5305 additions and 80 deletions

View File

@@ -0,0 +1,93 @@
# Scénario: Inscription utilisateur
name: register
version: "1.0"
description: Crée un nouvel utilisateur
input:
required:
- email
- password
- name
validation:
email:
type: string
format: email
max_length: 255
password:
type: string
min_length: 6
max_length: 255
name:
type: string
min_length: 2
max_length: 100
steps:
- id: check_email
service: db
action: query_one
params:
query: "SELECT id FROM users WHERE email = ?"
args: ["{{input.email}}"]
on_success: abort
error_message: "Cet email est déjà utilisé"
error_status: 409
- id: hash_password
service: auth
action: hash_password
params:
password: "{{input.password}}"
- id: create_user
service: db
action: insert
params:
table: users
data:
email: "{{input.email}}"
password: "{{steps.hash_password.result.hash}}"
name: "{{input.name}}"
- id: create_default_statuses
service: db
action: exec
params:
query: |
INSERT INTO statuses (user_id, project_id, code, name, color, position) VALUES
(?, NULL, 10, 'Backlog', '#6B7280', 10),
(?, NULL, 20, 'À faire', '#3B82F6', 20),
(?, NULL, 30, 'En cours', '#F59E0B', 30),
(?, NULL, 40, 'À tester', '#8B5CF6', 40),
(?, NULL, 50, 'Livré', '#10B981', 50),
(?, NULL, 60, 'Terminé', '#059669', 60),
(?, NULL, 70, 'Archivé', '#9CA3AF', 70)
args:
- "{{steps.create_user.insert_id}}"
- "{{steps.create_user.insert_id}}"
- "{{steps.create_user.insert_id}}"
- "{{steps.create_user.insert_id}}"
- "{{steps.create_user.insert_id}}"
- "{{steps.create_user.insert_id}}"
- "{{steps.create_user.insert_id}}"
- id: generate_token
service: auth
action: generate_jwt
params:
claims:
sub: "{{steps.create_user.insert_id}}"
email: "{{input.email}}"
name: "{{input.name}}"
output:
status: 201
body:
success: true
message: "Inscription réussie"
data:
token: "{{steps.generate_token.result.token}}"
user:
id: "{{steps.create_user.insert_id}}"
email: "{{input.email}}"
name: "{{input.name}}"