Ship Novya PWA with backend for deployable production use.

Fix production TypeScript builds and add DEPLOY.md so the app can be hosted from this repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ar.badiei
2026-09-03 21:01:52 +03:30
co-authored by Cursor
parent aa9236fb92
commit 370ac15471
193 changed files with 25997 additions and 1991 deletions
@@ -0,0 +1,20 @@
-- Deduplicate assessment_attempts before adding UNIQUE(userId, phase).
-- Keep the newest row per (userId, phase); child rows cascade on delete.
DELETE FROM `assessment_attempts`
WHERE `id` IN (
SELECT `id` FROM (
SELECT a.`id`
FROM `assessment_attempts` a
INNER JOIN `assessment_attempts` keeper
ON keeper.`userId` = a.`userId`
AND keeper.`phase` = a.`phase`
AND (
keeper.`submittedAt` > a.`submittedAt`
OR (keeper.`submittedAt` = a.`submittedAt` AND keeper.`id` > a.`id`)
)
) AS duplicates
);
-- CreateIndex
CREATE UNIQUE INDEX `uq_assessment_attempts_user_phase` ON `assessment_attempts`(`userId`, `phase`);