# Superfunction

Built by us. Our multi-tenant platform that generates restaurant websites with AI. An internal portal for restaurant data, a Claude-powered site composer, and a publish pipeline that strips AI-written scripts and serves each restaurant on its own domain.

Stack: Next.js, Supabase, Claude API, Resend, Sentry, Vercel

Page: https://touji.dev/work/superfunction

## What it is

Superfunction is our own product. We designed, built and run it ourselves. It is a multi-tenant platform that generates websites for restaurants with AI, and it is in pre-launch. We show it here as an example of how we build, not as a client result.

## How it works

- **Portal.** An internal, login-only portal where our team enters each restaurant's facts: name, contact details, hours, locations, menu and photos.
- **Composer.** A Claude-powered composer writes each restaurant's whole site as HTML from those facts, a written brief and a chosen design direction. Our team can keep several named drafts per restaurant, ask for targeted edits, and restore earlier versions.
- **Publish transform.** Before a page goes live, a pipeline parses the generated HTML, strips every script the AI wrote, points forms at our own endpoint and checks the SEO metadata. It runs once, at publish, so serving a page does no extra work.
- **Owned scripts only.** The only JavaScript on a restaurant's page is a small set of reviewed scripts from our own codebase, enforced by a Content Security Policy of `script-src 'self'`. Pages work without them; the scripts only add extras, such as showing whether the restaurant is open now.
- **Custom domains.** Each published site is served on its own subdomain or the restaurant's custom domain. Unknown domains and unpublished pages return a 404.
- **Demo links.** A private link shows a restaurant unpublished work without a login. Only a hash of the link's token is stored.

## Security choices

- Team access is limited to an allowlist enforced in the database's Row Level Security, not only in app code.
- Catering inquiries from restaurant sites contain personal data, so the public database API can't read or write them. Only server code can.

## Contact

To start, book a call or send a short note about your business and the problem at https://touji.dev/contact. The intro call is free. After the call we send a written, fixed-scope quote, so the full cost is known before any work starts. We do not publish prices. On-site across Los Angeles and Orange County. Remote anywhere.
