No description
  • TypeScript 69.6%
  • Svelte 27.3%
  • Shell 1.4%
  • CSS 1.3%
  • JavaScript 0.3%
Find a file
Duke Jones 46767a462a docs: record zine.identikey.io Mjolnir VM and restore path
The public host is a persistent VM, not mj deploy. Capture id, ticket,
gateway alias, and the trash-restore + secrets-inject recovery so the
next outage is a restore instead of a DNS hunt.
2026-09-10 19:49:24 -07:00
.beads bd: update sync.remote 2026-08-24 12:12:24 -07:00
.claude Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
.vscode Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
content compress the gateway image 2026-06-30 02:52:10 -07:00
docs docs(strategy): add strategy folder with positioning analysis 2026-07-02 16:57:23 -07:00
drizzle feat(news): track dry-run vs real sends + guard against duplicate broadcasts 2026-06-29 18:46:30 -07:00
scripts feat(ops): inject Beehiiv publication id + enable sync poller on mjolnir 2026-06-26 17:46:19 -07:00
src fix(api): gate privileged endpoints at the API, not just the admin pages 2026-08-13 21:27:05 -07:00
static compress the gateway image 2026-06-30 02:52:10 -07:00
.env.example feat(beehiiv): additive-only sync mode + harden refresh timeout + guard docs 2026-06-26 17:41:35 -07:00
.gitignore build(assets): commit thenewsletter PSD layers so deploy has newsletter images 2026-06-24 09:04:25 -07:00
.mcp.json Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
.npmrc Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
.prettierignore PSD inspector: parser pipeline, persistence, API, zine dashboard, static export 2026-06-11 14:05:50 -07:00
.prettierrc Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
AGENTS.md Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
bun.lock feat(news): live SES feedback loop via SNS→SQS poller (no public endpoint) 2026-06-21 20:38:34 -07:00
CLAUDE.md docs: record zine.identikey.io Mjolnir VM and restore path 2026-09-10 19:49:24 -07:00
drizzle.config.ts Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
eslint.config.js Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
package.json feat(news): committable seed for the reusable "test" recipient list 2026-06-25 11:11:14 -07:00
playwright.config.ts PSD inspector: parser pipeline, persistence, API, zine dashboard, static export 2026-06-11 14:05:50 -07:00
README.md PSD inspector: parser pipeline, persistence, API, zine dashboard, static export 2026-06-11 14:05:50 -07:00
svelte.config.js fix(build): move prerender handleHttpError into vite.config (svelte.config ignored) 2026-06-23 23:12:19 -07:00
tsconfig.json Initial commit: SvelteKit + ElysiaJS with end-to-end Eden Treaty types 2026-06-11 12:37:09 -07:00
vite.config.ts fix(test): isolate server specs from the real local.db 2026-06-26 15:57:03 -07:00

procreateParse

PSD inspector: parses Photoshop files into a layer inventory (every attribute we can glean — bounds, opacity, blend modes, masks, text content & fonts, effects), stores them in SQLite, and presents them as a zine/poster-styled dashboard. SvelteKit + ElysiaJS with end-to-end type safety via Eden Treaty, Drizzle ORM, Tailwind. Runs on bun.

PSD pipeline

bun run psd:parse <file.psd> --out .artifacts/<name>.json   # parse → versioned JSON artifact
bun run psd:thumbs <file.psd>                               # render layer thumbnails + composite → static/psd/<slug>/
bun run psd:ingest .artifacts/<name>.json                   # upsert into sqlite (idempotent by slug)

Then browse:

  • /psd — ingested documents (zine table of contents)
  • /psd/<slug> — the dashboard: masthead stats, layer tree, per-layer detail via ?layer=<n>
  • /styleguide — the zine design system, every component in every state
  • /export/<slug> — pure HTML+CSS rendition (prerendered, csr=false)

Static export (→ identikey-website)

bun run export:static      # build + assemble self-contained bundle into dist-export/<slug>/
bun run export:identikey   # same, but copies into ~/work/IdentiKey/identikey-website/static/psd/<slug>/

The bundle is a single index.html (CSS inlined, zero <script> tags, relative ./assets/ refs) plus thumbnails — portable to any static host or SvelteKit static/ dir at any path depth. The script self-verifies (no _app refs, all assets present) and is idempotent.

Architecture

The backend is a single Elysia app mounted into SvelteKit's router; the frontend consumes it through a fully typed Eden Treaty client — request/response types flow from the server schemas to the client with no codegen.

scripts/
  parse-psd.ts                  # bun CLI: psd → JSON artifact
  render-thumbs.ts              # bun CLI: psd → layer/composite PNGs
  ingest-psd.ts                 # bun CLI: artifact → sqlite (bun:sqlite)
  export-static.ts              # build + assemble portable static bundle
  make-fixture-psd.ts           # regenerates the tiny test fixture .psd
src/
  lib/
    api.ts                      # Eden Treaty client (createApi / api)
    ui/                         # zine design system (Masthead, TornCard, Stamp, …)
    server/
      api/
        index.ts                # Elysia app (prefix /api), exports App type
        routes/{tasks,psd}.ts   # resource plugins (typebox-validated)
        *.spec.ts               # unit tests via treaty(app), no HTTP server
      db/                       # drizzle client + schema (task, psd_document, psd_layer)
      psd/                      # extract.ts: ag-psd → typed LayerInfo[] (+ fixture & spec)
  routes/
    api/[...slugs]/+server.ts   # mounts the Elysia app (fallback → app.handle)
    psd/                        # dashboard routes (+ colocated *.e2e.ts smoke specs)
    export/[slug]/              # prerendered static rendition (csr=false)
    styleguide/                 # design-system showcase
drizzle/                        # SQL migrations (committed)
docs/                           # design-direction.md, testing.md

Every UI route ships a colocated *.e2e.ts playwright smoke spec (page loads, key landmarks, zero console errors, state variants) — see docs/testing.md.

Adding an endpoint: create a plugin in src/lib/server/api/routes/, .use() it in src/lib/server/api/index.ts, and the typed client picks it up automatically.

Developing

bun install
bun run db:migrate   # apply migrations to local.db (DATABASE_URL in .env)
bun run dev

Database

Migrations only — drizzle-kit push is intentionally not wired up.

bun run db:generate  # after editing src/lib/server/db/schema.ts
bun run db:migrate
bun run db:studio

Testing & quality

bun run test:unit    # vitest (client browser project + server project)
bun run test:e2e     # playwright
bun run check        # svelte-check
bun run lint         # prettier + eslint

Building

bun run build        # adapter-node
bun run preview