# AI agent brief (AI Share Projects)

Use this when helping build or deploy a **small Nease-style web app**. For Cursor rules and work items, the canonical system is still **master-instructions** under `docs/master_instructions` — this file is a **portable subset**.

## Goals

- Express serves built React from `dist/`.  
- MongoDB + sessions + Passport local auth when the app needs accounts.  
- Dokku deploy: `NPM_CONFIG_PRODUCTION=false`, `MONGO_URL`, `SESSION_SECRET`.  
- Public URL via `<app>.<server-ip>.nip.io` when no custom domain yet.  

## Do

- Match patterns in `nease/site-launcher-template` or `nease/partypal`.  
- Add `heroku-postbuild` → `npm run build:prod` for Dokku.  
- Put API under `/api/*`; SPA fallback last.  
- Document new env vars in `.env.example`.  

## Don’t

- Don’t copy the entire master-instructions repo into a small app.  
- Don’t run `npm prune --production` on the build container without setting `NPM_CONFIG_PRODUCTION=false` first.  
- Don’t commit real secrets; use Dokku config.  

## One-line context for chat

> Stack: Node + Express + React (Webpack) + MongoDB + Passport + Dokku; see `nease/ai-share-projects/docs/STACK.md`.
