A SvelteKit 5 frontend for e!DAL (Electronic Data Archive Library, IPK Gatersleben), used to publish plant genomics/phenomics datasets with DOIs.
It has two main features:
- Faceted search (
/search) — a UI over the existing e!DAL search REST API, for browsing and filtering published datasets. - Submission wizard (
/submit) — a multi-step, config-driven flow that authenticates via OIDC (AAI) and uploads dataset files/metadata to the e!DAL submission backend.
- Node.js 22+
- pnpm (see
pnpm-lock.yaml/pnpm-workspace.yamlfor the pinned package manager)
pnpm installbetter-sqlite3, esbuild, and @tailwindcss/oxide are native/build-script dependencies pnpm blocks by default — approve them once after a fresh install:
pnpm approve-buildsCopy the env template and point it at a local SQLite file:
cp .env.example .envApply the Drizzle migrations to create the submissions/scorpion tables in that SQLite file:
pnpm db:migrateThen start the dev server:
pnpm dev
# or start the server and open the app in a new browser tab
pnpm dev -- --open| Command | Description |
|---|---|
pnpm dev |
Start the Vite dev server |
pnpm build |
Production build |
pnpm preview |
Preview a production build |
pnpm check |
Sync SvelteKit types and run svelte-check (TS/Svelte type checking) |
pnpm check:watch |
Same as check, in watch mode |
pnpm lint |
prettier --check . followed by eslint . |
pnpm format |
prettier --write . |
pnpm db:push |
Push the Drizzle schema directly to the local SQLite DB |
pnpm db:generate |
Generate a Drizzle migration from schema changes |
pnpm db:migrate |
Apply Drizzle migrations |
pnpm db:studio |
Open Drizzle Studio against the local DB |
There is no test runner configured in this repo, and no separate pnpm typecheck — use pnpm check.
/submitwizard is driven bysrc/lib/config/steps.jsonand JSON Schemas undersrc/lib/config/schemas/, rather than hardcoded per-step components.src/lib/stores/dataset.tsholds the in-progress submission as a Svelte store;Questionnaire.svelteorchestrates steps, fields, and validation.- Auth (
src/lib/js/oidc.ts) implements OIDC Authorization Code + PKCE against the AAI endpoint insrc/lib/config/general.json. Tokens live inlocalStorage— there's no server session. - Local tracking DB:
src/routes/+server.tsandsrc/routes/submit/+server.tsare SvelteKit endpoints backed by a local SQLite file via Drizzle ORM (src/lib/server/db/), used for submission tracking and scorpion analytics API tokens. /searchtalks directly (client-side) to the external e!DAL search REST API — its state lives in a plainpayloadobject, not a store.
See CLAUDE.md for a more detailed architecture walkthrough.
A Containerfile builds a production image (Node 22 Alpine, adapter-node) in three stages: dependencies, build, and a minimal runtime. Build and run with Podman or Docker:
podman build -t edal-web .
podman run -p 3000:3000 -e DATABASE_URL=/data/local.db -v ./data:/data edal-webThe scorpion analytics API token can be seeded into the local DB with insert-scorpion-token.js:
SCORPION_TOKEN=... DATABASE_URL=local.db node insert-scorpion-token.js