refactor: removes caching, adds JSDoc comments
Remove in-memory caching from ContentService to prevent data bleedover
between authenticated and unauthenticated requests. fetchContent() now
returns data per-request with no shared state. Added JSDoc comments
throughout the class.
feat: Improves the admin dashboard.
The + button now navigates the user to the correct Directus page.
Now displays the correct amount of the content list items.
- Add new export to src/lib/index.js
- Extend admin layout server with additional auth/session logic
- Update admin layout component with improved structure
- Refactor admin dashboard page with expanded UI and functionality
Issues #320 #337 #338 #339 #340 #341
test: set up Vitest and Playwright infrastructure.
- Add Vitest for unit/integration tests (src/**/*.test.js)
- Add Playwright for E2E tests (e2e/**/*.spec.js)
- Configure Vitest to exclude e2e/ folder and pass with no tests
- Configure Playwright with list reporter and dev server
- Add placeholder unit test as baseline
- Add test-results/ and playwright-report/ to .gitignore
- Add test scripts to package.json (test, test:unit, test:e2e, test:watch)
Issue #327
fix: fix error page and extract Footer component.
- Move +error.svelte from (public)/ to routes/ so it catches all unmatched URLs including non-public routes
- Extract inline footer markup into a reusable Footer organism component
- Export Footer from lib/index.js
- Fix quote style inconsistencies in index.js exports
- Add top padding to error page to prevent NavPros overlap
refactor: extract auth logic into AuthService.
Adds caching of userdata.
- Add AuthService static class with in-memory cache (5 min TTL)
- Move token validation, user fetching, and session refresh into AuthService
- Schedule cache pruning via setInterval every 10 minutes
- Simplify hooks.server.js to delegate entirely to AuthService
Issue #313
feat: implements Directus authentication.
implements admin layout.
Add server-side authentication system using Directus auth API with httpOnly
cookie-based sessions. Implement complete admin portal with login/logout flows
and redesigned UI matching brand guidelines.
Authentication Infrastructure:
- Add hooks.server.js for token validation and automatic refresh
- Implement Directus auth integration (login, refresh, logout endpoints)
- Use httpOnly cookies for secure token storage (access + refresh tokens)
- Add route guards to protect admin routes
Admin Portal:
- Create /admin layout with custom sidebar design (AdConnect logo, nav, blobs)
- Implement login page with form, icons, and bird mascot illustration
- Add logout functionality with full page reload for state reset
- Conditional sidebar: "Welkom Terug!" on login, nav links when authenticated
- Responsive design with wider sidebar on login screen
Route Restructuring:
- Move all public routes to (public) route group for layout isolation
- Strip root layout to minimal (favicon + stylesheet only)
- Move header/footer to (public)/+layout.svelte
- Admin routes isolated from public layout