The card dialog has a dashboard field. Settings orders the dashboards with arrows. The link dialog offers the images that were uploaded before.
7.6 KiB
7.6 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 (
postgresdriver), 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
- Auth —
/loginwith sign in / sign up tabs and a "Continue with SSO" button (only shown when OIDC env is set)./redirects to/loginwithout a session.DISABLE_SIGNUP=truecloses registration. - 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. - 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. - Search
- Engine per user: DuckDuckGo, SearXNG (when
SEARXNG_URLis set), Google. - Live suggestions proxied through the server (DuckDuckGo
/ac, SearXNG/autocompleter). - DuckDuckGo
!bangsalways route through DuckDuckGo. /focuses the bar;/textfilters links and commands (add link, settings, sign out).
- Engine per user: DuckDuckGo, SearXNG (when
- 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 (saveSettingstakes a patch). - 10. Cards: table
card,link.cardId+link.position(replacespinnedand the "Everything else" section; migration0001_cardsmoves existing links into cards). Links are dragged inside and between cards with dnd-kit (src/components/card-grid.tsx, layout logic and its test insrc/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. - 13. Dashboards: table
dashboard,card.dashboardId,settings.defaultDashboardId(migration0006_dashboards_iconsputs the existing cards on a dashboard "Home")./?d=<id>opens one,/the default. Switcher in the header, managed in Settings → Dashboards. - 14. Icons: the link dialog searches dashboard-icons (
src/lib/icons.tsand its test) and uploads custom icons (tableicon,/api/icon, ≤ 1 MB, SVG allowed because it is served sandboxed).src/lib/upload.tsholds the upload checks that wallpaper and icons share. - 15. A wallpaper per dashboard:
wallpaperUrlandwallpaperDimmove fromsettingstodashboard, thewallpapertable is keyed by dashboard (migration0007_dashboard_wallpapercopies what each user had to all their dashboards)./settings?d=<id>is the dashboard whose wallpaper is shown, and where "Back to dashboard" goes. - 16. Cards are dragged by their title bar:
card.position(migration0008_card_position),saveLayout(wasmoveLinks) stores the order of the cards and of their links. - 17. Password change in Settings → Account (Better Auth
changePassword, other sessions are revoked). Hidden for accounts without a password (SSO only). - 18. The search bar opens links by name:
matchLinksinsrc/lib/search.ts. A link whose name or a word of it starts with the text is preselected, Enter opens it. - 19. Light icons: a link without an icon of its own uses the library's
-lightversion when there is one. The server keeps the library's names for a day (src/lib/icon-library.ts) and sendslightIconwith each link. - 20. Status dots:
STATUS_CHECKS=trueturns them on (src/lib/status.ts,getStatuses). Off by default, because the server then requests addresses that users chose. - 21. Export and import:
exportData/importData, the file format and the bookmarks parser insrc/lib/transfer.ts. An import only adds dashboards. - 22. Cards move to another dashboard in the card dialog, dashboards are ordered with arrows
in Settings (
dashboard.position, migration0009_dashboard_position), uploaded icons are offered again in the link dialog (getIcons).
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)
- Free placement of cards with gaps in the grid, per-user SearXNG URL (SSRF risk — it is a server env)
- Per dashboard clock or search engine (they stay per user), remembering the last opened dashboard (it would work against the default dashboard, which opens)
- Links of other dashboards in the search bar, a keyword per link, a status history or alerts
- Info pills (Sonarr, SABnzbd, server status) and a Home Assistant card: each needs its own integration and an API key on the server
- 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)