Self-host OpenClay
There is no database, no environment file and no account system, so running your own copy is genuinely a three-command job. This page covers local development, deploying to Vercel, and what to change if you fork it.
Run it locally
git clone https://github.com/raghav3600/Altclay.git cd Altclay npm install npm run dev
Open http://localhost:3000. That is the whole setup. There is no .env to fill in, because API keys are entered in the browser at run time and never read from the environment.
Requirements
- Node.js 20 or newer.
- An API key from OpenAI, Google, Anthropic or xAI, whichever you prefer.
- Nothing else. No Postgres, no Redis, no queue, no object storage.
Deploy your own instance
The project is a stock Next.js App Router app and deploys to Vercel's free tier without configuration. Fork the repo, import it in Vercel, and deploy. There are no environment variables to set.
# or from the CLI npm i -g vercel vercel
It will run just as happily on Netlify, Cloudflare Pages, Render, Fly or a plain Node server via npm run build && npm start. The only server-side work is two stateless API routes that forward a request to the model provider.
How it is put together
app/tool/page.tsx: the enrichment UI and run loop.lib/pricing.ts: the model catalog. Add a model here and the picker, cost estimator, comparison pages and SEO copy all pick it up.lib/enrichClient.ts: the retry loop, with jittered exponential backoff.lib/promptTemplates.ts: builds the per-row prompt and validates custom templates.app/api/enrich/route.ts: the proxy. It logs nothing and stores nothing.
Why a proxy exists at all
Browsers block direct cross-origin calls to these provider APIs, so the request has to pass through a same-origin endpoint. That route forwards the key and returns the response. It does not read, log or persist the body. If you are self-hosting, the key never leaves infrastructure you control.
Common changes when forking
- Add a model: append a
ModelConfigto the right array inlib/pricing.ts. Set itstierto control whether it shows before “show all”. - Add a provider: extend the
Providerunion inlib/types.ts, add an entry toPROVIDER_META, and add a branch in both API routes. - Change the theme: every colour is a CSS variable at the top of
app/globals.css, defined once for light and once for dark. - Raise the file limit:
MAX_FILE_BYTESinapp/tool/page.tsx. Parsing is client-side, so the ceiling is the browser's memory, not a server limit.
Privacy properties you inherit
- No database, so there is nothing to breach.
- No cookies and no analytics beyond anonymous page views, which you can remove.
- API keys live in React state and are never persisted.
- Session recovery stores your in-progress work in
localStorageon your own device so a reload doesn't lose a run. The key is never part of it.
No account, no card, no platform fee.
Bring your own API key and pay the model provider directly.
Or just use the hosted version