feat(selfhost): migrate to self-hosted Hetzner (Vercel/Neon/Supabase exit 2026-06-12)

Standalone output, portable Postgres driver, proxy-aware fixes as needed.
Runbook: fleetcrown/docs/infrastructure/hetzner-migration.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Mao NakamotoandClaude Fable 5 committed 2026-06-12 19:48:13 +02:00
1 parent 03981e7326
commit 94882211f2
10 files changed
+481 -93

No files matched your search

+115
View File
@@ -3,3 +3,118 @@
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
<!-- END:nextjs-agent-rules -->
## Design System
**Tailwind version:** v4. No `tailwind.config.*` file exists. Tailwind is loaded via `@import "tailwindcss"` in `app/globals.css`. There is no `@theme` block. All design tokens are `:root` CSS custom properties in `globals.css`. Do not create a `tailwind.config.*` file.
**JS token file:** `lib/config/design-tokens.ts` exports `TOKENS` — a `const` object with hex values for use in Recharts SVG attributes and Satori OG images (contexts that cannot read CSS vars). Keep in sync with `globals.css` manually. Do NOT use `TOKENS` in JSX classNames.
### CSS Custom Properties (`app/globals.css` `:root`)
**Brand — deep forest teal:**
```
--teal: #0D6E78
--teal-dark: #0A5860
--teal-light: #E3F4F6
--teal-mid: #B2DDE2
--teal-wash: #f0fafb
```
**Accent — warm terracotta (all primary CTAs):**
```
--accent: #B8502A (WCAG AA 4.5:1 on white)
--accent-dark: #9E4220
--accent-light: #FEF0E8
```
**Text:**
```
--ink: #1C1917
--ink2: #44403C
--muted: #78716C
--faint: #C4BBB3
```
**Backgrounds:**
```
--off: #FAF8F5
--light: #F0EBE3
--card: #FFFFFF
--border: #E8E2D9
--border-hover: #d4cdc5
--off-bg: var(--off) (legacy alias)
```
**State colors:**
```
--green: #16A34A --green-bg: #DCFCE7 --green-text: #166534 --green-border: #bbf7d0
--warn: #D97706 --warn-bg: #FEF3C7 --warn-text: #92400E --warn-border: #fde68a
--danger: #DC2626 --danger-bg: #FEE2E2 --danger-text: #991B1B --danger-dark: #B91C1C --danger-border: #fca5a5
```
**Role badges:**
```
--role-vet-bg: #EFF6FF --role-vet: #1D4ED8
--role-sitter-bg: #FFFBEB --role-sitter: #92400E
--role-admin-bg: #F3E8FF --role-admin: #6B21A8
```
**Additional palettes:**
```
--secondary: #EC4899 --secondary-dark: #BE185D --secondary-bg: #FDF2F8
--info: #2563EB --info-bg: #EFF6FF
--twin: #7C3AED --twin-bg: #EDE9FE
--warm-bg: #FFFBEB --warm-text: #B45309
--star: #FBBF24
```
**Shadows:**
```
--shadow-sm --shadow-md --shadow-lg
--brand-shadow --secondary-shadow --cta-shadow --tooltip-shadow
```
### Semantic CSS Classes (defined in `globals.css` — use these, not arbitrary Tailwind values)
| Class | Purpose |
|-------|---------|
| `.card` | White card, `--border`, 16px radius, `--shadow-sm` |
| `.card-hover` | Hover: `--shadow-md` + `--border-hover` |
| `.btn-primary` | Terracotta fill, white text, 10px radius |
| `.btn-outline` | Transparent, `--ink2` text, border |
| `.btn-ghost` | Transparent, `--muted` text |
| `.btn-on-teal` | White fill for use on teal backgrounds |
| `.btn-on-teal-ghost` | White/10 fill for use on teal backgrounds |
| `.form-input` | Styled input with teal focus ring |
| `.signal-healthy` | `--green-bg` / `--green-text` pill badge |
| `.signal-watch` | `--warn-bg` / `--warn-text` pill badge |
| `.signal-concern` | `--danger-bg` / `--danger-text` pill badge |
| `.alert-error` | Error box |
| `.alert-success` | Success box |
| `.nav-link` | Base nav link |
| `.nav-link-active` | Active nav state |
| `.nav-link-inactive` | Default nav state |
| `.eyebrow-badge` | Teal pill for hero eyebrow labels |
| `.section-inner` | Max-width 1100px container |
| `.prose-legal` | Legal/terms long-form content styles |
### Typography
System font stack via `--font-sans`: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif.
### RTL Support
Arabic only. `dir="rtl"` injected by `app/[locale]/layout.tsx`. Use logical Tailwind props: `ms-*`, `me-*`, `ps-*`, `pe-*`. Never `ml-*`, `mr-*`, `pl-*`, `pr-*`. Use `.flip-rtl` for icons needing mirror.
### SSOT Rule
All design tokens live in `app/globals.css` only. Tailwind config MUST reference CSS vars (`'var(--name)'`), never literal values. Components MUST use semantic Tailwind classes, never arbitrary values like `bg-[#hex]`.
**Violations to fix when touching UI:**
- `bg-[#hex]` / `text-[#hex]` in className → CSS var + semantic class
- `style={{ color: '#hex' }}` → CSS var + className
- Literal hex in tailwind.config → `'var(--color-name)'`
- Same token defined in 2+ files → consolidate to globals.css
**Audit:** `grep -r '\[#' src/` — every result is a violation.
+162 -29
View File
@@ -253,43 +253,176 @@ lib/
## Design System
**Color variables (globals.css):**
**Tailwind version:** v4. No `tailwind.config.*` file — Tailwind is imported via `@import "tailwindcss"` in `app/globals.css`. All design tokens live in `:root` CSS custom properties in `globals.css`. There is no `@theme` block; arbitrary Tailwind values or `style={{}}` must be avoided — use semantic CSS classes defined in `globals.css` instead.
**JS token file:** `lib/config/design-tokens.ts` exports `TOKENS` (a `const` object) with hex values mirroring `globals.css`. Use only in JS rendering contexts that cannot read CSS vars (Recharts SVG attributes, Satori OG images). Values must stay in sync with `globals.css` manually — it is NOT auto-derived.
### CSS Custom Properties (`app/globals.css` `:root`)
**Brand — deep forest teal:**
```
--teal: #0D6E78 Brand (nav, links, focus rings, active states)
--teal-dark: #0A5860 Brand hover
--teal: #0D6E78 Brand (nav, links, focus rings, active states)
--teal-dark: #0A5860 Brand hover
--teal-light: #E3F4F6 Brand backgrounds, hover fills
--accent: #E06B3A Primary action buttons (Add, Save, Log today, Create account)
--accent-dark: #C85E30 Accent hover
--accent-light: #FEF0E8 Accent backgrounds
--off: #FAF8F5 Page background (warm cream)
--card: #FFFFFF Card background
--border: #E8E2D9 Default border
--ink: #1C1917 Primary text (warm charcoal)
--ink2: #44403C Secondary text
--muted: #78716C Placeholder/helper text
--faint: #C4BBB3 Disabled/decorative
--green: #16A34A Healthy signal, success
--warn: #D97706 Watch signal, warning
--danger: #DC2626 Concern signal, error
--teal-mid: #B2DDE2 Eyebrow badge border, teal mid-tint
--teal-wash: #f0fafb Hero gradient endpoint
```
**Utility classes (globals.css):**
- `.card` — white card with border + soft shadow + 16px radius
- `.btn-primary` — coral accent fill button (use for all primary actions)
- `.btn-outline` — bordered ghost button (use for secondary/cancel actions)
- `.btn-ghost` — transparent button for tertiary actions
- `.form-input` — styled input/select/textarea (focus ring = teal)
- `.alert-error` / `.alert-success` — inline feedback messages
- `.signal-healthy` / `.signal-watch` / `.signal-concern` — pill badges
**Accent — warm terracotta (all primary CTAs):**
```
--accent: #B8502A Primary action buttons (WCAG AA 4.5:1 on white)
--accent-dark: #9E4220 Accent hover
--accent-light: #FEF0E8 Accent backgrounds
```
**Navigation pattern:**
- Desktop: Fixed 240px left sidebar (`components/portal/SidebarNav.tsx` — client component)
- Mobile: Fixed top bar (h-14) + fixed bottom tab bar
**Text:**
```
--ink: #1C1917 Primary text (warm charcoal)
--ink2: #44403C Secondary text
--muted: #78716C Placeholder/helper text
--faint: #C4BBB3 Disabled/decorative
```
**Backgrounds:**
```
--off: #FAF8F5 Page background (warm cream)
--light: #F0EBE3 Light section backgrounds
--card: #FFFFFF Card background
--border: #E8E2D9 Default border
--border-hover: #d4cdc5 Hovered border
--off-bg: var(--off) Legacy alias for --off
```
**State colors:**
```
--green: #16A34A Healthy signal, success text
--green-bg: #DCFCE7 Success badge/alert background
--green-text: #166534 Success text on --green-bg (WCAG AA)
--green-border: #bbf7d0 Success card borders
--warn: #D97706 Watch signal, warning text
--warn-bg: #FEF3C7 Warning badge/alert background
--warn-text: #92400E Warning text on --warn-bg (WCAG AA)
--warn-border: #fde68a Warning card borders
--danger: #DC2626 Concern signal, error text
--danger-bg: #FEE2E2 Error badge/alert background
--danger-text: #991B1B Error text on --danger-bg (WCAG AA)
--danger-dark: #B91C1C Danger hover
--danger-border:#fca5a5 Error card borders
```
**Role badge colors:**
```
--role-vet-bg: #EFF6FF --role-vet: #1D4ED8
--role-sitter-bg: #FFFBEB --role-sitter: #92400E
--role-admin-bg: #F3E8FF --role-admin: #6B21A8
```
**Secondary palette (sitter / feminine brand):**
```
--secondary: #EC4899
--secondary-dark: #BE185D
--secondary-bg: #FDF2F8
```
**Info palette:**
```
--info: #2563EB
--info-bg: #EFF6FF
```
**Digital twin identity:**
```
--twin: #7C3AED
--twin-bg: #EDE9FE
```
**Warm bg/text (decorative icon backgrounds):**
```
--warm-bg: #FFFBEB
--warm-text: #B45309
```
**Star rating:**
```
--star: #FBBF24
```
**Shadows:**
```
--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05)
--shadow-md: 0 4px 16px 0 rgb(0 0 0 / 0.07), 0 2px 6px -2px rgb(0 0 0 / 0.05)
--shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.10), 0 4px 12px -4px rgb(0 0 0 / 0.06)
--brand-shadow: 0 4px 12px rgb(13 110 120 / 0.25)
--secondary-shadow: 0 4px 12px rgb(236 72 153 / 0.25)
--cta-shadow: 0 4px 20px rgb(0 0 0 / 0.15)
--tooltip-shadow: 0 2px 8px rgb(0 0 0 / 0.08)
```
### Utility CSS Classes (defined in `globals.css`)
**Layout:**
- `.section-inner` — max-width 1100px, centered, 24px side padding
**Cards:**
- `.card` — white card, `--border` border, 16px radius, `--shadow-sm`
- `.card-hover` — hover: `--shadow-md` + `--border-hover`
**Buttons:**
- `.btn-primary` — terracotta fill (`--accent`), white text, 10px radius
- `.btn-outline` — transparent, `--ink2` text, `--border` border, hover: teal tint
- `.btn-ghost` — transparent, `--muted` text, hover: `--light` bg
- `.btn-on-teal` — white fill on teal backgrounds, `--teal` text
- `.btn-on-teal-ghost` — white/10 fill on teal backgrounds, white text
**Forms:**
- `.form-input` — full-width input, 10px radius, teal focus ring (`--teal-light`)
**Signal badges:**
- `.signal-healthy` — `--green-bg` / `--green-text` pill
- `.signal-watch` — `--warn-bg` / `--warn-text` pill
- `.signal-concern` — `--danger-bg` / `--danger-text` pill
**Alerts:**
- `.alert-error` — `--danger-bg` / `--danger-text`
- `.alert-success` — `--green-bg` / `--green-text`
**Navigation:**
- `.nav-link` — base nav link (flex, 12px radius)
- `.nav-link-active` — `--teal-light` bg, `--teal` text
- `.nav-link-inactive` — `--ink2`, hover: `--light` bg + `--ink` text
- `.nav-link-muted` — `--muted`, hover: `--light` bg
- `.nav-link-danger` — `--muted`, hover: `--danger-bg` + `--danger-text`
- `.mobile-tab-item` / `.mobile-tab-item-active` / `.mobile-tab-item-inactive`
**Other:**
- `.eyebrow-badge` — teal pill for hero eyebrow labels
- `.prose-legal` — styled legal/terms/privacy long-form content
### Navigation Pattern
- Desktop: fixed 240px left sidebar (`components/portal/SidebarNav.tsx` — client component)
- Mobile: fixed top bar (h-14) + fixed bottom tab bar
- Portal layout offsets: `lg:ps-60 pt-14 lg:pt-0 pb-20 lg:pb-0`
**Typography:** System font stack (Inter, -apple-system, BlinkMacSystemFont, Segoe UI)
### Typography
**RTL:** Arabic only. `app/[locale]/layout.tsx` injects `dir="rtl"`. Use `ms-*`/`me-*`/`ps-*`/`pe-*` Tailwind classes (logical props), NEVER `ml-*`/`mr-*`/`pl-*`/`pr-*`.
System font stack via `--font-sans`: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif.
### RTL
Arabic only. `app/[locale]/layout.tsx` injects `dir="rtl"`. Use `ms-*`/`me-*`/`ps-*`/`pe-*` Tailwind logical props. NEVER `ml-*`/`mr-*`/`pl-*`/`pr-*`. Use `.flip-rtl` class for icons that need mirroring.
### SSOT Rule
All design tokens live in `app/globals.css` only. There is no `tailwind.config.*` (Tailwind v4). Components MUST use semantic CSS classes from `globals.css` or standard Tailwind utilities, never arbitrary values like `bg-[#hex]`.
**Violations to fix when touching UI:**
- `bg-[#hex]` / `text-[#hex]` in className → CSS var + semantic class
- `style={{ color: '#hex' }}` → CSS var + className
- Same token defined in 2+ files → consolidate to globals.css
- Hex values in `lib/config/design-tokens.ts` diverging from `globals.css` → sync them
**Audit:** `grep -r '\[#' src/` — every result is a violation.
---
+12 -34
View File
@@ -1,4 +1,4 @@
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { describe, it, expect, vi, beforeEach } from "vitest";
import { NextRequest, NextResponse } from "next/server";
import { makeMockDb } from "@/lib/test-helpers/db-mock";
@@ -6,8 +6,8 @@ import { makeMockDb } from "@/lib/test-helpers/db-mock";
vi.mock("@/lib/auth/guards", () => ({ requireSession: vi.fn() }));
vi.mock("@/lib/db", () => ({ getInstance: vi.fn() }));
vi.mock("@vercel/blob", () => ({
put: vi.fn().mockResolvedValue({ url: "https://blob.example.com/pets/pet-1/avatar-abc123.jpg" }),
vi.mock("@/lib/storage", () => ({
putLocal: vi.fn().mockResolvedValue({ url: "/uploads/pets/pet-1/avatar-abc123" }),
}));
/* ─── Imports after mocks ──────────────────────────────────────────────────── */
@@ -15,7 +15,7 @@ vi.mock("@vercel/blob", () => ({
import { POST } from "./route";
import { requireSession } from "@/lib/auth/guards";
import { getInstance } from "@/lib/db";
import { put } from "@vercel/blob";
import { putLocal } from "@/lib/storage";
/* ─── Helpers ──────────────────────────────────────────────────────────────── */
@@ -43,8 +43,6 @@ function makeFormRequest(hasFile: boolean) {
/* ─── Tests ──────────────────────────────────────────────────────────────── */
const ORIGINAL_BLOB_TOKEN = process.env.BLOB_READ_WRITE_TOKEN;
describe("POST /api/pets/[petId]/avatar", () => {
let db: ReturnType<typeof makeMockDb>;
@@ -53,14 +51,6 @@ describe("POST /api/pets/[petId]/avatar", () => {
db = makeMockDb();
vi.mocked(getInstance).mockReturnValue(db as any);
vi.mocked(requireSession).mockResolvedValue({ session: OWNER_SESSION as any, error: null });
// Token must be set for the route to reach the upload path; individual tests
// override this to verify the missing-token branch.
process.env.BLOB_READ_WRITE_TOKEN = "test-token";
});
afterEach(() => {
if (ORIGINAL_BLOB_TOKEN === undefined) delete process.env.BLOB_READ_WRITE_TOKEN;
else process.env.BLOB_READ_WRITE_TOKEN = ORIGINAL_BLOB_TOKEN;
});
it("returns 401 when unauthenticated", async () => {
@@ -95,17 +85,6 @@ describe("POST /api/pets/[petId]/avatar", () => {
expect(body.error).toContain("file");
});
it("returns 503 when BLOB_READ_WRITE_TOKEN is not configured", async () => {
delete process.env.BLOB_READ_WRITE_TOKEN;
const res = await POST(makeFormRequest(true), ROUTE_CONTEXT);
expect(res.status).toBe(503);
const body = await res.json();
expect(body.error).toMatch(/aren't configured/);
// Must short-circuit before any DB or Blob work
expect(db.query.pets.findFirst).not.toHaveBeenCalled();
expect(vi.mocked(put)).not.toHaveBeenCalled();
});
it("returns 413 when the uploaded file exceeds the size cap", async () => {
db.query.pets.findFirst.mockResolvedValueOnce(MOCK_PET);
const huge = new File(["x".repeat(6 * 1024 * 1024)], "big.jpg", { type: "image/jpeg" });
@@ -114,7 +93,7 @@ describe("POST /api/pets/[petId]/avatar", () => {
const req = new NextRequest(`http://localhost/api/pets/${PET_ID}/avatar`, { method: "POST", body: form });
const res = await POST(req, ROUTE_CONTEXT);
expect(res.status).toBe(413);
expect(vi.mocked(put)).not.toHaveBeenCalled();
expect(vi.mocked(putLocal)).not.toHaveBeenCalled();
});
it("returns 415 when the file type is not an accepted image format", async () => {
@@ -125,19 +104,19 @@ describe("POST /api/pets/[petId]/avatar", () => {
const req = new NextRequest(`http://localhost/api/pets/${PET_ID}/avatar`, { method: "POST", body: form });
const res = await POST(req, ROUTE_CONTEXT);
expect(res.status).toBe(415);
expect(vi.mocked(put)).not.toHaveBeenCalled();
expect(vi.mocked(putLocal)).not.toHaveBeenCalled();
});
it("returns 502 with a friendly message when the Blob upload throws", async () => {
it("returns 502 with a friendly message when the upload throws", async () => {
db.query.pets.findFirst.mockResolvedValueOnce(MOCK_PET);
vi.mocked(put).mockRejectedValueOnce(new Error("Blob service unavailable"));
vi.mocked(putLocal).mockRejectedValueOnce(new Error("disk full"));
const res = await POST(makeFormRequest(true), ROUTE_CONTEXT);
expect(res.status).toBe(502);
const body = await res.json();
expect(body.error).toMatch(/try again/i);
});
it("returns 200 with blob URL on success", async () => {
it("returns 200 with the stored URL on success", async () => {
db.query.pets.findFirst.mockResolvedValueOnce(MOCK_PET);
db.update.mockReturnValueOnce({ set: vi.fn().mockReturnValue({ where: vi.fn().mockResolvedValue([]) }) } as any);
@@ -145,11 +124,10 @@ describe("POST /api/pets/[petId]/avatar", () => {
expect(res.status).toBe(200);
const body = await res.json();
expect(body.success).toBe(true);
expect(body.data.url).toContain("blob.example.com");
expect(vi.mocked(put)).toHaveBeenCalledWith(
`pets/${PET_ID}/avatar`,
expect(body.data.url).toContain("/uploads/");
expect(vi.mocked(putLocal)).toHaveBeenCalledWith(
expect.stringMatching(new RegExp(`^pets/${PET_ID}/avatar-`)),
expect.any(File),
expect.objectContaining({ access: "public" }),
);
});
});
+5 -15
View File
@@ -1,5 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
import { put } from "@vercel/blob";
import { randomUUID } from "crypto";
import { putLocal } from "@/lib/storage";
import { and, eq } from "drizzle-orm";
import { getInstance } from "@/lib/db";
import { pets } from "@/lib/db/schema";
@@ -16,16 +17,6 @@ export async function POST(req: NextRequest, { params }: Params) {
const { session, error } = await requireSession();
if (error) return error;
// Fail fast (and helpfully) when the platform isn't configured for uploads.
// Without this, @vercel/blob throws an opaque error and the user sees a
// generic "Upload failed" with no recovery path.
if (!process.env.BLOB_READ_WRITE_TOKEN) {
return NextResponse.json(
{ success: false, error: "Photo uploads aren't configured for this deployment yet." },
{ status: 503 },
);
}
const { petId } = await params;
const db = getInstance();
@@ -62,10 +53,9 @@ export async function POST(req: NextRequest, { params }: Params) {
let blob;
try {
blob = await put(`pets/${petId}/avatar`, file, {
access: "public",
addRandomSuffix: true,
});
// Random suffix keeps old avatar URLs valid until the row is updated
// (same behavior addRandomSuffix gave us on Vercel Blob).
blob = await putLocal(`pets/${petId}/avatar-${randomUUID()}`, file);
} catch (err) {
console.error("[avatar] upload failed", err);
return NextResponse.json(
+4 -4
View File
@@ -1,8 +1,8 @@
import { neon } from "@neondatabase/serverless";
import { drizzle } from "drizzle-orm/neon-http";
import { Pool } from "pg";
import { drizzle } from "drizzle-orm/node-postgres";
import * as schema from "./schema";
// Lazy singleton — neon() is not called at module load time so Next.js build
// Lazy singleton — the Pool is not created at module load time so Next.js build
// analysis doesn't throw when DATABASE_URL is absent in the build environment.
type DbInstance = ReturnType<typeof drizzle<typeof schema>>;
let _instance: DbInstance | undefined;
@@ -11,7 +11,7 @@ export function getInstance(): DbInstance {
if (!_instance) {
const url = process.env.DATABASE_URL;
if (!url) throw new Error("DATABASE_URL environment variable is not set");
_instance = drizzle(neon(url), { schema });
_instance = drizzle(new Pool({ connectionString: url }), { schema });
}
return _instance;
}
+28
View File
@@ -0,0 +1,28 @@
import { mkdir, writeFile, unlink } from "fs/promises";
import path from "path";
// Local-disk file storage (replaces @vercel/blob on the self-hosted box).
// Files land in UPLOADS_DIR (Caddy serves them under /uploads/*); the
// returned URL is root-relative so it works behind any domain.
const UPLOADS_DIR = process.env.UPLOADS_DIR || path.join(process.cwd(), "uploads");
function safeKey(key: string): string {
const clean = path.posix.normalize(key).replace(/^(\.\.\/?)+/, "").replace(/^\/+/, "");
if (clean.includes("..")) throw new Error("invalid storage key");
return clean;
}
export async function putLocal(key: string, file: File | Buffer): Promise<{ url: string }> {
const k = safeKey(key);
const dest = path.join(UPLOADS_DIR, k);
await mkdir(path.dirname(dest), { recursive: true });
const data = Buffer.isBuffer(file) ? file : Buffer.from(await file.arrayBuffer());
await writeFile(dest, data);
return { url: `/uploads/${k}` };
}
export async function delLocal(url: string): Promise<void> {
if (!url.startsWith("/uploads/")) return;
const k = safeKey(url.slice("/uploads/".length));
await unlink(path.join(UPLOADS_DIR, k)).catch(() => {});
}
+4 -1
View File
@@ -3,6 +3,9 @@ import createNextIntlPlugin from "next-intl/plugin";
const withNextIntl = createNextIntlPlugin("./i18n/request.ts");
const nextConfig: NextConfig = {};
const nextConfig: NextConfig = {
output: "standalone",
serverExternalPackages: ["pg"],
};
export default withNextIntl(nextConfig);
+12
View File
@@ -35,6 +35,7 @@
"next": "16.2.4",
"next-auth": "5.0.0-beta.30",
"next-intl": "^4.9.1",
"pg": "^8.21.0",
"react": "19.2.4",
"react-dom": "19.2.4",
"recharts": "^3.8.1",
@@ -46,6 +47,7 @@
"@tailwindcss/postcss": "^4",
"@types/bcryptjs": "^3.0.0",
"@types/node": "^20",
"@types/pg": "^8.20.0",
"@types/react": "^19",
"@types/react-dom": "^19",
"dotenv-cli": "^11.0.0",
@@ -55,5 +57,15 @@
"tailwindcss": "^4",
"typescript": "^5",
"vitest": "^4.1.4"
},
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"@swc/core",
"esbuild",
"sharp",
"unrs-resolver",
"@tailwindcss/oxide"
]
}
}
+132 -7
View File
@@ -61,7 +61,7 @@ importers:
version: 2.1.1
drizzle-orm:
specifier: ^0.45.2
version: 0.45.2(@neondatabase/serverless@1.1.0)
version: 0.45.2(@neondatabase/serverless@1.1.0)(@types/pg@8.20.0)(pg@8.21.0)
lucide-react:
specifier: ^1.8.0
version: 1.8.0(react@19.2.4)
@@ -74,6 +74,9 @@ importers:
next-intl:
specifier: ^4.9.1
version: 4.9.1(next@16.2.4(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react@19.2.4)(typescript@5.9.3)
pg:
specifier: ^8.21.0
version: 8.21.0
react:
specifier: 19.2.4
version: 19.2.4
@@ -102,6 +105,9 @@ importers:
'@types/node':
specifier: ^20
version: 20.19.39
'@types/pg':
specifier: ^8.20.0
version: 8.20.0
'@types/react':
specifier: ^19
version: 19.2.14
@@ -1938,6 +1944,9 @@ packages:
'@types/node@20.19.39':
resolution: {integrity: sha512-orrrD74MBUyK8jOAD/r0+lfa1I2MO6I+vAkmAWzMYbCcgrN4lCrmK52gRFQq/JRxfYPfonkr4b0jcY7Olqdqbw==}
'@types/pg@8.20.0':
resolution: {integrity: sha512-bEPFOaMAHTEP1EzpvHTbmwR8UsFyHSKsRisLIHVMXnpNefSbGA1bD6CVy+qKjGSqmZqNqBDV2azOBo8TgkcVow==}
'@types/react-dom@19.2.3':
resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==}
peerDependencies:
@@ -3403,6 +3412,40 @@ packages:
pathe@2.0.3:
resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}
pg-cloudflare@1.4.0:
resolution: {integrity: sha512-Vo7z/6rrQYxpNRylp4Tlob2elzbh+N/MOQbxFVWCxS7oEx6jF53GTJFxK2WWpKuBRkmiin4Mt+xofFDjx09R0A==}
pg-connection-string@2.13.0:
resolution: {integrity: sha512-EMnU9E2fSULdsbErBbMaXJvFeD9B4+nPcM3f+4lsiCR0BHLPrLVjv3DbyM2hgQQviKJaTWIRRTjKjWlHg3p2ig==}
pg-int8@1.0.1:
resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==}
engines: {node: '>=4.0.0'}
pg-pool@3.14.0:
resolution: {integrity: sha512-gKtPkFdQPU3DksooVLi9LsjZxrsBUZIpa+7aVx+LV5pNh0KzP4Zleud2po+ConrxbuXGBJ6Hfer6hdgpIBpBaw==}
peerDependencies:
pg: '>=8.0'
pg-protocol@1.14.0:
resolution: {integrity: sha512-n5taZ1kO3s9ngDTVxsEznOqCyToTgz0FLuPq0B33COy5pPpuWJpY3/2oRBVETuOgzdqRXfWpM9HIhp2LBBT1BA==}
pg-types@2.2.0:
resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==}
engines: {node: '>=4'}
pg@8.21.0:
resolution: {integrity: sha512-AUP1EYJuHraQGsVoCQVIcM7TEJVGtDzxWtGFZd8rds9d+CCXlU5Js1rYgfLNvxy9iJrpHjGrRjoi/3BT9fRyiA==}
engines: {node: '>= 16.0.0'}
peerDependencies:
pg-native: '>=3.0.1'
peerDependenciesMeta:
pg-native:
optional: true
pgpass@1.0.5:
resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==}
picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
@@ -3432,6 +3475,22 @@ packages:
resolution: {integrity: sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ==}
engines: {node: ^10 || ^12 || >=14}
postgres-array@2.0.0:
resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==}
engines: {node: '>=4'}
postgres-bytea@1.0.1:
resolution: {integrity: sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==}
engines: {node: '>=0.10.0'}
postgres-date@1.0.7:
resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==}
engines: {node: '>=0.10.0'}
postgres-interval@1.2.0:
resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==}
engines: {node: '>=0.10.0'}
preact-render-to-string@6.5.11:
resolution: {integrity: sha512-ubnauqoGczeGISiOh6RjX0/cdaF8v/oDXIjO85XALCQjwQP+SB4RDXXtvZ6yTYSjG+PC1QRP2AhPgCEsM2EvUw==}
peerDependencies:
@@ -3650,6 +3709,10 @@ packages:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
split2@4.2.0:
resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}
engines: {node: '>= 10.x'}
stable-hash@0.0.5:
resolution: {integrity: sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==}
@@ -3861,6 +3924,7 @@ packages:
uuid@10.0.0:
resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==}
deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
hasBin: true
victory-vendor@37.3.6:
@@ -3980,6 +4044,10 @@ packages:
resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
engines: {node: '>=0.10.0'}
xtend@4.0.2:
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
engines: {node: '>=0.4'}
yallist@3.1.1:
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
@@ -5396,6 +5464,12 @@ snapshots:
dependencies:
undici-types: 6.21.0
'@types/pg@8.20.0':
dependencies:
'@types/node': 20.19.39
pg-protocol: 1.14.0
pg-types: 2.2.0
'@types/react-dom@19.2.3(@types/react@19.2.14)':
dependencies:
'@types/react': 19.2.14
@@ -5917,9 +5991,11 @@ snapshots:
esbuild: 0.25.12
tsx: 4.21.0
drizzle-orm@0.45.2(@neondatabase/serverless@1.1.0):
drizzle-orm@0.45.2(@neondatabase/serverless@1.1.0)(@types/pg@8.20.0)(pg@8.21.0):
optionalDependencies:
'@neondatabase/serverless': 1.1.0
'@types/pg': 8.20.0
pg: 8.21.0
dunder-proto@1.0.1:
dependencies:
@@ -6133,7 +6209,7 @@ snapshots:
'@next/eslint-plugin-next': 16.2.4
eslint: 9.39.4(jiti@2.6.1)
eslint-import-resolver-node: 0.3.10
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4(jiti@2.6.1))
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4(jiti@2.6.1))
eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1))
eslint-plugin-react: 7.37.5(eslint@9.39.4(jiti@2.6.1))
@@ -6156,7 +6232,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4(jiti@2.6.1)):
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)):
dependencies:
'@nolyfill/is-core-module': 1.0.39
debug: 4.4.3
@@ -6171,14 +6247,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4(jiti@2.6.1)):
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)):
dependencies:
debug: 3.2.7
optionalDependencies:
'@typescript-eslint/parser': 8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)
eslint: 9.39.4(jiti@2.6.1)
eslint-import-resolver-node: 0.3.10
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4(jiti@2.6.1))
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))
transitivePeerDependencies:
- supports-color
@@ -6193,7 +6269,7 @@ snapshots:
doctrine: 2.1.0
eslint: 9.39.4(jiti@2.6.1)
eslint-import-resolver-node: 0.3.10
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4(jiti@2.6.1))
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))
hasown: 2.0.3
is-core-module: 2.16.1
is-glob: 4.0.3
@@ -6936,6 +7012,41 @@ snapshots:
pathe@2.0.3: {}
pg-cloudflare@1.4.0:
optional: true
pg-connection-string@2.13.0: {}
pg-int8@1.0.1: {}
pg-pool@3.14.0(pg@8.21.0):
dependencies:
pg: 8.21.0
pg-protocol@1.14.0: {}
pg-types@2.2.0:
dependencies:
pg-int8: 1.0.1
postgres-array: 2.0.0
postgres-bytea: 1.0.1
postgres-date: 1.0.7
postgres-interval: 1.2.0
pg@8.21.0:
dependencies:
pg-connection-string: 2.13.0
pg-pool: 3.14.0(pg@8.21.0)
pg-protocol: 1.14.0
pg-types: 2.2.0
pgpass: 1.0.5
optionalDependencies:
pg-cloudflare: 1.4.0
pgpass@1.0.5:
dependencies:
split2: 4.2.0
picocolors@1.1.1: {}
picomatch@2.3.2: {}
@@ -6960,6 +7071,16 @@ snapshots:
picocolors: 1.1.1
source-map-js: 1.2.1
postgres-array@2.0.0: {}
postgres-bytea@1.0.1: {}
postgres-date@1.0.7: {}
postgres-interval@1.2.0:
dependencies:
xtend: 4.0.2
preact-render-to-string@6.5.11(preact@10.24.3):
dependencies:
preact: 10.24.3
@@ -7242,6 +7363,8 @@ snapshots:
source-map@0.6.1: {}
split2@4.2.0: {}
stable-hash@0.0.5: {}
stackback@0.0.2: {}
@@ -7609,6 +7732,8 @@ snapshots:
word-wrap@1.2.5: {}
xtend@4.0.2: {}
yallist@3.1.1: {}
yocto-queue@0.1.0: {}
+7 -3
View File
@@ -1,3 +1,7 @@
ignoredBuiltDependencies:
- sharp
- unrs-resolver
allowBuilds:
'@parcel/watcher': true
'@swc/core': true
'@tailwindcss/oxide': true
esbuild: true
sharp: true
unrs-resolver: true