Skip to content

raid-guild/Pinata-Agent-Chef

Repository files navigation

Pinata Chef

Pinata Chef is a TypeScript + Next.js Pinata agent template for recipe storage, recipe URL ingestion, cooking notes, food-event timelines, and a hosted read-only recipe explorer.

It includes:

  • manifest.json with Pinata template metadata and a public /app route on port 3000
  • PM2 runtime via ecosystem.config.cjs
  • TypeScript Next.js App Router UI mounted at /app
  • SQLite persistence in workspace/data/recipes.db
  • API routes for recipe CRUD, URL ingestion, and timestamped food events
  • Workspace identity docs for agent behavior and chef personalities
  • workspace/OPERATIONS.md with API and SQLite notes for recipes and food events
  • workspace/TASK_IDEAS.md with scheduled task ideas for OpenClaw or cron-style jobs

Local Usage

npm install
npm run build
npm start

Open http://localhost:3000/app.

For development:

npm run dev

API Routes

  • GET /app/api/recipes?q=term
  • POST /app/api/recipes
  • GET /app/api/recipes/:id
  • PATCH /app/api/recipes/:id
  • DELETE /app/api/recipes/:id
  • POST /app/api/ingest
  • GET /app/api/events?limit=25
  • POST /app/api/events
  • GET /app/api/openclaw/health
  • GET /app/api/openclaw/deploy
  • POST /app/api/openclaw/deploy
  • POST /app/api/openclaw/responses
  • POST /app/api/openclaw/hooks/:name

OpenClaw Proxy

This template can relay selected OpenClaw HTTP endpoints through the public app route on port 3000. The relay targets http://127.0.0.1:18789 by default, or OPENCLAW_BASE_URL if set.

The feature is disabled unless HOOK_API_KEY is present in the runtime environment. Do not add HOOK_API_KEY to manifest.json; document it for operators and set it directly in the environment.

When OPENCLAW_GATEWAY_TOKEN is present, the proxy uses it automatically for /v1/responses upstream auth. Hook relays use HOOK_API_KEY as the upstream x-openclaw-token.

Proxy auth:

  • Authorization: Bearer <HOOK_API_KEY>
  • x-hook-api-key: <HOOK_API_KEY>

Supported relays:

  • GET /app/api/openclaw/health
  • GET /app/api/openclaw/deploy
  • POST /app/api/openclaw/deploy
  • POST /app/api/openclaw/responses -> POST /v1/responses
  • POST /app/api/openclaw/hooks/:name -> POST /hooks/:name

Constraints:

  • JSON requests only
  • 1 MiB max body size
  • Single hook segment only, for example wake, agent, or a mapped hook name

Deploy Hook

The app can also trigger a local rebuild and PM2 reload through an authenticated deploy hook.

  • POST /app/api/openclaw/deploy starts npm run build and then npm run pm2:reload in the background
  • GET /app/api/openclaw/deploy returns the latest deploy status

Deploy status is written to:

  • workspace/runtime/deploy-status.json
  • workspace/runtime/deploy.log

Use x-hook-api-key for hosted requests. Some Pinata edge paths may not preserve Authorization: Bearer ... reliably.

Template Notes

Pinata path routes strip the public prefix before traffic reaches the container, while this app also sets basePath: "/app" for local and hosted consistency. Keep the server bound to 0.0.0.0 and port 3000 unless you update manifest.json.

Pinata-created instance repos may start with a restrictive generated .gitignore that ignores most paths by default. If an instance repo appears to contain only workspace/state files, widen .gitignore so source and config paths are explicitly unignored and committed:

  • app/
  • lib/
  • public/
  • scripts/
  • root config files such as package.json, next.config.mjs, server.js, tsconfig.json, README.md

The platform accepts these files once they are tracked. A git push alone still may not activate new code; instances can still require next build and PM2 reload unless another deploy trigger runs them.

LLM provider keys are handled by Pinata agent onboarding. The current template does not require declaring an OpenAI secret in manifest.json.

The hosted web route is intentionally read-only. Chat, chef personality selection, guided recipe ingestion, and food-event creation should happen in the Pinata chat UI at the agent root. The agent can still call the app APIs to save recipes, list recipes, and append timestamped notes or suggestions.

First Agent Prompt

You are Pinata Chef. First, inspect workspace/BOOTSTRAP.md, workspace/IDENTITY.md, workspace/SOUL.md, workspace/CHEF_PERSONALITIES.md, workspace/OPERATIONS.md, and workspace/TASK_IDEAS.md. Then run a short onboarding to learn my household, dietary requirements, favorite foods, normal effort level, and default chef personality. Use this chat UI for questions and ingestion. Use the hosted /app route as a read-only recipe explorer.

About

Recipe Manager Agent built in the RaidGuild Cohort

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors