This repository contains a production-oriented MVP for managing personal/professional records with:
- Frontend: HTML/CSS/JavaScript
- Backend: Node.js + Express (JavaScript)
- Data: Firebase Admin SDK + Firestore
- Payments: Stripe Checkout + webhook logging
- Automation: Scheduled synchronization from a remote data source
npm install
cp .env.example .env
npm run devOpen http://localhost:3000.
- Strict HTTP security headers with Helmet
- CORS allowlist through environment variable
- API rate limiting (including stricter limits for checkout sessions)
- API mutation header checks (
X-Requested-With+ JSON content-type enforcement) - Firebase ID token verification for protected endpoints
- Firestore write/read isolation rules (
firebase/firestore.rules) - Input validation via
express-validator - Stripe webhook signature verification
- No secrets hardcoded in code
- Use managed secret storage (not
.envfile in production). - Enable Firebase App Check for frontend-to-backend calls.
- Replace anonymous sign-in with email/password or SSO.
- Add audit logs and alerting (SIEM/log monitoring).
- Enable WAF and DDoS protection at the hosting layer.
- Configure Stripe products/prices and webhook endpoint.
- Set strict IAM roles for Firebase service account.
- Run dependency scanning in CI and patch monthly.
GET /api/healthGET /api/profiles/me(auth)PUT /api/profiles/me(auth)POST /api/payments/checkout-session(auth)POST /api/payments/webhook(Stripe)
A cron job runs every 6 hours to fetch external records and upsert into externalDirectory collection.
- Deploy API on Cloud Run, Fly.io, or Render with HTTPS only.
- Use Firebase Hosting or CDN for static assets.
- Configure production domain in
APP_BASE_URLandCORS_ORIGIN. - Use Stripe live keys only in production environment.
- Create privacy policy and terms for your country/region.
- Add user consent and data-retention controls.
- Create account deletion and data export workflows.
- Maintain a breach-response procedure.
- Theme toggle (light/dark) with local persistence
- Draft autosave for profile edits
- Live profile preview card
- Completion and security-strength indicators
- One-click export of profile draft to JSON
- Improved responsive layout, spacing, and visual hierarchy
- Toast notifications for major actions
For security and compliance reasons, do not use unknown credentials from the internet. Use your own Firebase and Stripe test credentials in
.envand browser localStorage.