Bento House

1. Foundation

GuideUpdated Dec 22 min read

On this page
  1. Decisions
  2. Prompt for Claude Code
  3. Make it reachable at home
  4. Checks

You get: an empty app with a login page, a database, and a CLAUDE.md that holds your decisions. It's reachable on your home network over HTTPS.

Decisions

  • Stack: Next.js (App Router, TypeScript), Tailwind CSS, Postgres. It's boring and widely used, which is what you want: Claude Code knows it well.
  • Login: one household password. The server signs a cookie with a secret only it knows. No accounts to manage.
  • Secrets (the password, the signing secret, API keys) live in a .env file that is never committed to git and never pasted into a chat.
  • Docker Compose runs Postgres. The app can run in Docker too, or as a service on the machine.

Prompt for Claude Code

Create a new Next.js 15 app (App Router, TypeScript strict, Tailwind) called bento-house,
with Postgres 16 in a docker-compose.yml and plain SQL migrations in db/migrations
(numbered files, applied in order by a small script, never edited once applied).

Add a single-password login: a /login page, the password checked against
APP_PASSWORD from .env, and an HMAC-signed, httpOnly, secure cookie (secret from
SESSION_SECRET in .env). Every page and API route except /login requires the cookie.
Limit failed logins (5 per 15 minutes per IP).

Create .env.example with every variable and no real values, and make sure .env is
in .gitignore. Write a CLAUDE.md with: what the project is, the stack (locked: do not
substitute), and these rules: private by default, secrets only in .env, migrations are
additive, every feature ends with plain-language check steps.

Do not add any outside login service, analytics or tracking.

Make it reachable at home

  • Ask Claude Code to serve it over HTTPS with a self-signed certificate on port 3000, or put it behind a reverse proxy you already run.
  • Don't forward a router port to it. Use Tailscale if you want it away from home.

Checks

  • docker compose ps shows Postgres running.
  • Opening the app from a phone on your Wi-Fi shows the login page.
  • A wrong password is refused; the right one opens an empty dashboard.
  • git status doesn't list .env.
  • Six wrong passwords in a row get "too many attempts".