feat: project skeleton

- infra (k8s, kind, helm, docker) backbone is implemented
- security: implementation + unit tests are done
This commit is contained in:
2025-11-21 12:00:00 -05:00
commit fbe9fbba6e
46 changed files with 3450 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
-- Notification system tables
-- Stores notification targets and delivery attempts
CREATE TABLE notification_targets (
id UUID PRIMARY KEY,
org_id UUID NOT NULL REFERENCES orgs(id),
name TEXT NOT NULL,
target_type TEXT NOT NULL CHECK (target_type IN ('webhook', 'email', 'slack')),
webhook_url TEXT,
enabled BOOLEAN NOT NULL DEFAULT true,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX idx_notification_targets_org ON notification_targets(org_id);
CREATE TABLE notification_attempts (
id UUID PRIMARY KEY,
incident_id UUID NOT NULL REFERENCES incidents(id),
target_id UUID NOT NULL REFERENCES notification_targets(id),
status TEXT NOT NULL CHECK (status IN ('pending', 'sent', 'failed')),
error TEXT,
sent_at TIMESTAMPTZ,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
UNIQUE (incident_id, target_id)
);