Vercel is the recommended deployment platform for TenderCheck AI. The frontend is deployed as a static Vite site served from Vercel’s global CDN, while the backend runs as serverless Node.js functions. The live demo is hosted at https://tendercheckai.elecodes.online.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/elecodes/TenderCheck-AI/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Vercel Account
A free Vercel account connected to your GitHub repository.
Turso Database
A Turso database with its URL and auth token ready.
Google AI Studio Key
A Gemini API key from Google AI Studio.
Google OAuth Client ID
Optional. Required only if you want Google Sign-In enabled in production.
Frontend Deployment
Import the repository to Vercel
Go to the Vercel Dashboard, click Add New → Project, and connect your GitHub repository.
Set the root directory
In the project configuration screen, set Root Directory to
frontend/. Vercel will scope its build to that subdirectory.Confirm framework and build settings
Vercel auto-detects Vite as the framework preset. Verify the following are set:
| Setting | Value |
|---|---|
| Framework Preset | Vite |
| Build Command | npm run build |
| Output Directory | dist |
Add environment variables
In the Environment Variables section, add:
See Environment Variables for the full reference.
| Variable | Value |
|---|---|
VITE_API_BASE_URL | Your backend URL (add this after backend is deployed) |
VITE_GOOGLE_CLIENT_ID | Your OAuth Client ID (optional) |
VITE_ENABLE_GOOGLE_AUTH | true (optional, shows Google login button) |
Deploy and note your Vercel URL
Click Deploy. Once the build completes, Vercel assigns a URL such as
https://tender-check-ai.vercel.app. Save this — you will need it for CORS and OAuth configuration.Add a custom domain
Go to Settings → Domains in your Vercel project and enter your custom subdomain (e.g.
Add this record in your DNS provider (Namecheap, Cloudflare, etc.) and wait for propagation.
tendercheckai.elecodes.online). Vercel will display the DNS record to add:| Type | Name | Value |
|---|---|---|
CNAME | tendercheckai | cname.vercel-dns.com |
Backend Deployment
Create a separate Vercel project for the backend
From the Vercel Dashboard, click Add New → Project and import the same GitHub repository again. Vercel supports multiple projects from one monorepo.
Set the root directory
Set Root Directory to
backend/. This scopes all build and install commands to the backend subdirectory.Add environment variables
Add the following in the Environment Variables section:
| Variable | Notes |
|---|---|
TURSO_DB_URL | Must use https://, not libsql:// (see Important Notes below) |
TURSO_AUTH_TOKEN | From turso db tokens create |
GOOGLE_GENAI_API_KEY | Gemini key from Google AI Studio |
GOOGLE_API_KEY | Same Gemini key (required by Genkit 1.28.0+) |
JWT_SECRET | Generate with openssl rand -base64 32 |
NODE_ENV | production |
ALLOWED_ORIGINS | Your frontend Vercel URL and custom domain, comma-separated |
Deploy and note the backend URL
Click Deploy. Once complete, copy the backend URL (e.g.
https://tendercheck-backend.vercel.app).Google OAuth Configuration
If you are using Google Sign-In, you must register your Vercel domain as an authorized origin in Google Cloud Console, otherwise the OAuth flow will fail with aredirect_uri_mismatch error.
Open your OAuth credential
Go to Google Cloud Console → Credentials and click Edit on your OAuth 2.0 Client ID.
Add authorized JavaScript origins
Under Authorized JavaScript origins, add both your Vercel URL and your custom domain:
Important Notes
- Cold starts: Vercel serverless functions spin down when idle. The first request after a period of inactivity may take a few extra seconds while the Node.js runtime initializes.
ALLOWED_ORIGINSmust include the exact frontend URL(s), includinghttps://and no trailing slash. The backend reads this as a comma-separated list and rejects any unlisted origin in production mode.
SPA Routing
React Router requires that all client-side routes return theindex.html shell rather than a 404. The frontend/vercel.json file in the repository handles this automatically by rewriting every path to /index.html:
/dashboard/tenders would return a 404 from Vercel’s edge network instead of loading the React app.