{"id":48365866,"url":"https://github.com/jpdevries/pantry-host","last_synced_at":"2026-04-20T06:14:48.311Z","repository":{"id":345552261,"uuid":"1184579898","full_name":"jpdevries/pantry-host","owner":"jpdevries","description":"Pantry List is a PWA for managing your kitchen — recipes, ingredients, cookware, and grocery lists. Features offline support with background sync, recipe queuing for meal planning, auto-generated grocery lists with pantry-aware shopping status, barcode scanning via Open Food Facts, and full keyboard/screen reader accessibility.","archived":false,"fork":false,"pushed_at":"2026-04-19T18:54:01.000Z","size":24848,"stargazers_count":1,"open_issues_count":13,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T20:06:55.075Z","etag":null,"topics":["grocery-list","pwa","recipes-app","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpdevries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-17T18:15:39.000Z","updated_at":"2026-04-19T18:54:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"36773c82-2cf2-4273-972e-8ca480290d18","html_url":"https://github.com/jpdevries/pantry-host","commit_stats":null,"previous_names":["jpdevries/pantry-list"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jpdevries/pantry-host","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fpantry-host","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fpantry-host/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fpantry-host/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fpantry-host/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpdevries","download_url":"https://codeload.github.com/jpdevries/pantry-host/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fpantry-host/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32035370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grocery-list","pwa","recipes-app","self-hosted"],"created_at":"2026-04-05T14:31:15.105Z","updated_at":"2026-04-20T06:14:48.303Z","avatar_url":"https://github.com/jpdevries.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pantry Host\n\n\u003e There's already enough of your data in the cloud. Keep your recipes and pantry closer to home — running on your own hardware, on your own network, never stored in the cloud.\n\n\u003csub\u003e\u003cem\u003e\\*The optional AI\u0026ndash;powered recipe creation feature sends your ingredient list to [Anthropic](https://docs.anthropic.com/en/docs/about-claude/models) to generate suggestions. Everything else stays entirely on your local machine.\u003c/em\u003e\u003c/sub\u003e\n\nA self-hosted Progressive Web\u0026nbsp;App for managing your kitchen. Track your pantry and cookware, import recipes from URLs or `at://` AT Protocol URIs, generate AI-suggested meals from what you already have, and take your grocery list, fully informed by a recipe queue, to the store — even offline.\n\nBuilt with Rex (React + rolldown), GraphQL (Pothos + graphql-yoga), PostgreSQL, and Tailwind CSS. Runs great on a Mac Mini, or whatever.\n\nWant to access the API away from home? You can't. Unless you set up a [Tailscale](https://tailscale.com/) mesh network, an SSH tunnel (`ssh -L 3000:localhost:3000 your-mac`), or a reverse proxy like [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-tunnel/) — but that's on you. By default, the app is only reachable on your local network, and that's the point.\n\n## Features\n\n- **Pantry** — track ingredients by category with quantities and tags; batch-scan groceries with your camera\n- **Recipes** — add recipes manually or import from a URL; AI-generate recipes from your pantry\n- **Federated recipes** — import from Bluesky via `at://` URIs, or browse publishers aggregated at [feed.pantryhost.app](https://feed.pantryhost.app/api/recipes) (paste any `at://…` URI into the browser's address bar on `my.pantryhost.app/at/…` to open it as a first-class detail page with QR sharing)\n- **Grocery list** — queue recipes to cook; see what ingredients you're missing\n- **Cookware** — track what equipment you have so AI suggestions stay realistic\n- **Multiple kitchens** — separate pantries and recipes for different households (e.g. a guest kitchen, a relative's)\n\n---\n\n## Requirements\n\n- Node.js 18+\n- PostgreSQL 14+\n- An AI API key (only required for AI recipe generation) — [Anthropic](https://console.anthropic.com/)\n\n---\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Copy and fill in environment variables\ncp .env.example .env.local\n\n# Start the dev server (Rex + GraphQL server together)\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000).\n\nThe GraphQL API runs on port 4001. The database schema is applied automatically on startup — no separate migration step needed.\n\n---\n\n## Docker\n\nThe fastest way to self-host:\n\n```bash\ngit clone https://github.com/jpdevries/pantry-host.git\ncd pantry-host\ndocker compose up -d\n```\n\nOpen [http://localhost:3000](http://localhost:3000). PostgreSQL and the app start automatically — the database schema is applied on first boot.\n\nTo enable AI recipe generation, pass your API key:\n\n```bash\nAI_API_KEY=sk-ant-... docker compose up -d\n```\n\nData (database + uploaded images) persists in Docker volumes across restarts.\n\n### Raspberry Pi\n\nDocker on a Raspberry Pi 4 or 5 (ARM64, 4 GB+ RAM recommended) works out of the box:\n\n```bash\ngit clone https://github.com/jpdevries/pantry-host.git\ncd pantry-host\ndocker compose up -d\n```\n\nThe initial `docker compose up` builds the image on-device — this takes a while on a Pi (10–20 min) but only happens once. Subsequent starts are instant.\n\n**Pi 4 with 2 GB RAM:** The build step may run out of memory. Add swap first:\n\n```bash\nsudo fallocate -l 2G /swapfile\nsudo chmod 600 /swapfile\nsudo mkswap /swapfile\nsudo swapon /swapfile\n```\n\nOr build on a faster machine and transfer the image:\n\n```bash\n# On your Mac/PC:\ndocker buildx build --platform linux/arm64 -t pantry-host:latest .\ndocker save pantry-host:latest | gzip \u003e pantry-host-arm64.tar.gz\n\n# Copy to Pi, then:\ndocker load \u003c pantry-host-arm64.tar.gz\ndocker compose up -d\n```\n\n**Not supported:** Pi 3 and older (32-bit ARMv7) — the Rex runtime requires ARM64.\n\n**Save disk space:** Disable image variant generation to keep only the original upload (no WebP/JPEG/grayscale variants):\n\n```bash\nENABLE_IMAGE_PROCESSING=false docker compose up -d\n```\n\n### HTTPS with Tailscale\n\nNeed HTTPS for the barcode scanner on iOS? [Tailscale](https://tailscale.com/) provides free, automatic TLS certificates for your devices — no reverse proxy, no public DNS, no Cloudflare tunnel.\n\n1. Install Tailscale on your server (Mac Mini, Pi, etc.) and your phone/laptop\n2. Enable MagicDNS and HTTPS in the Tailscale admin console\n3. Run `tailscale cert your-machine.tailnet-name.ts.net` on the server\n4. Add a Caddy container (or similar) to terminate TLS and proxy to port 3000\n\nYour devices can then access Pantry Host at `https://your-machine.tailnet-name.ts.net` — valid certificate, secure context, camera and barcode scanner work at the grocery store over your Tailnet.\n\n---\n\n## Local Hosting\n\nPantry Host is designed to run on a always-on home machine (a Mac Mini works well) and be accessed by devices on your local network via IP address. No cloud account, no subscription, no data leaving your home.\n\n### 1. Set up PostgreSQL\n\nInstall PostgreSQL if you haven't already:\n\n```bash\nbrew install postgresql@16\nbrew services start postgresql@16\ncreatedb pantry_host\n```\n\n### 2. Configure environment\n\n```bash\ncp .env.example .env.local\n```\n\nEdit `.env.local`:\n\n```\nDATABASE_URL=postgres://your-mac-username@localhost:5432/pantry_host\nAI_PROVIDER=anthropic\nAI_API_KEY=sk-ant-...\n```\n\n`AI_PROVIDER` and `AI_API_KEY` are only needed for AI recipe generation. Everything else works without them.\n\n### 3. Run as a persistent service with pm2\n\n[pm2](https://pm2.keymetrics.io/) keeps the app running and restarts it automatically after reboots.\n\n```bash\nnpm install -g pm2\n\n# Start the app\npm2 start \"npm run start\" --name pantry-host\n\n# Save so it restarts after reboot\npm2 save\npm2 startup\n```\n\nFollow the command `pm2 startup` prints to enable it as a launch agent.\n\n### 4. Access from other devices on your network\n\nFind your Mac's local IP address:\n\n```bash\nipconfig getifaddr en0\n```\n\nThen open `http://192.168.x.x:3000` on any device connected to your home Wi-Fi — phones, tablets, other laptops. This gives full read/write access to all features except camera-based barcode scanning (which requires HTTPS on iOS).\n\n**Tip:** For a friendlier local address, your Mac's hostname (e.g. `http://mac-mini.local:3000`) works automatically on most home networks via Bonjour.\n\n### 5. HTTPS for camera features (optional)\n\niOS Safari requires HTTPS to access the camera. If you want to use the barcode scanner from your phone, set up a local HTTPS proxy with [mkcert](https://github.com/FiloSottile/mkcert):\n\n```bash\n# Install mkcert and create a local CA\nbrew install mkcert\nmkcert -install\n\n# Generate a cert for localhost and your Mac's IP\nmkcert localhost 127.0.0.1 192.168.x.x\n\n# Install the HTTPS proxy\nnpm install -g local-ssl-proxy\n\n# Run proxies for both the frontend and GraphQL server\nlocal-ssl-proxy --source 3443 --target 3000 --cert ./localhost+2.pem --key ./localhost+2-key.pem \u0026\nlocal-ssl-proxy --source 4443 --target 4001 --cert ./localhost+2.pem --key ./localhost+2-key.pem \u0026\n```\n\nA convenience script is included at `scripts/https-proxy.sh`.\n\nThen open `https://192.168.x.x:3443` on your phone.\n\n#### Trusting the certificate on iOS\n\niOS requires the mkcert root CA to be installed as a profile **and** explicitly trusted. Use Safari for all of these steps — Chrome on iOS cannot install profiles or trust certificates.\n\n**1. Serve the root CA from your Mac:**\n\n```bash\ncp \"$(mkcert -CAROOT)/rootCA.pem\" /tmp/rootCA.pem\ncd /tmp \u0026\u0026 python3 -m http.server 8888\n```\n\n**2. Install the profile on your iPhone:**\n\nOpen Safari and go to `http://192.168.x.x:8888/rootCA.pem`. iOS will prompt you to download a configuration profile — tap **Allow**.\n\n**3. Install the profile:**\n\nGo to **Settings → General → VPN \u0026 Device Management** (or **Profiles \u0026 Device Management** on older iOS). Tap the mkcert profile and tap **Install**.\n\n**4. Enable full trust:**\n\nGo to **Settings → General → About → Certificate Trust Settings**. Toggle on full trust for the mkcert root certificate. This is a separate step from installing the profile — both are required.\n\n**5. Verify both ports:**\n\nVisit `https://192.168.x.x:3443` (frontend) and `https://192.168.x.x:4443` (API) in Safari. Both should load without certificate warnings. Once trusted, Chrome on iOS will also work.\n\n\u003e **If your Mac's IP address changes** (e.g. switching WiFi networks), regenerate the cert: `mkcert localhost 127.0.0.1 \u003cnew-ip\u003e`, then restart both proxies with the new cert files. You do not need to reinstall the root CA on iOS — only the server cert changes.\n\n**Guest mode:** When someone connects over HTTP via IP address, the UI automatically hides owner-facing features like Batch Scan and Cookware — they see a streamlined read/write view of the pantry, list, and recipes. On `localhost` (dev) or HTTPS, all features are visible.\n\n### 6. Remote access (optional)\n\nIf you want to reach the app while away from home without exposing it to the public internet, [Tailscale](https://tailscale.com/) is the easiest option. Install it on your Mac Mini and any device you want access from — it creates a private WireGuard network between them.\n\n### Backups\n\nThe app's data lives entirely in PostgreSQL. A simple daily dump is enough:\n\n```bash\n# Add to crontab: crontab -e\n0 2 * * * pg_dump pantry_host \u003e ~/backups/pantry_host_$(date +\\%Y\\%m\\%d).sql\n```\n\nStore those dumps on a Time Machine volume or external drive and you're covered.\n\n---\n\n## Power User\n\nFor developers and AI-first workflows, Pantry Host can be set up and managed entirely through a coding agent.\n\n### Claude Code\n\nClone the repo, open it in [Claude Code](https://claude.ai/code), and let it handle the rest. Claude reads `CLAUDE.md` for full project context — it knows the schema, the GraphQL API, the monorepo layout, and how to run everything.\n\n```bash\ngit clone https://github.com/jpdevries/pantry-host.git\ncd pantry-host\nclaude\n```\n\nFrom there you can import recipes from URLs, generate new ones from your pantry, manage ingredients, and build features conversationally.\n\n### Claude in Chrome\n\nNo server? No problem. Open [my.pantryhost.app](https://my.pantryhost.app) in Chrome with the [Claude in Chrome](https://chromewebstore.google.com/detail/claude/danfokkoeegljpdgjhoelpmjibkjkfmm) extension and Claude becomes the backend. It can read your pantry, fetch recipe URLs, parse ingredients, and fill in forms — all without a server.\n\n**Example prompts:**\n\n```\nImport this recipe: https://www.seriouseats.com/the-best-slow-cooked-bolognese-sauce-recipe\n```\n\n```\nImport this Bluesky recipe: at://did:plc:7ojp52ncy5ay6ldsj3db6joj/exchange.recipe.recipe/01KKVFB0KTWVFXG493PZQG6T83\n```\n\n```\nWhat can I make with what's in my pantry?\n```\n\n```\nAdd 2 lbs chicken thighs, 1 bunch cilantro, and a lime to my pantry\n```\n\n```\nBuild me a weekly dinner menu using only what I have on hand\n```\n\n```\nI have guests coming who are gluten-free. Which of my recipes work?\n```\n\n### Messaging Apps (OpenClaw)\n\nConnect [OpenClaw](https://openclaw.ai) to text your pantry from WhatsApp, Telegram, Discord, or any supported channel. Ask \"How many eggs do we have?\" and get an answer from your kitchen data.\n\nSee [INTEGRATIONS.md](INTEGRATIONS.md#openclaw-whatsapp-telegram-discord) for the full setup guide.\n\n---\n\n## Environment Variables\n\n| Variable | Required | Description |\n|---|---|---|\n| `DATABASE_URL` | Yes | PostgreSQL connection string |\n| `AI_PROVIDER` | No | AI provider for recipe generation (default: `anthropic`) |\n| `AI_API_KEY` | No | API key for the configured AI provider |\n| `GRAPHQL_PORT` | No | GraphQL server port (default: `4001`) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpdevries%2Fpantry-host","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpdevries%2Fpantry-host","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpdevries%2Fpantry-host/lists"}