Platform Updates

A full record of every change made to The KPI Hub — what changed, why it was made, the benefit it delivers, and how many times it was touched.

15
Total Changes
3
Days Active
2
Features Shipped
13
Fixes & Infra
Apr 26, 2026 — Today
Infra Google OAuth — End-to-End Live
New OAuth 2.0 credentials created inside the correct GCP project (kpihub-live). Callback URL corrected from /api/v1/auth/google/callback to /api/auth/google/callback. Cloud Run updated with the real Client ID and Secret. Full login flow verified — tokens generated and returned to frontend.
Infra api.thekpihub.com — Custom Domain Live via Cloudflare Worker
Cloud Run domain mapping is unsupported in asia-south1. Solved using a Cloudflare Worker that proxies all traffic from api.thekpihub.com to the Cloud Run service. Domain verified via Google Search Console, nameservers moved to Cloudflare, Worker route added.
Fix connect-redis v7 CJS Import Corrected
connect-redis v7 changed its export from a named export to a default export. The import was updated from require('connect-redis') to require('connect-redis').default. Without this fix, the session store crashed on startup.
Fix Redis Made Optional at Startup
The backend was crashing if Redis (Memorystore) was unavailable. Redis is not yet set up in production, so the app was changed to warn instead of crash — sessions fall back gracefully until Memorystore is provisioned.
Fix Docker Auth for Artifact Registry
Cloud Build was failing to push Docker images to asia-south1 Artifact Registry due to missing authentication. Added explicit Docker login using an OAuth token before the push step.
Fix package-lock.json Added to Dockerfile
npm ci inside the Docker build requires a package-lock.json file to be present. The file was missing from the build context, causing the Docker step to fail.
Fix Cloud Build Substitution — SHORT_SHA → _TAG
$SHORT_SHA is only available in Cloud Build when triggered by a Git push. For manual builds via gcloud builds submit, a custom substitution variable $_TAG is required.
Apr 25, 2026
Feature Complete Node.js + PostgreSQL Backend Deployed to Cloud Run
Full production backend deployed on Google Cloud Run (asia-south1). Includes: JWT auth, Google & GitHub OAuth, role-based access control, billing (Razorpay + Stripe), KPI management, AI integration, audit logging, and session management. 18 database tables across 7 schemas migrated and seeded on Cloud SQL PostgreSQL.
Fix Cloud Run PORT Environment Variable
Cloud Run injects the PORT environment variable at runtime (default 8080). The app was hardcoded to port 4000. Updated to read process.env.PORT so Cloud Run can manage port assignment dynamically.
Infra Cloud Build Config Simplified
The cloudbuild.yaml was simplified by removing a custom Docker login step that was causing build failures. Cloud Build's default service account already has the necessary permissions for the project's Artifact Registry.
Apr 24, 2026 — Day One
Feature Initial SaaS Frontend Built
Complete production SaaS frontend built: authentication pages (login, register), role-based dashboards, Stripe billing integration, upgrade flow, and a full landing page. Merged as the first working version of The KPI Hub web app.