This page outlines the technical design, underlying hosting framework, content rendering pipelines, security protocols, metadata schema, and migration strategy for the PFJA Digital Memorial Archive. Built to preserve historical press clippings, journalistic records, and foundational media documentations, the platform prioritizes rapid delivery, multi-lingual font rendering, and long-term archival stability.
1. System Architecture & Current Tech Stack
The digital archive relies on a hybrid architecture combining cloud-backed static page delivery with asynchronous data binding to ensure fast page loads across high-latency networks.
Primary Content Engine: Blogger Core Engine with custom XML layout schemas and structured meta-data binding.
DNS & Routing: Cloudflare Anycast Network handling SSL/TLS termination, edge caching, and domain security rules.
Hosting & CDN Infrastructure: Google Global CDN with distributed edge caching for zero-downtime serving.
Typography & Multilingual Engine: Standard web typography integrated with custom font loader modules (including Gulzar font rules for dedicated Urdu archive rendering and custom spacing configs).
2. OCR Text Extraction & Image Compression Specs
To maintain a lightweight footprint while ensuring high legibility and searchability of historical newsprint, all incoming press clippings pass through a dedicated processing pipeline before publication.
2.1 Image Processing & Compression Standards
| Parameter | Specification | Target Objective |
| Source Capture | 300 to 1200 DPI (Uncompressed TIFF / PNG / JPG) | Ultra-high-density original scan capture for fine microprint & aged newsprint |
| Output Web Format | WebP (Lossy Compression with Quality Factor 80–85%) | $< 250\text{ KB}$ average file size per clipping |
| Color Profile | Grayscale / Monochromatic optimization for print | Reduced color depth payload |
| Responsive Assets | Dynamic srcset generating 480w, 800w, and 1200w variants | Mobile-first bandwidth optimization |
| Delivery Strategy | Native browser lazy-loading (loading="lazy") | Zero blocking on initial DOM paint |
Key Technical Considerations for 1200 DPI JPG/PNG/TIFF Imports
Adaptive Resampling: High-density 1200 DPI master scans are downsampled during WebP conversion for web delivery while retaining the original 1200 DPI master files in cold archival storage (e.g., Cloudflare R2 / S3).
Lossy JPG Artifact Cleaning: Incoming JPG press scans undergo artifact reduction filters before OCR processing to remove JPEG block distortion around fine Urdu ligatures and newsprint text.
2.2 OCR Text Extraction & Processing Pipeline
Pre-Processing (Image Cleaning): Raw press scans undergo adaptive thresholding, deskewing ($< 0.5^\circ$ alignment tolerance), and contrast normalization to resolve aged paper discoloration and bleed-through.
Dual-Language Recognition (Urdu & English):
English Content: High-precision character recognition targeting standard newsprint serif fonts.
Urdu Content: Specialized OCR processing optimized for Nastaliq script structures and historical ligatures.
Structured Text Formatting: Extracted text is mapped to structured HTML/JSON payloads. Urdu text is explicitly tagged with language attributes (
lang="ur") to trigger the Gulzar font engine with tailored line-height and letter-spacing parameters.Search Metadata Injection: Extracted text serves as the indexed body and fallback alt text, ensuring full-text searchability across search engine crawlers and internal site queries.
3. Database Schema & Press Record Metadata
To support standardized cataloging and future platform portability, each historical item in the PFJA repository adheres to a strict JSON document schema. This structure bridges standard Dublin Core metadata elements with press-specific indexing attributes.
3.1 Metadata Attributes Standard
| Field Name | Data Type | Requirement | Description / Standard |
record_id | String (UUID) | Required | Unique archival identifier (e.g., PFJA-REC-1984-0412) |
title_en | String | Required | English title or headline translation |
title_ur | String | Optional | Urdu headline (rendered in Gulzar font) |
publication_name | String | Required | Source publication (e.g., Nawa-i-Waqt, Dawn) |
publication_date | String (ISO 8601) | Required | Original print date (YYYY-MM-DD) |
author_editor | Array of Strings | Optional | Byline journalists, columnists, or editors |
language_primary | Enum | Required | Primary script (ur or en) |
page_number | Integer / String | Optional | Original newspaper edition page/section |
ocr_extracted_text | Text Object | Required | Key-value mapping of raw OCR text by language |
media_assets | Object Array | Required | Cloud CDN URLs, image dimensions, and WebP srcset |
tags | Array of Strings | Required | Categorization tags (separated by commas) |
permalink | String | Required | URL slug formatted with hyphens |
3.2 Standard JSON Schema Definition
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "PFJAPressRecord",
"type": "object",
"properties": {
"record_id": { "type": "string" },
"permalink": { "type": "string" },
"title_en": { "type": "string" },
"title_ur": { "type": "string" },
"publication": {
"type": "object",
"properties": {
"name": { "type": "string" },
"date": { "type": "string", "format": "date" },
"edition": { "type": "string" },
"page": { "type": "string" }
},
"required": ["name", "date"]
},
"language": {
"type": "object",
"properties": {
"primary": { "type": "string", "enum": ["en", "ur"] },
"has_dual_text": { "type": "boolean" }
},
"required": ["primary"]
},
"ocr_content": {
"type": "object",
"properties": {
"text_en": { "type": "string" },
"text_ur": { "type": "string" },
"confidence_score": { "type": "number", "minimum": 0, "maximum": 100 }
}
},
"media_assets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"asset_id": { "type": "string" },
"webp_url": { "type": "string", "format": "uri" },
"dpi": { "type": "integer" },
"width": { "type": "integer" },
"height": { "type": "integer" }
},
"required": ["asset_id", "webp_url"]
}
},
"tags": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["record_id", "permalink", "title_en", "publication", "language", "media_assets", "tags"]
}
4. Technical Migration Roadmap: Blogger to Custom Self-Hosted Framework
To ensure long-term archival autonomy, data ownership, and advanced full-text search capabilities, a phased migration strategy is defined to transition the archive from the legacy Blogger/Cloudflare setup to a dedicated, self-hosted headless architecture (e.g., Next.js / Astro static generator with a Node.js API and PostgreSQL/Document database).
[ Phase 1: Data Extraction & Transformation ]
│
▼
[ Phase 2: Asset Relocation to Cloudflare R2 / S3 ]
│
▼
[ Phase 3: Target Platform & API Deployment ]
│
▼
[ Phase 4: DNS Routing, 301 Redirect Mapping & Cutover ]
4.1 Migration Phases & Execution Timeline
| Phase | Technical Objective | Key Deliverables & Tooling |
| Phase 1: Extraction & Parsing | Export raw XML data & extract post bodies | Google Takeout XML, custom Python parsing scripts to extract HTML/metadata into JSON schema. |
| Phase 2: Asset Migration | Relocate media assets from Google CDN | Asset scraper downloading WebP files, bulk upload to Cloudflare R2 / S3 object storage with CDN URL rewrites. |
| Phase 3: Core App Engine | Build headless frontend & API back-end | Next.js/Astro SSG framework, PostgreSQL DB with Meilisearch / Elasticsearch for bilingual press text search. |
| Phase 4: URL & DNS Cutover | Zero-downtime DNS switch & SEO preservation | 1:1 permalink mapping table, Cloudflare Page Rules / Workers enforcing 301 permanent redirects. |
4.2 Permalink & SEO Mapping Strategy
To preserve search engine rankings and existing inbound links, all legacy Blogger permalinks (/YYYY/MM/post-title.html) will be mapped to clean archival endpoints (/archive/post-title) using Cloudflare Workers edge rules.
Legacy URL:
[https://pfja.org/2026/05/historical-record-nawa-i-waqt.html](https://pfja.org/2026/05/historical-record-nawa-i-waqt.html)Target Clean Permalink:
[https://pfja.org/archive/historical-record-nawa-i-waqt](https://pfja.org/archive/historical-record-nawa-i-waqt)HTTP Redirect Status:
301 Moved Permanently
5. Technical Specifications & Benchmarks
| Component / Metric | Technical Specification | Operational Target |
| Document Delivery | Asynchronous JSON/XML Payload Loading | First Contentful Paint (FCP) $< 1.2\text{ s}$ |
| Bilingual Layout | English & Urdu Dual-Spacing CSS Engine | 100% Cross-Device Alignment |
| Archival Assets | High-Compression WebP Image Processing | Lightweight Press Clippings |
| Uptime Guarantee | Google CDN + Edge Distributed Routing | 99.9% High Availability |
| Transport Security | TLS 1.3 / HTTPS Enforced | A+ Security Grade |
6. Data Processing & Archive Pipeline
[ Historical Newspaper / Press Record Scan ]
│
▼
[ Pre-Processing: Deskewing, Contrast & Binarization ]
│
▼
[ Dual-Language OCR (Urdu / English Extraction) ]
│
▼
[ WebP Image Compression (Responsive srcset) ]
│
▼
[ Metadata Structuring & JSON Schema Validation ]
│
▼
[ Cloudflare Edge CDN & Edge Routing ]
│
▼
[ Asynchronous Client-Side DOM Injection (Gulzar Urdu Engine / English Layout) ]
7. Security, Compliance & Data Preservation
HTTPS Enforcement: Universal SSL/TLS encryption shields reader traffic and ensures data integrity.
Redundant Backups: Periodic full-site XML automated exports protect the digital repository against data loss.
Cache Management: Edge-based cache invalidation rules ensure updated historical records reflect instantly across regions.
Robots & Indexing Control: Clean XML sitemaps and structured Schema.org markup optimize record visibility across search engines.