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

58
frontend/node_modules/memoize-weak/README.md generated vendored Normal file
View File

@@ -0,0 +1,58 @@
# memoize-weak
[![npm version](https://img.shields.io/npm/v/memoize-weak.svg)](https://www.npmjs.com/package/memoize-weak)
![Stability](https://img.shields.io/badge/stability-stable-brightgreen.svg)
[![Build Status](https://travis-ci.org/timkendrick/memoize-weak.svg?branch=master)](https://travis-ci.org/timkendrick/memoize-weak)
> Garbage-collected memoizer for variadic functions
## Installation
```bash
npm install memoize-weak
```
## Example
```js
import memoize from 'memoize-weak';
let foo = { foo: true };
let bar = { bar: true };
let baz = { baz: true };
const fn = memoize((...args) => args); // Create a memoized function
fn(foo, bar, baz); // Returns [{ foo: true }, { bar: true }, { baz: true }]
fn(foo, bar, baz); // Returns cached result
foo = bar = baz = undefined; // Original foo, bar and baz are now eligible for garbage collection
```
## Features
- Memoizes multiple arguments of any type
- Previous arguments are automatically garbage-collected when no longer referenced elsewhere
- No external dependencies
- Compatible with ES5 and up
## How does `memoize-weak` differ from other memoize implementations?
Memoize functions cache the return value of a function, so that it can be used again without having to recalculate the value.
They do this by maintaining a cache of arguments that the function has previously been called with, in order to return results that correspond to an earlier set of arguments.
Usually this argument cache is retained indefinitely, or for a predefined duration after the original function call. This means that any objects passed as arguments are not eligible for garbage collection, even if all other references to these objects have been removed.
`memoize-weak` uses "weak references" to the argument values, so that once all the references to the arguments have been removed elsewehere in the application, the arguments will become eligible for cleanup (along with any cached return values that correspond to those arguments).
This allows you to use memoized functions with impunity, without having to worry about potential memory leaks.
## Using `memoize-weak` in ES5 applications
`memoize-weak` requires that `Map` and `WeakMap` are globally available. This means that these will have to be polyfilled for use in an ES5 environment.
Some examples of `Map` and `WeakMap` polyfills for ES5:
- [Babel Polyfill](https://babeljs.io/docs/usage/polyfill/)
- [CoreJS](https://github.com/zloirock/core-js)
- [`es6-map`](https://www.npmjs.com/package/es6-map) and [`es6-weak-map`](https://www.npmjs.com/package/es6-weak-map)

1
frontend/node_modules/memoize-weak/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
module.exports = require('./lib/memoize');

86
frontend/node_modules/memoize-weak/lib/memoize.js generated vendored Normal file
View File

@@ -0,0 +1,86 @@
function isPrimitive(value) {
return ((typeof value !== 'object') && (typeof value !== 'function')) || (value === null);
}
function MapTree() {
this.childBranches = new WeakMap();
this.primitiveKeys = new Map();
this.hasValue = false;
this.value = undefined;
}
MapTree.prototype.has = function has(key) {
var keyObject = (isPrimitive(key) ? this.primitiveKeys.get(key) : key);
return (keyObject ? this.childBranches.has(keyObject) : false);
};
MapTree.prototype.get = function get(key) {
var keyObject = (isPrimitive(key) ? this.primitiveKeys.get(key) : key);
return (keyObject ? this.childBranches.get(keyObject) : undefined);
};
MapTree.prototype.resolveBranch = function resolveBranch(key) {
if (this.has(key)) { return this.get(key); }
var newBranch = new MapTree();
var keyObject = this.createKey(key);
this.childBranches.set(keyObject, newBranch);
return newBranch;
};
MapTree.prototype.setValue = function setValue(value) {
this.hasValue = true;
return (this.value = value);
};
MapTree.prototype.createKey = function createKey(key) {
if (isPrimitive(key)) {
var keyObject = {};
this.primitiveKeys.set(key, keyObject);
return keyObject;
}
return key;
};
MapTree.prototype.clear = function clear() {
if (arguments.length === 0) {
this.childBranches = new WeakMap();
this.primitiveKeys.clear();
this.hasValue = false;
this.value = undefined;
} else if (arguments.length === 1) {
var key = arguments[0];
if (isPrimitive(key)) {
var keyObject = this.primitiveKeys.get(key);
if (keyObject) {
this.childBranches.delete(keyObject);
this.primitiveKeys.delete(key);
}
} else {
this.childBranches.delete(key);
}
} else {
var childKey = arguments[0];
if (this.has(childKey)) {
var childBranch = this.get(childKey);
childBranch.clear.apply(childBranch, Array.prototype.slice.call(arguments, 1));
}
}
};
module.exports = function memoize(fn) {
var argsTree = new MapTree();
function memoized() {
var args = Array.prototype.slice.call(arguments);
var argNode = args.reduce(function getBranch(parentBranch, arg) {
return parentBranch.resolveBranch(arg);
}, argsTree);
if (argNode.hasValue) { return argNode.value; }
var value = fn.apply(null, args);
return argNode.setValue(value);
}
memoized.clear = argsTree.clear.bind(argsTree);
return memoized;
};

42
frontend/node_modules/memoize-weak/package.json generated vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"name": "memoize-weak",
"version": "1.0.2",
"description": "Garbage-collected memoizer for variadic functions",
"main": "index.js",
"directories": {
"lib": "lib",
"test": "test"
},
"files": [
"index.js",
"lib"
],
"scripts": {
"test": "eslint index.js test lib && mocha --reporter spec"
},
"repository": {
"type": "git",
"url": "git+https://github.com/timkendrick/memoize-weak.git"
},
"keywords": [
"memoize",
"weak",
"weakmap",
"garbage"
],
"author": "Tim Kendrick <timkendrick@gmail.com>",
"license": "ISC",
"bugs": {
"url": "https://github.com/timkendrick/memoize-weak/issues"
},
"homepage": "https://github.com/timkendrick/memoize-weak#readme",
"dependencies": {},
"devDependencies": {
"chai": "^3.5.0",
"eslint": "^3.10.0",
"eslint-config-airbnb-base": "^10.0.0",
"eslint-plugin-import": "^2.2.0",
"mocha": "^3.0.0",
"sinon": "^1.0.0"
}
}