Files
headroom/frontend/build/client/_app/immutable/nodes/4.Dd_eVbye.js
Santhosh Janardhanan de2d83092e 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
2026-02-17 16:19:59 -05:00

3 lines
2.0 KiB
JavaScript

import{a as v,f as p}from"../chunks/pJd4F_Tq.js";import{i as k}from"../chunks/BgHfHpED.js";import{p as w,b as T,e as y,$ as A,c as s,s as r,r as t,t as L}from"../chunks/CCV2x70u.js";import{e as R,s as W}from"../chunks/Bx__7-vK.js";import{i as j}from"../chunks/CC5oASRR.js";import{h as F}from"../chunks/DhYTxIvM.js";import{s as H,a as J}from"../chunks/JkAhLmb1.js";import{u as M,l as q}from"../chunks/CrZRXG6z.js";import{g as z}from"../chunks/DBDqKY8A.js";var B=p('<div class="alert alert-info mb-4"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span> </span></div>'),C=p(`<div class="max-w-4xl mx-auto"><div class="card bg-base-100 shadow-xl"><div class="card-body"><h1 class="card-title text-3xl mb-4">Welcome to Headroom! 👋</h1> <!> <p class="text-lg mb-4">You have successfully authenticated. This is a protected dashboard page
that requires a valid JWT token to access.</p> <div class="divider"></div> <h2 class="text-xl font-bold mb-2">Authentication Features Implemented:</h2> <ul class="list-disc list-inside space-y-2 mb-6"><li>✅ JWT Token Authentication</li> <li>✅ Token Auto-refresh on 401</li> <li>✅ Protected Route Guards</li> <li>✅ Form Validation with Zod</li> <li>✅ Role-based Access Control</li> <li>✅ Redis Token Storage</li></ul> <div class="card-actions"><button class="btn btn-error">Logout</button></div></div></div></div>`);function K(u,h){w(h,!1);const o=()=>J(M,"$user",f),[f,b]=H();async function g(){await q(),z("/login")}k();var e=C();F("x1i5gj",a=>{y(()=>{A.title="Dashboard - Headroom"})});var l=s(e),n=s(l),d=r(s(n),2);{var x=a=>{var i=B(),m=r(s(i),2),$=s(m);t(m),t(i),L(()=>W($,`Logged in as ${o().email??""} (${o().role??""})`)),v(a,i)};j(d,a=>{o()&&a(x)})}var c=r(d,10),_=s(c);t(c),t(n),t(l),t(e),R("click",_,g),v(u,e),T(),b()}export{K as component};