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

View File

@@ -0,0 +1,21 @@
import Document from '../document/Document.js';
import * as PropertySymbol from '../../PropertySymbol.js';
import Node from '../node/Node.js';
/**
* Document.
*/
export default class HTMLDocument extends Document {
/**
* Constructor.
*/
constructor();
/**
* @override
*/
[PropertySymbol.appendChild](node: Node, disableValidations?: boolean): Node;
/**
* @override
*/
[PropertySymbol.insertBefore](newNode: Node, referenceNode: Node | null, disableValidations?: boolean): Node;
}
//# sourceMappingURL=HTMLDocument.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"HTMLDocument.d.ts","sourceRoot":"","sources":["../../../src/nodes/html-document/HTMLDocument.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,IAAI,MAAM,iBAAiB,CAAC;AAGnC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,QAAQ;IACjD;;OAEG;;IAeH;;OAEG;IACa,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,kBAAkB,UAAQ,GAAG,IAAI;IAuB1F;;OAEG;IACa,CAAC,cAAc,CAAC,YAAY,CAAC,CAC5C,OAAO,EAAE,IAAI,EACb,aAAa,EAAE,IAAI,GAAG,IAAI,EAC1B,kBAAkB,UAAQ,GACxB,IAAI;CAsBP"}

View File

@@ -0,0 +1,54 @@
import Document from '../document/Document.js';
import * as PropertySymbol from '../../PropertySymbol.js';
import NodeTypeEnum from '../node/NodeTypeEnum.js';
/**
* Document.
*/
export default class HTMLDocument extends Document {
/**
* Constructor.
*/
constructor() {
super();
// Default document elements
const documentElement = this.createElement('html');
const bodyElement = this.createElement('body');
const headElement = this.createElement('head');
this.appendChild(documentElement);
documentElement.appendChild(headElement);
documentElement.appendChild(bodyElement);
}
/**
* @override
*/
[PropertySymbol.appendChild](node, disableValidations = false) {
if (node[PropertySymbol.nodeType] === NodeTypeEnum.textNode) {
throw new this[PropertySymbol.window].Error(`Failed to execute 'appendChild' on 'Node': Nodes of type '#text' may not be inserted inside nodes of type '#document'.`);
}
if (node[PropertySymbol.nodeType] === NodeTypeEnum.documentFragmentNode) {
return;
}
if (node[PropertySymbol.nodeType] === NodeTypeEnum.elementNode &&
this[PropertySymbol.elementArray].length !== 0) {
throw new this[PropertySymbol.window].Error(`Failed to execute 'appendChild' on 'Node': Only one element on document allowed.`);
}
return super[PropertySymbol.appendChild](node, disableValidations);
}
/**
* @override
*/
[PropertySymbol.insertBefore](newNode, referenceNode, disableValidations = false) {
if (newNode[PropertySymbol.nodeType] === NodeTypeEnum.textNode) {
throw new this[PropertySymbol.window].Error(`Failed to execute 'insertBefore' on 'Node': Nodes of type '#text' may not be inserted inside nodes of type '#document'.`);
}
if (newNode[PropertySymbol.nodeType] === NodeTypeEnum.documentFragmentNode) {
return;
}
if (newNode[PropertySymbol.nodeType] === NodeTypeEnum.elementNode &&
this[PropertySymbol.elementArray].length !== 0) {
throw new this[PropertySymbol.window].Error(`Failed to execute 'insertBefore' on 'Node': Only one element on document allowed.`);
}
return super[PropertySymbol.insertBefore](newNode, referenceNode, disableValidations);
}
}
//# sourceMappingURL=HTMLDocument.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"HTMLDocument.js","sourceRoot":"","sources":["../../../src/nodes/html-document/HTMLDocument.ts"],"names":[],"mappings":"AAA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