feat: Reinitialize frontend with SvelteKit and TypeScript

- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
This commit is contained in:
2026-02-17 16:19:59 -05:00
parent 54df6018f5
commit de2d83092e
28274 changed files with 3816354 additions and 90 deletions

24
frontend/node_modules/happy-dom/lib/base64/Base64.d.ts generated vendored Normal file
View File

@@ -0,0 +1,24 @@
/**
* Base64 encoding and decoding.
*/
export default class Base64 {
/**
* Creates a Base64-encoded ASCII string from a binary string (i.e., a string in which each character in the string is treated as a byte of binary data).
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/btoa
* @param data Binay data.
* @returns Base64-encoded string.
*/
static btoa(data: unknown): string;
/**
* Decodes a string of data which has been encoded using Base64 encoding.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/atob
* @see https://infra.spec.whatwg.org/#forgiving-base64-encode.
* @see Https://html.spec.whatwg.org/multipage/webappapis.html#btoa.
* @param data Binay string.
* @returns An ASCII string containing decoded data from encodedData.
*/
static atob(data: unknown): string;
}
//# sourceMappingURL=Base64.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Base64.d.ts","sourceRoot":"","sources":["../../src/base64/Base64.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IAC1B;;;;;;OAMG;WACW,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;IAiCzC;;;;;;;;OAQG;WACW,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;CAsCzC"}

83
frontend/node_modules/happy-dom/lib/base64/Base64.js generated vendored Normal file
View File

@@ -0,0 +1,83 @@
import DOMException from '../exception/DOMException.js';
import DOMExceptionNameEnum from '../exception/DOMExceptionNameEnum.js';
const BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
/**
* Base64 encoding and decoding.
*/
export default class Base64 {
/**
* Creates a Base64-encoded ASCII string from a binary string (i.e., a string in which each character in the string is treated as a byte of binary data).
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/btoa
* @param data Binay data.
* @returns Base64-encoded string.
*/
static btoa(data) {
const str = data.toString();
if (/[^\u0000-\u00ff]/.test(str)) {
throw new DOMException("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.", DOMExceptionNameEnum.invalidCharacterError);
}
let t = '';
let p = -6;
let a = 0;
let i = 0;
let v = 0;
let c;
while (i < str.length || p > -6) {
if (p < 0) {
if (i < str.length) {
c = str.charCodeAt(i++);
v += 8;
}
else {
c = 0;
}
a = ((a & 255) << 8) | (c & 255);
p += 8;
}
t += BASE64_CHARS.charAt(v > 0 ? (a >> p) & 63 : 64);
p -= 6;
v -= 6;
}
return t;
}
/**
* Decodes a string of data which has been encoded using Base64 encoding.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/atob
* @see https://infra.spec.whatwg.org/#forgiving-base64-encode.
* @see Https://html.spec.whatwg.org/multipage/webappapis.html#btoa.
* @param data Binay string.
* @returns An ASCII string containing decoded data from encodedData.
*/
static atob(data) {
const str = data.toString();
if (/[^\u0000-\u00ff]/.test(str)) {
throw new DOMException("Failed to execute 'atob' on 'Window': The string to be decoded contains characters outside of the Latin1 range.", DOMExceptionNameEnum.invalidCharacterError);
}
if (/[^A-Za-z\d+/=]/.test(str) || str.length % 4 == 1) {
throw new DOMException("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.", DOMExceptionNameEnum.invalidCharacterError);
}
let t = '';
let p = -8;
let a = 0;
let c;
let d;
for (let i = 0; i < str.length; i++) {
if ((c = BASE64_CHARS.indexOf(str.charAt(i))) < 0) {
continue;
}
a = (a << 6) | (c & 63);
if ((p += 6) >= 0) {
d = (a >> p) & 255;
if (c !== 64) {
t += String.fromCharCode(d);
}
a &= 63;
p -= 8;
}
}
return t;
}
}
//# sourceMappingURL=Base64.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Base64.js","sourceRoot":"","sources":["../../src/base64/Base64.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,oBAAoB,MAAM,sCAAsC,CAAC;AAExE,MAAM,YAAY,GAAG,mEAAmE,CAAC;AAEzF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IAC1B;;;;;;OAMG;IACI,MAAM,CAAC,IAAI,CAAC,IAAa;QAC/B,MAAM,GAAG,GAAY,IAAK,CAAC,QAAQ,EAAE,CAAC;QACtC,IAAI,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,YAAY,CACrB,iHAAiH,EACjH,oBAAoB,CAAC,qBAAqB,CAC1C,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,EAAE,CAAC;QACX,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACX,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,CAAC;QACN,OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACX,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;oBACpB,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;oBACxB,CAAC,IAAI,CAAC,CAAC;gBACR,CAAC;qBAAM,CAAC;oBACP,CAAC,GAAG,CAAC,CAAC;gBACP,CAAC;gBACD,CAAC,GAAG,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