Jace Recipes

by Jace Official

Jace Recipes: recipes made by parents, with Sign in with Jace, Jace Verified recipes and auto moderation.

okjace/jace-recipesSynced 12/2/2026, 8:49:01 PM
Open Jace RecipesSource code

Jace Recipes

Recipes made by parents, for families. Part of Jace.

  • Sign in with Jace is the only way in (OAuth, no passwords here).
  • Jace usernames come from Jace. Display name, profile picture and bio can be changed on Jace Recipes.
  • Jace Verified recipes get a badge, their own category, and always show first.
  • @okjace can verify and un-verify recipes, choose who can post verified recipes, take recipes down (and restore them), approve held recipes, and suspend accounts.
  • Auto moderation checks every recipe and name (lib/moderation.js).
  • A proper editor with a toolbar at the top (status, who can see it, πŸ‘₯ Share, Save draft, Publish). New recipes save themselves as drafts while you type, so you can come back to them again and again from your profile; drafts are only checked and spell-fixed when you publish. Co-authors can work on drafts; only the owner publishes. Two people saving at once won't overwrite each other.
  • Use your own AI: copy a ready-made prompt (with the safety rules) into ChatGPT, Claude, Gemini, Copilot or any AI, paste the answer back, and Jace Recipes reads it (JSON or a normal written recipe), checks it and opens it as a draft. No API keys.
  • Make a recipe with AI using free OpenRouter models. The AI writes a draft the parent checks and edits; it's moderated before and after, and published recipes show a "Made with AI help" tag.
  • Browse with filters: Jace Verified or community, category, time, allergy-free (peanut, nuts, dairy, egg, wheat, soy, fish, shellfish, sesame), made with AI or not, sorted newest, quickest or A to Z, with "Load more". The home page has "View all" links for verified and community recipes.
  • Public, unlisted or private recipes: public ones show everywhere; unlisted ones only open with the link (with a Copy link button); private ones are only for the author (and the admin, for safety). Ratings and comments are off for private recipes.
  • Make recipes together: the owner invites people by Jace username (πŸ‘₯ Share). Invites land in the πŸ”” notifications (Accept / Decline) and by email. Co-authors can edit the recipe and see it even when it's private; only the owner can delete it or change who can see it.
  • πŸ”” Notifications: invites, comments, approvals, Jace Verified, take-downs, and (for @okjace) things to review and recipes auto moderation blocked.
  • Blocked recipes are kept for @okjace (Admin β†’ Blocked by auto moderation), who can publish them anyway or dismiss them. If @okjace's own recipe is blocked, the editor offers "Publish anyway (admin)". Overrides are recorded on the recipe.
  • Ratings and comments: 1 to 5 stars (not on your own recipe) and comments, both auto moderated. Comments with links or unkind words wait for @okjace. Browse can sort by top rated.
  • Emails through Jace: welcome, new comments on your recipe, recipe approved / Jace Verified / taken down, verifier added, and (for @okjace) things waiting for review. Sent by Jace's app email API (POST /api/oauth/email) in Jace's template with Jace Recipes' colors (lib/email.js). Each kind can be turned off in Settings, and Jace lets people turn off all app emails. Needs Jace Recipes registered by the Jace site owner (an official app).
  • Allergy warnings: people save their family's allergies in Settings (private), including their own custom ones like "strawberries" or "mustard". Recipes containing them get a warning on the card and a big alert on the recipe page, and Browse has a "Hide my allergies" button.
  • Auto spelling and grammar fixes when a recipe is published (can be turned off per recipe). The AI proofreads; any line where a number or amount changed is thrown away. Without the AI, a built-in fixer handles common misspellings, capitals and full stops (lib/polish.js).
  • Every recipe page shows what auto moderation checked, plus its safety notes. Vague or low-effort recipes (like a one-word title with tiny steps) wait for review.
  • Links to the Jace Terms and Privacy Policy in the footer, and a note in the corner on each visit that fades after 5 seconds.
  • Jace colors with light and dark mode (follows the device, or pick with the sun/moon button).

Plain Node.js with no framework: static files in public/, one Vercel function in api/index.js, and the API in lib/app.js. Data lives in Neon Postgres.

Run it locally

You need Node.js 20.9 or newer.

npm install
cp .env.example .env.local

The quickest way to try it is with the mock Jace, which has test accounts (okjace, momchef, dadcooks, a muted and a banned one) and no passwords. In .env.local set:

JACE_URL=http://localhost:4000
JACE_CLIENT_ID=local-dev
JACE_CLIENT_SECRET=local-dev
SESSION_SECRET=<openssl rand -base64 32>

For the AI recipe maker without a key, also add MOCK_AI_URL=http://localhost:4000/v1 (the mock answers with a sample recipe).

Then, in two terminals:

npm run mock-jace
npm run dev

Open http://localhost:3000. Without DATABASE_URL, data goes in a local Postgres (PGlite) in ./data.

npm test

runs the moderation tests and an end-to-end test that signs in through OAuth against the mock.

Environment variables

NameRequiredWhat it is
JACE_CLIENT_IDyesOAuth client id from Jace.
JACE_CLIENT_SECRETyesOAuth client secret from Jace. Server only.
SESSION_SECRETyes32+ random characters that encrypt the sign-in cookie. Changing it signs everyone out.
DATABASE_URLyes in productionNeon Postgres connection string. Vercel β†’ Storage β†’ Neon sets it.
OPENROUTER_API_KEYfor AIFree key from openrouter.ai/settings/keys. Without it, the AI recipe maker is hidden. Only models ending in :free are ever used.
OPENROUTER_MODELnoComma-separated :free model ids to try in order. By default the app asks OpenRouter which free models exist (every 6 hours) and picks the best few, so it keeps working when models come and go.
AI_DAILY_LIMITnoAI recipes per person per day (default 20). Failed tries don't count.
APP_URLnoPublic URL, used for the redirect URI <APP_URL>/api/auth/callback. Defaults to the request's host.
JACE_URLnoDefaults to https://jaceo.vercel.app.
ADMIN_USERNAMEnoThe Jace username that runs the site. Defaults to okjace.
ADMIN_JACE_SUBnoLocks the admin to one Jace account id (the sub from userinfo), in case the username ever changes hands.

Deploying to Vercel

  1. Import the repo in Vercel (no build step needed; vercel.json has the settings).
  2. Vercel β†’ Storage β†’ add Neon and connect it to the project. This sets DATABASE_URL. Tables are created on first request.
  3. On Jace, signed in as the site owner: profile β†’ Manage account β†’ Developer β†’ register Jace Recipes with the redirect URI https://<your-domain>/api/auth/callback (and http://localhost:3000/api/auth/callback for local work). Registering it as the site owner makes it an official Jace app, so it can also use Jace's auto moderation terms.
  4. Add JACE_CLIENT_ID, JACE_CLIENT_SECRET and SESSION_SECRET in Vercel β†’ Settings β†’ Environment Variables, then redeploy.
  5. Sign in as @okjace. The first time, four sample Jace Verified recipes are added.

How it works

Sign in with Jace. /api/auth/signin stores a random state in a short-lived encrypted cookie and redirects to Jace's /oauth/authorize (scope profile). /api/auth/callback checks state, exchanges the code on the server, reads /api/oauth/userinfo, and sets one encrypted, HTTP-only session cookie. Banned Jace accounts can't sign in; muted ones can't post.

Profiles. The Jace username is updated from Jace on every sign-in and can't be changed here. Display name and picture start from Jace the first time, then belong to Jace Recipes.

Auto moderation. Every recipe is checked when it's posted or edited:

  • Blocked: things that aren't food and aren't safe (bleach, antifreeze, detergent pods…), drugs, bad language, spam, and any term on Jace's own auto moderation list.
  • Held for review until @okjace approves (everyone's recipes and edits, @okjace's too; private recipes skip the queue since nobody else sees them): things that need a person to check (lye, raw milk, links…).
  • Safety notes added automatically: safe cooking temperatures, raw egg and raw flour, no honey under 12 months, choking hazards in Baby & Toddler recipes, alcohol, allergens and hot oil.

AI recipes get the same treatment: the request is checked before it's sent to the AI, the AI is told the safety rules (food-safe temperatures, no honey for babies, no choking hazards, no alcohol in kids' food, food only), and its answer goes through auto moderation before the parent sees it, and again when it's published.

Add words to the lists at the top of lib/moderation.js to tune it.

Security. Writes must be JSON (blocks cross-site form posts) and the session cookie is SameSite=Lax. Everything people write is put on the page as text, never HTML. Pictures are resized in the browser, checked on the server, and served from /api/images/<id>.

Contributing

Issues and pull requests are welcome. Please run npm test before opening a PR.

License

MIT

Issues

Versions

No versions published yet.

Comments

Sign in to leave a comment.

No comments yet.

By using this site, you agree to the Terms of Service and Privacy Policy.