PDF-accessibility-saas/frontend/lib/supabase/server.ts
Vadym Samoilenko eb9cdbf639
Some checks failed
CI / Backend — lint + test (push) Has been cancelled
CI / Frontend — lint + typecheck (push) Has been cancelled
CI / Build + push Docker images (push) Has been cancelled
Finalize: CLAUDE.md, report viewer, tsconfig, type fixes
- Update CLAUDE.md with full project structure and conventions
- Add report viewer page: score ring, WCAG compliance cards, issue list with severity filter, next steps, export + auto-fix buttons, real-time polling
- Add Alembic script.py.mako template (required for alembic revision --autogenerate)
- Add frontend/tsconfig.json + postcss.config.js (Next.js build requirements)
- Fix TypeScript error in supabase/server.ts (explicit CookieOptions type)
- Upgrade Next.js 15.3.2 → 15.5.18 (cache poisoning CVE fix)
- Update .gitignore: frontend build artifacts, backend venv, tsbuildinfo

TypeScript: 0 errors (npx tsc --noEmit passes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 15:20:43 +01:00

20 lines
636 B
TypeScript

import { createServerClient, type CookieOptions } from "@supabase/ssr";
import { cookies } from "next/headers";
export async function createClient() {
const cookieStore = await cookies();
return createServerClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
cookies: {
getAll: () => cookieStore.getAll(),
setAll: (cookiesToSet: Array<{ name: string; value: string; options?: CookieOptions }>) => {
cookiesToSet.forEach(({ name, value, options }) =>
cookieStore.set(name, value, options)
);
},
},
}
);
}