diff --git a/.npmrc b/.npmrc deleted file mode 100644 index b6dcac7..0000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -auto-install-peers=true -shamefully-hoist=true \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f6b69b7..44da885 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,6 @@ COPY . . # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. ENV NEXT_TELEMETRY_DISABLED=1 -ENV SKIP_ENV_VALIDATION=1 # Generate Prisma Client and compile the Next.js application. RUN npm run build diff --git a/README.md b/README.md index e735629..a19eeab 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,11 @@ ownership model. ## Requirements -- Node.js 22.12 or later, including its bundled npm 10 or later -- PostgreSQL -- a GitHub OAuth App +- Node.js 22, including its bundled npm 10 or later + +The public application does not require PostgreSQL or an OAuth provider. The +legacy authenticated workspace additionally requires PostgreSQL and a GitHub +OAuth App. Configure the GitHub OAuth callback as: @@ -36,6 +38,13 @@ ${BETTER_AUTH_URL}/api/auth/callback/github ```bash npm ci +npm run dev +``` + +This starts the public application with sign-in disabled. To exercise the legacy +authenticated workspace instead: + +```bash cp .env.template .env.local # Fill in the database, Better Auth, and GitHub values. npm run prisma:migrate @@ -81,3 +90,14 @@ Fulling database does not delete Kubernetes resources created by v2. Use [docs/github-oauth-verification.md](./docs/github-oauth-verification.md) to verify a real OAuth application before release. + +## Vercel Deployment + +Fulling can use Vercel's native Next.js deployment without a `vercel.json` file. +The public application builds and starts without environment variables. The +current GitHub sign-in, database-backed workspace, and kubeconfig flows remain +disabled until their complete legacy configuration is present. + +Follow [docs/vercel-deployment.md](./docs/vercel-deployment.md) for the complete +project setup, zero-configuration behavior, verification steps, and rollback +procedure. diff --git a/app/(auth)/login/_components/github-login-button.tsx b/app/(auth)/login/_components/github-login-button.tsx index ff90bf5..fec175a 100644 --- a/app/(auth)/login/_components/github-login-button.tsx +++ b/app/(auth)/login/_components/github-login-button.tsx @@ -6,11 +6,13 @@ import { Github, LoaderCircle } from 'lucide-react' import { Button } from '@/components/ui/button' import { signIn } from '@/lib/auth-client' -export function GitHubLoginButton() { +export function GitHubLoginButton({ enabled }: { enabled: boolean }) { const [isPending, setIsPending] = useState(false) const [error, setError] = useState(null) async function handleSignIn() { + if (!enabled) return + setIsPending(true) setError(null) const result = await signIn.social({ @@ -26,10 +28,21 @@ export function GitHubLoginButton() { return (
- + {!enabled ? ( +

+ GitHub sign-in is not available in this deployment. +

+ ) : null} {error ?

{error}

: null}
) diff --git a/app/(auth)/login/page.tsx b/app/(auth)/login/page.tsx index 86565c1..28c8b74 100644 --- a/app/(auth)/login/page.tsx +++ b/app/(auth)/login/page.tsx @@ -1,6 +1,7 @@ import { redirect } from 'next/navigation' import { FullingBrand } from '@/components/fulling-brand' +import { isAuthConfigured } from '@/lib/auth' import { getSession } from '@/lib/auth/session' import { GitHubLoginButton } from './_components/github-login-button' @@ -25,17 +26,19 @@ export default async function LoginPage({ searchParams }: LoginPageProps) { Workspace access

- Sign in to your workspace + {isAuthConfigured ? 'Sign in to your workspace' : 'Workspace access is being rebuilt'}

- Use your GitHub account to continue to Fulling. + {isAuthConfigured + ? 'Use your GitHub account to continue to Fulling.' + : 'The public preview is available, but sign-in and workspace data are temporarily disabled.'}

{error === 'oauth' ? (

GitHub sign-in could not be completed. Please try again.

) : null} - +