Documentation

Deploy your generated app to Vercel

Every app coping generates is a standard Next.js 15 project. There is nothing proprietary to install and no runtime dependency on coping — five steps and it is live.

1. Download and unzip your project

Open any ready project, then use Download ZIP (top right, or the Deploy tab). Unzip it anywhere on your machine — the archive already contains package.json, the Tailwind v4 and TypeScript configuration, the Totalum client, every page and API route, and a README.

unzip my-app.zip
cd my-app
npm install
cp .env.example .env
npm run dev

2. Push it to GitHub

Vercel deploys from a Git repository. Create an empty repository on GitHub, then push the folder to it.

git init
git add .
git commit -m "Initial commit from coping"
git branch -M main
git remote add origin https://github.com/<you>/<repo>.git
git push -u origin main

3. Import the repository on Vercel

Go to vercel.com/new and pick the repository. Vercel detects Next.js automatically: framework preset Next.js, build command next build, output .next. Leave everything as detected.

4. Add your environment variables

Before the first deploy, open Environment Variables and add the three keys below for Production, Preview and Development. TOTALUM_API_KEY is a server secret — never give it a NEXT_PUBLIC_ prefix, or it would be bundled into the browser.

TOTALUM_API_KEY=<your Totalum API key>
TOTALUM_API_URL=https://api.totalum.app/
NEXT_PUBLIC_APP_URL=https://<your-project>.vercel.app

5. Deploy

Press Deploy. The first build takes a minute or two. After that, every push to main ships automatically and every pull request gets its own preview URL.

# or from your terminal
npm i -g vercel
vercel          # preview deployment
vercel --prod   # production deployment

Creating the database tables

The Blueprint tab of every project lists the tables your app expects, with snake_case field names and their types. Create them in your Totalum project — the same names and types — and the generated API routes will work with no code changes. Relationships are expressed as objectReference fields, and _id, createdAt and updatedAt are created for you automatically.

Troubleshooting

Build fails with “Module not found: server-only”
Run npm install once more — the package is listed in package.json and must be installed before the first build.
API routes return 401 or empty data
TOTALUM_API_KEY is missing or scoped to a different project. Check the value in Vercel → Settings → Environment Variables, then redeploy (env changes need a new build).
A table name error from the SDK
Totalum table and field names are snake_case. Make sure the tables you created match the Blueprint tab exactly.