feat(backend): bootstrap Go module, config, and data plane

Introduce configuration validation, Postgres migrations, Redis/storage adapters, and the seed sample video.
This commit is contained in:
ahp
2026-10-07 19:40:26 +03:30
parent 5b9b2a16e6
commit f76c7a110b
40 changed files with 2289 additions and 0 deletions
@@ -0,0 +1,13 @@
-- Gated public registration: IP one-shot + admin toggle
CREATE TABLE IF NOT EXISTS registration_ips (
ip TEXT PRIMARY KEY,
user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS registration_ips_user_idx ON registration_ips (user_id);
INSERT INTO app_settings (key, value) VALUES
('registration_enabled', 'false')
ON CONFLICT (key) DO NOTHING;