Engineering Timeline & Complete Evolution

KnowBihar Technical Architecture & Changelog

The complete technical evolution of KnowBihar — from its inception as a Create React App (CRA) SPA with MongoDB in September 2025, to 100% Next.js Static Site Generation (SSG), and the modern Eventarc-driven dual-database Cloud Functions pipeline.

Tech Journey:⚛️ Create React App (Sep 2025)▲ Next.js 100% SSG (Jan 2026)🔥 Firestore Native + Auth (Aug 2026)⚡ Cloud Functions Dual Sync (Sep 2026)
100% SSG
Next.js Static Generation
GCF Gen 2
Cloud Functions (asia-south2)
Dual Sync
Firestore ➔ MongoDB Atlas
7 Collections
Real-time Synced Sets

Live Dual-Database Sync Pipeline

Eventarc v2 Reactive Pipeline
Step 1: Primary Storage
Firestore Native
asia-south2 (Delhi)
Step 2: Serverless Trigger
Cloud Functions v2
onDocumentWritten
Step 3: Mirrored Target
MongoDB Atlas
database: test
🔍
☁️
2026-09-05▲ Next.js Erav2.6.0
commit: 8bc42d7

Real-Time Dual-Database Sync Pipeline: Firestore to MongoDB Atlas

Engineered and deployed an asynchronous, Eventarc-driven 2nd Gen Firebase Cloud Functions pipeline that mirrors every document write in Firestore directly to MongoDB Atlas ('test' database) with sub-second replication latency.

#Cloud Functions v2#Eventarc#MongoDB Atlas#Secret Manager#Node.js 22#asia-south2
  • Serverless Eventarc Triggers: Configured onDocumentWritten listeners across 7 core collections: posts, blocks, divisions, subdivisions, districts, places (mapped to famousplaces), and persons (mapped to people).
  • GCP Secret Manager Runtime Injection: Utilized defineSecret('MONGODB_URI') to inject database credentials securely into worker instances at runtime with zero source code exposure.
  • Resilient Connection Pool: Built a singleton getMongoClient with defensive URI sanitization, persistent socket reuse across warm invocations, and automatic Firestore Timestamp to BSON Date transformation.
  • Geo-Colocated Execution: Functions are pinned to Google Cloud region asia-south2 (Delhi) to minimize round-trip latency with the Firestore cluster.
// Eventarc v2 Firestore -> MongoDB Atlas Sync Trigger
exports.syncPosts = onDocumentWritten(
  {
    document: "posts/{docId}",
    secrets: [MONGODB_URI_SECRET],
    region: "asia-south2"
  },
  async (event) => {
    const { before, after } = event.data;
    const db = await getDb("test");
    if (!after.exists) {
      await db.collection("posts").deleteOne({ firestoreId: event.params.docId });
      return;
    }
    await db.collection("posts").updateOne(
      { firestoreId: event.params.docId },
      { $set: { ...after.data(), firestoreId: event.params.docId, _syncedAt: new Date() } },
      { upsert: true }
    );
  }
);
🚀
2026-08-31▲ Next.js Erav2.5.2
commit: b463843

Core Web Vitals Optimization & Render Performance Boost

Comprehensive performance audit targeting Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS), optimizing the critical rendering path across all high-traffic landing pages.

#Core Web Vitals#LCP#CLS#Font Optimization#Next.js
  • Zero Layout Shift (CLS < 0.01): Enforced explicit width/height ratios on all dynamic media containers, preventing visual layout jumping during hydration.
  • Sub-Second LCP: Streamlined above-the-fold component trees and enabled preloading for critical SVG administrative maps.
  • Optimized Static Asset Delivery: Configured high-cache HTTP headers on static chunks served via Firebase CDN.
🗺️
2026-08-30▲ Next.js Erav2.5.0
commit: 2883873

Enterprise Dynamic XML Sitemap Engine with Parallel Data Fetching

Re-engineered app/sitemap.js to dynamically discover thousands of administrative routes, places, personalities, and posts with strict XML entity sanitization and caching headers.

#XML Sitemap#SEO Engine#Google Search Console#Cache Headers#XML Sanitization
  • Parallel Firestore Ingestion: Fetches 8 collections concurrently via Promise.all during static build generation.
  • XML Entity Sanitization: Built defensive formatSafeUrl escaping unescaped ampersands (&) and illegal XML characters.
  • Multilingual Alternate hreflang: Automatically emits dual language routes (/en/ and /hi/) for every content entity.
  • Google Image Sitemap Integration: Extracts validated image URLs and alt captions to maximize visual search indexing.
✍️
2026-08-29▲ Next.js Erav2.4.0
commit: 319aa5c

Full-Featured Admin CMS Studio: Place & Personality Management

Rolled out full administrative editing suites (PlaceEditor and PersonEditor) featuring multi-image galleries, visitor logistics metadata, and secure deletion workflows.

#Admin Studio#PlaceEditor#PersonEditor#Firebase Storage#CRUD
🔍
2026-08-29▲ Next.js Erav2.3.5
commit: 77820fb

Unified SEO Architecture with Automated OpenGraph & JSON-LD

Architected app/lib/seo.js into a centralized SEO utility, eliminating duplicate metadata boilerplate across all 22+ app directories.

#SEO Utility#OpenGraph#Twitter Cards#JSON-LD#Canonical
🏛️
2026-08-27▲ Next.js Erav2.2.0
commit: 7c7bf35

100% Static Site Generation (SSG) & Firebase Hosting Migration

Re-engineered the entire application to achieve 100% Static Site Generation (SSG) with generateStaticParams, paired with a custom tag-based caching layer for Firestore.

#SSG#generateStaticParams#unstable_cache#Firebase Hosting#revalidate: false
🔥
2026-08-26▲ Next.js Erav2.0.0
commit: 4860423

Migration to Firebase Native SDK: Firestore, Auth & Secure Post Studio

Migrated data access completely away from external legacy APIs into Google Cloud Firestore Native, introducing Firebase Authentication with Google OAuth and a secure post authoring dashboard.

#Firebase SDK#Firestore Native#Firebase Auth#PostEditor#Security
📮
2026-01-21▲ Next.js Erav1.5.0
commit: 354a54b

DigiPin Digital Addressing & Pan-India Postal Directory

Integrated India Post's next-generation DigiPin digital addressing standard alongside a lightning-fast postal directory covering all districts of Bihar and Pan-India.

#DigiPin#Pin Code Engine#Pan-India Postal#Geocoding
📊
2026-01-08▲ Next.js Erav1.2.0
commit: 624ac29

Bihar Governance Analytics & Legislative Assembly Visualizations

Introduced rich civic data dashboards for Members of Legislative Assembly (MLA) and Members of Parliament (MP) of Bihar with Chart.js analytics.

#Chart.js#MLA Analytics#MP Analytics#Civic Tech#Demographics
🌱
2026-01-04▲ Next.js Erav1.0.0
commit: 8cebdde

KnowBihar Next.js Architecture & Complete Administrative Tree

Architected KnowBihar on Next.js App Router with deep bilingual localization (en/hi), interactive vector SVG cartography, and relational modeling of all Bihar administrative tiers.

#Next.js App Router#Bilingual i18n#SVG Maps#Divisions#Districts#Blocks
📦
2025-10-18⚛️ React App Erav0.8.0 (CRA)
commit: monorepo-setup

Monorepo Architecture Restructure & AdSense Integration

Evolved the repository structure into a monorepo setup, implemented Google AdSense verification, and performed major SEO enhancements across the Single Page Application.

#Monorepo#Google AdSense#SEO Optimization#CRA
📰
2025-10-14⚛️ React App Erav0.6.5 (CRA)
commit: rich-content

Rich Content Formatting & Article Tagging Subsystem

Built a rich text content authoring experience with formatting controls, post tagging, article deletion workflows, and an upgraded admin dashboard.

#Rich Content#Tag Engine#Admin CMS#Post Management
🌐
2025-10-10⚛️ React App Erav0.5.0 (CRA)
commit: i18n-sitemap

URL-Based Language Routing & Interactive Map Zoom Engine

Introduced language parameters directly in URLs for bilingual routing, added XML sitemaps, and developed interactive zoom capabilities for administrative district and block maps.

#Bilingual URLs#Sitemap Generator#Zoom Controls#Block Maps
🍃
2025-09-28⚛️ React App Erav0.3.0 (CRA)
commit: mongodb-api

MongoDB Database Integration & Full-Text Search Inception

Integrated MongoDB as the primary backend database alongside dedicated REST APIs for administrative divisions, famous tourist places, prominent personalities, and dynamic search.

#MongoDB Origin#REST API#Search Engine#Divisions#Places
2025-09-25⚛️ React App Erav0.1.0 (CRA)
commit: cra-init

Birth of KnowBihar: Project Inception with Create React App

The historic first commit of the KnowBihar project. Initialized as a Create React App (CRA) Single Page Application dedicated to celebrating Bihar's heritage and geography.

#Create React App#SPA#Birth of KnowBihar#React 18

KnowBihar Continuous Engineering

From our roots in September 2025 as a Create React App (CRA) to a 100% Next.js SSG platform and dual-sync Cloud Functions — KnowBihar is engineered for speed, durability, and open knowledge.

← Explore KnowBihar