Documentation
Guides and references for the Apex dashboard.
Apex Svelte v1.3.2 uses SvelteKit 3. Get a local instance running in three steps.
- 1
npm ciInstall dependencies from the project root.
- 2
npm run devStart the SvelteKit dev server on localhost:5173.
- 3
npm run buildCreate an optimized production build.
Getting Started
Install, configure, and run the dashboard.
Folder Structure
How routes, lib, and components are organized.
Components
The vendored shadcn-svelte primitive library.
Theming
OKLCh tokens, dark mode, and customization.
Charts
Building area, bar, and donut charts with LayerChart.
i18n
Locale context, message files, and translations.
Storybook
Developing components in isolation with stories.
Testing
Route and interaction checks with Playwright.
Deployment
Adapters, environment config, and going live.
Getting Started
Use Node.js 22.17+ and npm 11.21.2. Run npm ci, npm run dev, and npm run check. The dashboard uses demo data; connect authentication, forms, and commerce actions to your backend before production use.
Folder Structure
Pages live in src/routes/(dashboard) and src/routes/(auth). Shared components, demo datasets, rune stores, and translations live in src/lib. Put public assets in static and browser regressions in e2e.
Components
Reuse src/lib/components/ui primitives and shared PageHeader/StatCard components. Import through #lib; TypeScript module imports use .js extensions. Keep Svelte 5 runes and accessible labels consistent with existing components.
Theming
Edit semantic OKLCh tokens in src/app.css. The theme customizer and sidebar rune store control accent, radius, density, and layout. Use semantic Tailwind classes so light and dark themes stay consistent.
Charts
Follow src/lib/components/dashboard/revenue-chart.svelte and /charts for LayerChart examples. Give responsive chart containers a bounded height and test them at mobile widths.
i18n
Add matching keys to src/lib/i18n/messages.ts and read them through the rune-based i18n store. English, German, and French cover dashboard chrome; page-body translations remain an extension point.
Storybook
Run npm run storybook on port 6006 or npm run build-storybook. Keep .stories.svelte examples beside components; .storybook config supplies the shared Tailwind styles.
Testing
Run npm run check, npm run build-storybook, then npx playwright install chromium and npm run test:e2e. Tests cover all 39 demo pages, navigation, dark mode, documentation anchors, and mobile layout. CI repeats browser checks under DEMO_BASE=/apex-svelte.
Deployment
Run npm run build:static for Cloudflare Pages; upload build/ to the existing apex-dashboard-svelte project. Set DEMO_BASE before building for subpath hosting. /api/health reports version and GITHUB_SHA. Preserve the host-aware Pages middleware when deploying.
Need help?
Can't find what you're looking for? Our support team is here to help.