Restructured project

- backend moved to backend directory
- added and initialized frontend with vue
- moved infrastructure files to infra directory
This commit is contained in:
2026-04-01 22:27:26 +03:00
parent 48ef7217eb
commit 9d845c8899
96 changed files with 1591 additions and 118 deletions
@@ -0,0 +1,17 @@
CREATE UNLOGGED TABLE otp
(
user_id BIGINT NOT NULL,
otp TEXT NOT NULL,
expired_at TIMESTAMP NOT NULL,
FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
);
CREATE INDEX idx_otp_user_id ON otp (user_id);
CREATE INDEX idx_otp_expired_at ON otp (expired_at);
SELECT cron.schedule(
'cleanup-expired-otp',
'*/10 * * * *',
$$DELETE FROM otp WHERE expired_at <= NOW()$$
);