Auto is a Next.js app inside a pnpm workspace. The easiest first deployment target is Vercel.
- Import the Git repository in Vercel.
- Select
apps/webas the project root directory for the web app. - Add the required environment variables for Production and Preview:
OPENAI_API_KEYEMBEDDING_MODELRANKER_MODELINTENT_MODELPLANNER_MODELSESSION_SECRETADMIN_TOKEN
- Choose a deployment mode:
- Self-hosted / single-user:
APP_MODE=local - Hosted shared-key deployment:
APP_MODE=open
- Self-hosted / single-user:
- Choose a feedback storage mode:
- Local development:
FEEDBACK_STORE=file - Deployed/serverless:
FEEDBACK_STORE=webhook
- Local development:
- If using webhook feedback, also add:
FEEDBACK_WEBHOOK_URLFEEDBACK_WEBHOOK_SECRETif your receiver expects a bearer token
- Open
/admin/loginafter deployment and sign in withADMIN_TOKENto view local feedback. Do not put the token in the URL.
Vercel references:
- Monorepos and root directories: https://vercel.com/docs/monorepos
- Environment variables: https://vercel.com/docs/environment-variables
Local feedback is written to data/feedback.jsonl, which is useful during
development. A serverless deployment should not rely on local file writes for
durable product data. Use FEEDBACK_STORE=webhook for the first deployed version,
then replace it with a database-backed store when Auto needs real analytics.
APP_MODE=open is for a public deployment that uses the server's shared
OPENAI_API_KEY. In this mode Auto fails closed unless credit metering is
configured, so a missing backend cannot silently expose the shared OpenAI budget.
- Run
db/credits.sqlin Supabase. - Set:
APP_MODE=openSUPABASE_URLSUPABASE_SERVICE_ROLE_KEYFREE_CREDITSif you want a value other than30NEXT_PUBLIC_APP_URLALLOWED_ORIGINif it differs fromNEXT_PUBLIC_APP_URL
- For multi-instance rate limits, set:
UPSTASH_REDIS_REST_URLUPSTASH_REDIS_REST_TOKEN
For local demos of the open-mode UI only, use CREDITS_BACKEND=memory. The
memory backend is blocked in production and resets on process restart.
Credit costs are currently:
| Result type | Credits |
|---|---|
| Clarification | 0 |
| Single-tool recommendation | 1 |
| Workflow recommendation | 3 |
The API reserves 3 credits before a metered recommendation and refunds the difference after the result is known. BYOK requests bypass credits entirely.
Stripe top-ups are optional. To enable the Top up button:
- Create a Stripe Price for the credit pack.
- Set:
STRIPE_SECRET_KEYSTRIPE_PRICE_IDSTRIPE_WEBHOOK_SECRETCREDITS_PER_PURCHASEif you want a value other than100
- Point the Stripe webhook at:
/api/v1/stripe/webhook
Only checkout.session.completed grants credits.
/admin/feedback is protected by an httpOnly cookie when ADMIN_TOKEN is set.
The login flow is:
- Open
/admin/login. - Enter the value of
ADMIN_TOKEN. - The app stores a short-lived admin cookie and redirects to
/admin/feedback.
If ADMIN_TOKEN is missing, the admin login page shows a setup warning.
Run these before creating a production deployment:
pnpm --filter @auto/core test
pnpm validate-catalog
pnpm --filter @auto/web typecheck
pnpm --filter @auto/web buildThen verify:
curl http://localhost:3000/api/v1/health
curl -X POST http://localhost:3000/api/v1/feedback \
-H "Content-Type: application/json" \
-d '{"query":"test","rating":"good_match","primaryToolId":"elicit"}'