PocketBrain Local Secure Stack
Start local infrastructure and application services in the documented order and verify health before testing.
Workflow
- •Confirm local prerequisites.
- •Ensure Node.js 18+, npm, Docker, and Docker Compose are available.
- •Start infrastructure dependencies.
- •Run
docker compose up -d postgres redis.
- •Seed local env files.
- •Run
cp server/.env.example server/.envif missing. - •Run
cp worker/.dev.vars.example worker/.dev.varsif missing. - •Ensure
VPS_API_ORIGIN=http://127.0.0.1:8788inworker/.dev.vars.
- •Start services in separate terminals.
- •Terminal A:
npm run server:dev. - •Terminal B:
npm run worker:dev. - •Terminal C:
npm run dev:proxy.
- •Verify health.
- •Check
http://localhost:8788/health. - •Check
http://localhost:8788/ready. - •Open
http://localhost:3000.
- •Run optional validation.
- •Run
npm run testfor headless E2E checks when requested. - •Use targeted E2E files for scenario-specific regressions.
- •Teardown when finished.
- •Stop local app processes.
- •Run
docker compose stop postgres redisordocker compose down.
Troubleshooting
- •Read
references/startup-sequence.mdfor exact startup order. - •Read
references/troubleshooting.mdfor common failures and recovery commands.
Safety
- •Never commit
server/.envorworker/.dev.vars. - •Keep
ALLOW_INSECURE_DEV_AUTH=trueonly for local development. - •Do not use local insecure defaults as production guidance.