starreview-ai-backend
Node.js + Express backend for StarReview, a SaaS for businesses and organizations anywhere in the world that uses AI (Claude Sonnet 4.6) to draft Google review replies.
Production: https://api.starreview.ch (Railway, auto-deploy from main)
Documentation
| Doc |
Audience |
What's in it |
docs/STARREVIEW_PROJECT_SPEC.md |
Anyone new to the project |
Original product spec, business model, target market |
docs/STARREVIEW_CLAUDECODE_HANDOFF.md |
Engineers picking up the codebase |
Tech stack, schema, architectural decisions, current status |
docs/lead-gen.md |
Operator running cold outreach |
End-to-end pipeline, env vars, daily workflow, sender warming, Resend dashboard |
docs/security.md |
Anyone touching env vars or production |
Required secrets, rotation procedure, DSAR handling, escalation runbook |
docs/frontend-contracts.md |
Engineers changing backend API contracts |
Frontend snapshot sync commands, artifact handoff, and CI guards |
docs/CHANGELOG.md |
Anyone tracking releases |
Per-release notes |
docs/pilot-smoke-test.md |
Operator validating Mario pilot setup |
Pre-launch checklist |
docs/STRIPE_TEST_WALKTHROUGH.md |
Engineers debugging payment flows |
Stripe sandbox test walkthrough |
docs/prompt-telemetry-and-versioning.md |
Operators querying prompt telemetry |
PROMPT_HASH_SECRET setup, event schema, SQL queries for per-version latency / tokens / resolution tiers |
AGENTS.md |
AI agent sessions (Claude Code, Codex) |
Worktree isolation, explicit-path commits, and the local pre-push CI gate |
Quick start (local dev)
npm install
cp .env.example .env # fill in env vars per docs/security.md
npm run dev
Deploy
Push to main. Railway auto-deploys.
Test
npm test
A git pre-push hook (.githooks/pre-push, activated by npm install) runs only what takes seconds before every push: the hooks path, installed dependencies, the Node floor and the lockfile dry-run. The push gate proper is the first job of CI (gate in .github/workflows/backend-ci.yml); a push that fails it starts no test shard. The whole plan by hand: node scripts/pre-push-gate.mjs (PREPUSH_FULL=1 adds the unit and route-integration shards). --no-verify is prohibited. See AGENTS.md for the full policy.