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,3 @@
import type { Linter } from 'eslint';
declare const config: Linter.Config[];
export default config;

View File

@@ -0,0 +1,15 @@
import { rules } from '../../utils/rules.js';
import base from './base.js';
const config = [
...base,
{
name: 'svelte:all:rules',
rules: Object.fromEntries(rules
.map((rule) => [`svelte/${rule.meta.docs.ruleName}`, 'error'])
.filter(([ruleName]) => ![
// Does not work without options.
'svelte/no-restricted-html-elements'
].includes(ruleName)))
}
];
export default config;

View File

@@ -0,0 +1,4 @@
import type { ESLint, Linter } from 'eslint';
export declare function setPluginObject(plugin: ESLint.Plugin): void;
declare const config: Linter.Config[];
export default config;

View File

@@ -0,0 +1,44 @@
import * as parser from 'svelte-eslint-parser';
let pluginObject = null;
export function setPluginObject(plugin) {
pluginObject = plugin;
}
const config = [
{
name: 'svelte:base:setup-plugin',
plugins: {
get svelte() {
return pluginObject;
}
}
},
{
name: 'svelte:base:setup-for-svelte',
files: ['*.svelte', '**/*.svelte'],
languageOptions: {
parser
},
rules: {
// ESLint core rules known to cause problems with `.svelte`.
'no-inner-declarations': 'off', // The AST generated by svelte-eslint-parser will false positives in it rule because the root node of the script is not the `Program`.
// "no-irregular-whitespace": "off",
// Self assign is one of way to update reactive value in Svelte.
'no-self-assign': 'off',
// eslint-plugin-svelte rules
'svelte/comment-directive': 'error',
'svelte/system': 'error'
},
processor: 'svelte/svelte'
},
{
name: 'svelte:base:setup-for-svelte-script',
files: ['*.svelte.js', '*.svelte.ts', '**/*.svelte.js', '**/*.svelte.ts'],
languageOptions: {
parser
},
rules: {
// eslint-plugin-svelte rules
}
}
];
export default config;

View File

@@ -0,0 +1,3 @@
import type { Linter } from 'eslint';
declare const config: Linter.Config[];
export default config;

View File

@@ -0,0 +1,23 @@
import base from './base.js';
const config = [
...base,
{
name: 'svelte:prettier:turn-off-rules',
rules: {
// eslint-plugin-svelte rules
'svelte/first-attribute-linebreak': 'off',
'svelte/html-closing-bracket-new-line': 'off',
'svelte/html-closing-bracket-spacing': 'off',
'svelte/html-quotes': 'off',
'svelte/html-self-closing': 'off',
'svelte/indent': 'off',
'svelte/max-attributes-per-line': 'off',
'svelte/mustache-spacing': 'off',
'svelte/no-spaces-around-equal-signs-in-attribute': 'off',
'svelte/no-trailing-spaces': 'off',
'svelte/shorthand-attribute': 'off',
'svelte/shorthand-directive': 'off'
}
}
];
export default config;

View File

@@ -0,0 +1,3 @@
import type { Linter } from 'eslint';
declare const config: Linter.Config[];
export default config;

View File

@@ -0,0 +1,48 @@
import base from './base.js';
const config = [
...base,
{
name: 'svelte:recommended:rules',
rules: {
// eslint-plugin-svelte rules
'svelte/comment-directive': 'error',
'svelte/infinite-reactive-loop': 'error',
'svelte/no-at-debug-tags': 'warn',
'svelte/no-at-html-tags': 'error',
'svelte/no-dom-manipulating': 'error',
'svelte/no-dupe-else-if-blocks': 'error',
'svelte/no-dupe-on-directives': 'error',
'svelte/no-dupe-style-properties': 'error',
'svelte/no-dupe-use-directives': 'error',
'svelte/no-export-load-in-svelte-module-in-kit-pages': 'error',
'svelte/no-immutable-reactive-statements': 'error',
'svelte/no-inner-declarations': 'error',
'svelte/no-inspect': 'warn',
'svelte/no-navigation-without-resolve': 'error',
'svelte/no-not-function-handler': 'error',
'svelte/no-object-in-text-mustaches': 'error',
'svelte/no-raw-special-elements': 'error',
'svelte/no-reactive-functions': 'error',
'svelte/no-reactive-literals': 'error',
'svelte/no-reactive-reassign': 'error',
'svelte/no-shorthand-style-property-overrides': 'error',
'svelte/no-store-async': 'error',
'svelte/no-svelte-internal': 'error',
'svelte/no-unknown-style-directive-property': 'error',
'svelte/no-unnecessary-state-wrap': 'error',
'svelte/no-unused-props': 'error',
'svelte/no-unused-svelte-ignore': 'error',
'svelte/no-useless-children-snippet': 'error',
'svelte/no-useless-mustaches': 'error',
'svelte/prefer-svelte-reactivity': 'error',
'svelte/prefer-writable-derived': 'error',
'svelte/require-each-key': 'error',
'svelte/require-event-dispatcher-types': 'error',
'svelte/require-store-reactive-access': 'error',
'svelte/system': 'error',
'svelte/valid-each-key': 'error',
'svelte/valid-prop-names-in-kit-pages': 'error'
}
}
];
export default config;