Files
web-app-launcher/plans/phase-3-advanced-features/CONTEXT.md
T
alexei.dolgolyov 1c0a7cb850 feat: Phases 4-7 — Full Feature Expansion (26 features)
Phase 4 — New Widget Types:
- Clock/Weather, System Stats, RSS/Feed, Calendar, Markdown,
  Metric/Counter, Link Group, Camera/Stream widgets
- Backend services with caching for each data source
- Full creation form with dynamic config fields per type

Phase 5 — Visual & Styling Enhancements:
- Glassmorphism card style (solid/glass/outline)
- Board-level themes with per-board hue/saturation
- Animated SVG status rings replacing static dots
- Card size options (compact/medium/large)
- Custom CSS injection (admin + per-board, sanitized)
- Wallpaper backgrounds with blur/overlay/parallax

Phase 6 — Functional Features:
- Favorites bar with drag-and-drop reordering
- Recent apps tracking with privacy toggle
- Uptime dashboard page (/status, guest-accessible)
- Notifications system (Discord/Slack/Telegram/HTTP webhooks)
- App tags with filtering in board view
- Multi-URL app cards with expandable sub-links
- Personal API tokens with scoped permissions
- Audit log with retention and admin viewer

Phase 7 — Quality of Life:
- Onboarding wizard (5-step first-launch setup)
- App URL health preview with favicon/title detection
- Board templates (4 built-in + custom import/export)
- Keyboard shortcut overlay (j/k nav, 1-9 boards, ? help)

212 files changed, 15641 insertions, 980 deletions.
Build, lint, type check, and 222 tests all pass.
2026-03-25 14:18:10 +03:00

45 lines
2.6 KiB
Markdown

# Feature Context: Phase 3 — Advanced Features
## Current State
Phase 7 (Integration & Polish) is complete. 222 tests across 20 test files, full build passes, `npm run check` 0 errors, `npm run lint` 0 errors. All phases 1-7 are done.
### Phase 1 (Import/Export) Summary
exportService, importService, admin API endpoints, ImportExportPanel UI, Zod validation schema, i18n EN/RU translations.
### Phase 2 (Sparklines) Summary
- History API at `/api/apps/[id]/history` — returns last 288 status records with uptime percentage
- `SparklineChart.svelte` — inline SVG bar chart with color-coded status bars (green/red/yellow/gray)
- `AppWidget.svelte` and `AppCard.svelte` updated to fetch and display sparklines on mount
- `pruneOldStatuses()` in healthcheck service — deletes records >24h, caps at 288 per app
- Hourly cleanup cron job in healthcheck scheduler
- i18n keys: `app.uptime`, `app.history_loading` (EN/RU)
### Phase 3 (User Theme Overrides) Summary
- Prisma migration: added `themeMode`, `primaryHue`, `primarySaturation`, `backgroundType`, `locale` nullable fields to User model
- Preferences API at `/api/users/me/preferences` — GET returns preferences, PATCH updates subset
- Settings page at `/settings` with `ThemeCustomizer.svelte` — hue/saturation sliders, mode toggle (dark/light/system), background selector, locale picker, save button
- Theme store `loadFromServer(prefs)` method applies server preferences over localStorage defaults
- `+layout.server.ts` passes `userPreferences` in layout data; `+layout.svelte` applies them on mount
- Header user menu includes "Settings" link
- i18n keys: `settings.title`, `settings.theme`, `settings.primary_color`, `settings.hue`, `settings.saturation`, `settings.background`, `settings.language`, `settings.save`, `settings.saving`, `settings.saved` (EN/RU)
### Phase 7 (Integration & Polish) Summary
- Prisma client regenerated with user preference fields
- Fixed lint errors: SvelteSet for reactive Set in DiscoveryPanel, `{#each}` keys in DiscoveryPanel/SparklineChart, unused vars in ThemeCustomizer/AppWidget
- 46 new tests: exportService (4), importService (9), discoveryService (10), preferences API (11), quick-add API (8), broadcastSync (4)
- Seed script updated: user preferences on admin/regular user, quick-add style Wiki.js app
- Final state: 222 tests, 0 build errors, 0 type errors, 0 lint errors
## Cross-Phase Dependencies
- Phases 1-3 are independent (import/export, sparklines, user themes)
- Phase 4 (PWA) is independent
- Phase 5 (auto-discovery) is independent
- Phase 6 (bookmarklet/sync) depends on existing API
- Phase 7 (integration) depends on all prior phases