Vercel is the recommended hosting platform for Akari Art. Because the project is built on Next.js 15, Vercel auto-detects the framework, handles theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/Akari-Art/llms.txt
Use this file to discover all available pages before exploring further.
next build step, and provides edge-optimized delivery with zero additional configuration. The guide below walks through every step from pushing your code to verifying the live sign-in flow.
Prerequisites
Make sure the following external services are fully configured before deploying. Each one contributes one or more environment variables that Vercel needs at build and runtime.- Vercel account — vercel.com (free tier is sufficient)
- GitHub repository — your fork or clone of Akari Art pushed to a GitHub account
- MongoDB Atlas cluster — connection string ready (see MongoDB Atlas docs)
- Cloudinary account — cloud name, API key, and API secret from your Cloudinary dashboard
- Cloudflare account — account ID and an API token with the AI Run permission enabled
- Google Cloud project — OAuth 2.0 client ID and secret, with the app in a ready-to-update state
Deploy Steps
Push your repository to GitHub
Make sure your local clone is pushed to a GitHub repository. Vercel imports directly from GitHub, so the repo must be accessible from your Vercel account.
Create a new Vercel project
- Log in to vercel.com/dashboard.
- Click Add New → Project.
- Under Import Git Repository, find your Akari Art repo and click Import.
Verify the framework preset
In the project configuration screen confirm the following defaults:
Leave these at their defaults. Do not override the build command.
| Setting | Value |
|---|---|
| Framework Preset | Next.js |
| Build Command | next build |
| Output Directory | .next |
| Install Command | npm install |
Add all environment variables
Before clicking Deploy, expand the Environment Variables section and add all 11 variables. Use the exact names shown below — any typo will cause a runtime error.
| Variable | Example Value |
|---|---|
GOOGLE_CLIENT_ID | 123456789-abc.apps.googleusercontent.com |
GOOGLE_CLIENT_SECRET | GOCSPX-xxxxxxxxxxxxxxxxxxxx |
NEXTAUTH_SECRET | openssl rand -base64 32 output (min 32 chars) |
NEXTAUTH_URL | https://akari-art.vercel.app (update after deploy) |
MONGODB_URL | mongodb+srv://user:pass@cluster.mongodb.net/akari |
CLOUDINARY_CLOUD_NAME | my-cloud-name |
CLOUDINARY_API_KEY | 123456789012345 |
CLOUDINARY_API_SECRET | xxxxxxxxxxxxxxxxxxxxxxxxxx |
CLOUDFLARE_ID | abcdef1234567890abcdef1234567890 |
CLOUDFLARE_API_KEY | your-cloudflare-api-token |
NEXT_PUBLIC_BASE_URL | https://akari-art.vercel.app |
Deploy and note your Vercel URL
Click Deploy. Vercel will install dependencies and run
next build. When the build succeeds, Vercel shows your live URL — for example, https://akari-art.vercel.app or https://akari-art-git-main-yourname.vercel.app.Copy this URL — you need it for the next two steps.Update NEXTAUTH_URL and NEXT_PUBLIC_BASE_URL
Go to Project Settings → Environment Variables in the Vercel dashboard and update both variables to your real deployment URL:After saving, trigger a Redeploy from the Deployments tab so the new values take effect.
Update the Google OAuth redirect URI
NextAuth.js registers the callback at For example:
/api/auth/callback/google. You must add this exact URL to your Google Cloud OAuth client’s authorised redirect URIs, otherwise Google will reject the sign-in flow.- Open Google Cloud Console → Credentials.
- Click your OAuth 2.0 client.
- Under Authorized redirect URIs, add:
- Click Save.
Build Scripts
The following scripts are defined inpackage.json and are used by Vercel automatically:
build during every deployment and start to serve the production build. The dev script with --turbopack is for local development only and is never invoked on Vercel.
Post-Deployment Checklist
Google OAuth callback URI is updated
Google OAuth callback URI is updated
Confirm that
https://<your-vercel-domain>/api/auth/callback/google appears in the Authorized redirect URIs list of your Google Cloud OAuth client. Missing this is the single most common reason sign-in fails after deployment.NEXTAUTH_URL matches the actual deployment URL exactly
NEXTAUTH_URL matches the actual deployment URL exactly
NEXTAUTH_URL must be the canonical URL of your deployment including the scheme (https://) and without a trailing slash. A mismatch causes NextAuth.js to generate incorrect callback URLs and broken session cookies.MongoDB Atlas network access allows Vercel IPs
MongoDB Atlas network access allows Vercel IPs
Vercel’s serverless functions use dynamic egress IP addresses. In MongoDB Atlas → Network Access, either add Vercel’s published IP ranges or, for quick testing, allow access from anywhere (
0.0.0.0/0). Restrict access to known IPs before going to production.Test the full sign-in flow
Test the full sign-in flow
- Visit your Vercel URL in an incognito window.
- Click Sign in with Google on the
/signinpage. - Complete the Google OAuth consent.
- Confirm you are redirected back to the dashboard and your session is active.