Golden Hour is a calm, mobile-first PWA for stepping outside around sunrise and sunset. It uses MongoDB Atlas for subscriber, reminder, and check-in data. Photos stay in the phone's IndexedDB and are never uploaded.
render.yaml defines a Node web service with npm install, node server.js, and a /health check. Render's Blueprint uses sync: false for values that must be entered as secrets in the dashboard; see the Render Blueprint specification and environment variable guide.
-
Create a MongoDB Atlas database and allow the Render service to connect to it. Keep the Atlas URI private.
-
Create a new Render Blueprint from this repository and apply
render.yaml. -
Enter these prompted secret values for the web service:
MONGODB_URI,VAPID_PUBLIC_KEY,VAPID_PRIVATE_KEY,VAPID_SUBJECT, andTICK_SECRET. -
Generate VAPID keys locally with
npx web-push generate-vapid-keys, then copy them into Render. Use a strong random value forTICK_SECRET. -
Deploy and verify
https://<your-service>.onrender.com/healthreturns{ "ok": true }. Render health checks require a successful 2xx/3xx response; the app binds to Render's host and injectedPORT(health checks, web services). -
Initialize MongoDB indexes using the production URI from a trusted machine or a Render shell:
node scripts/init-db.js
-
Run the local-only Gemma nudge generator separately when you want to refresh
data/nudges.json:node scripts/make_nudges.js
The Blueprint also provisions a Render Postgres database because the deployment request included one. The current application deliberately does not use it: runtime persistence is MongoDB Atlas, so there is no DATABASE_URL and no Postgres adapter in this project. Remove the databases block if that unused Render database is not needed.
For a production reminder loop, call POST /api/tick from a scheduler and send the x-tick-secret header. The development-only ?force=1 tick path is disabled when NODE_ENV=production.
npm install
copy .env.example .env
npm startFill in .env with MongoDB Atlas and Web Push values. Never commit .env or print its contents.
- Sun times are calculated offline with SunCalc.
- Messages are written by the open-weight Gemma model running locally through Ollama.
- Photos never leave the phone; they are stored in device-local IndexedDB.
- There are no third-party AI API keys or per-use AI costs. Web Push and MongoDB still require their normal service credentials.
subscribers: endpoint,keys { p256dh, auth }, lat, lon, IANAtz, sunrise/sunset preferences, lead time, andcreatedAt.reminders: subscriber, sunrise/sunset kind, event time, fire time, and nullable sent time.checkins: subscriber, kind, local date, optional treat, and creation time.