Files
dahoam/PLAN.md
T
Niklas Haiden 8df74a849c
images / check (push) Successful in 27s
images / image (push) Successful in 32s
feat: Dahoam start page with accounts, cards and search
Replica of the reference start page: wallpaper, serif clock, search bar
and link cards, as a TanStack Start app.

- Better Auth: email/password and OIDC single sign-on
- Postgres with Drizzle for the auth tables, cards, links, settings and
  uploaded wallpapers; the server applies the migrations on start
- cards group links; links are dragged inside and between cards
- search with DuckDuckGo, SearXNG or Google, suggestions and / commands
- settings page: name, search engine, wallpaper, account
- UI from collabry-components, copied into src/vendor/collabry
- Dockerfile and a Gitea workflow that checks the code, builds the image
  for amd64 and arm64 and pushes it to the registry on main
2026-11-18 00:09:19 +01:00

5.1 KiB

Dahoam — Plan

Replica of the reference start page (wallpaper, big serif clock, search bar, app-icon row, "Everything else"), as a TanStack Start app with accounts.

Reference: https://pbs.twimg.com/media/HXSYNQ6XcAER0k9?format=jpg&name=4096x4096

Stack

  • TanStack Start (React 19, Vite 8), Tailwind 4
  • UI: collabry-components copied into src/vendor/collabry (replaced the scaffolded shadcn radix-nova set)
  • Better Auth 1.7 — email/password + SSO (generic OIDC), Drizzle adapter
  • Postgres 17 + Drizzle ORM (postgres driver), migrations via drizzle-kit
  • Nitro (nitro/vite) for the production Node server

Data model (src/db/schema.ts)

Table Columns
user, session, account, verification Better Auth core tables
link id, userId → user, name, url, icon (URL or dashboard-icons slug, optional), pinned, createdAt
settings userId (PK) → user, title, searchEngine (duckduckgo | searxng | google), wallpaperUrl
wallpaper userId (PK) → user, mime, data (bytea)

Every row is scoped to its owner; all server functions check the session.

Features

  1. Auth — /login with sign in / sign up tabs and a "Continue with SSO" button (only shown when OIDC env is set). / redirects to /login without a session. DISABLE_SIGNUP=true closes registration.
  2. Dashboard (/) — date, live clock, glass search bar, pinned links row, "Everything else" section (unpinned links) below the fold, top bar with title, add (+) and settings buttons, wallpaper credit + edit pencil.
  3. Home links — add / edit / delete in a dialog (right-click or hover pencil on a tile to edit). Icon fallback chain: custom icon → dashboard-icons by name → site /favicon.ico → letter.
  4. Search
    • Engine per user: DuckDuckGo, SearXNG (when SEARXNG_URL is set), Google.
    • Live suggestions proxied through the server (DuckDuckGo /ac, SearXNG /autocompleter).
    • DuckDuckGo !bangs always route through DuckDuckGo.
    • / focuses the bar; /text filters links and commands (add link, settings, sign out).
  5. Wallpaper — paste an image URL or upload a file (stored in Postgres, served from /api/wallpaper, ≤ 10 MB, jpeg/png/webp/avif). Reset to default. Dither + vignette overlay like the reference.

Files

docker-compose.yml          Postgres for local dev
drizzle.config.ts
.env.example
src/db/{index,schema}.ts
src/lib/auth.ts             Better Auth server config
src/lib/auth-client.ts
src/lib/auth.functions.ts   getSession / ensureSession / authInfo
src/lib/dashboard.functions.ts  links, settings, suggestions
src/lib/search.ts           search URL builder (+ test)
src/routes/api/auth/$.ts
src/routes/api/wallpaper.ts
src/routes/login.tsx
src/routes/index.tsx
src/routes/settings.tsx
src/components/{clock,search-bar,link-tile,link-dialog,glass,wallpaper}.tsx
src/vendor/collabry/        copied Collabry components (do not edit)
scripts/sync-collabry.sh    copies them from upstream at a pinned commit

Steps

  • 1. Deps, docker-compose, env, Drizzle schema + first migration
  • 2. Better Auth (server, client, handler route, session helpers)
  • 3. Server functions: links, settings, suggestions; wallpaper route
  • 4. UI: login, dashboard, dialogs, search bar
  • 5. Verify: typecheck, lint, build, end-to-end against real Postgres, screenshot vs reference
  • 6. Independent review (subagent), fix findings, README
  • 7. Blurred card behind the top-row icons
  • 8. Collabry components: Button, Card, Field, Input, Checkbox, SegmentedControl, Dialog, Kbd, ThemeProvider. Kept: wallpaper, serif clock, glass panels, Inter. Accent is near white.
  • 9. Settings page (/settings) replaces the settings dialog: General, Search, Wallpaper, Account. Each setting saves on its own (saveSettings takes a patch).
  • 10. Cards: table card, link.cardId + link.position (replaces pinned and the "Everything else" section; migration 0001_cards moves existing links into cards). Links are dragged inside and between cards with dnd-kit (src/components/card-grid.tsx, layout logic and its test in src/lib/layout.ts).
  • 11. Image and CI: Dockerfile (multi-arch without emulation), .gitea/workflows/images.yml (check, build, push to the Harbor registry on main, as in typst-workspace). The server applies the migrations on start (src/db/index.ts).
  • 12. Renamed from "Home Dashboard" to Dahoam (slug dahoam): package, compose project, tab title, default dashboard name, docs, CI examples.

Not doing (not asked)

  • Unraid version/uptime chip and the Sonarr/Plex notification pills from the screenshot
  • Inline SearXNG result rendering (search opens the engine's result page)
  • Reordering the cards themselves (they stay in the order they were made), free placement with gaps in the grid, per-user SearXNG URL (SSRF risk — it is a server env)
  • Email verification / password reset mail (needs an SMTP setup)
  • In CI: version tags and releases, a Helm chart, an image vulnerability scan (typst-workspace has all three)