v2: rewrite on Hono + SQLite with user namespaces

Replaces the Next.js/Prisma/next-auth app with a single-container
Hono server, SQLite via Drizzle, OIDC login against Authentik and a
React/Vite admin UI that talks to a JSON API.

- users get /<username>/<code>, admins (Authentik group) get root
  codes, pinning and full access
- link pages with link and Markdown text blocks, themes, avatars
- editable 302 redirects, random or custom codes
- personal API tokens, CSRF-protected cookie sessions
- privacy-friendly stats: daily-rotating visitor salt, 90-day click
  retention with daily totals kept
- QR codes as PNG/SVG
- tests for permissions, auth, redirects and stats; CI runs them
  before publishing images

See REQUIREMENTS.md for the full requirement list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 13:57:47 +02:00
co-authored by Claude Opus 5.5
parent 9758f4bf45
commit b217214512
108 changed files with 6942 additions and 9862 deletions
+46 -27
View File
@@ -1,36 +1,55 @@
{
"name": "short",
"version": "0.1.0",
"version": "2.0.0",
"private": true,
"type": "module",
"engines": {
"node": ">=22"
},
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint"
"dev": "concurrently -n server,web \"pnpm dev:server\" \"pnpm dev:web\"",
"dev:server": "tsx watch --env-file-if-exists=.env src/server/index.tsx",
"dev:web": "vite",
"build": "pnpm build:web && pnpm build:server",
"build:web": "vite build",
"build:server": "tsc -p tsconfig.server.json",
"start": "node dist/server/index.js",
"typecheck": "tsc -p tsconfig.server.json --noEmit && tsc -p tsconfig.web.json --noEmit",
"test": "vitest run",
"db:generate": "drizzle-kit generate"
},
"dependencies": {
"@hello-pangea/dnd": "^18.0.1",
"@heroicons/react": "^2.2.0",
"@prisma/client": "^6.5.0",
"js-sha256": "^0.11.0",
"next": "^15.2.4",
"next-auth": "^5.0.0-beta.25",
"next-qrcode": "^2.5.1",
"react-hot-toast": "^2.5.2",
"recharts": "^2.15.1",
"ua-parser-js": "^2.0.3",
"zod": "^3.22.4"
"@hono/node-server": "^2.1.5",
"better-sqlite3": "^13.0.3",
"drizzle-orm": "^0.45.4",
"hono": "^4.13.13",
"markdown-it": "^15.0.2",
"openid-client": "^6.8.8",
"zod": "^4.6.7"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.0.17",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"postcss": "^8.5.3",
"prisma": "^6.5.0",
"tailwindcss": "^4.0.17",
"typescript": "^5"
}
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@tailwindcss/vite": "^4.3.3",
"@types/better-sqlite3": "^9.6.0",
"@types/markdown-it": "^14.2.0",
"@types/node": "^24.19.2",
"@types/qrcode": "^1.5.6",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.2",
"concurrently": "^10.0.6",
"drizzle-kit": "^0.31.11",
"qrcode": "^1.5.4",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"tailwindcss": "^4.3.3",
"tsx": "^4.23.15",
"typescript": "^7.0.2",
"uplot": "^1.6.32",
"vite": "^8.3.4",
"vitest": "^5.0.4"
},
"packageManager": "pnpm@11.28.5"
}