# Harvinder Singh — Co-Founder & CTO, 7Zen Labs | Systems Architect
> Personal portfolio, architectural case studies, and engineering blog.

## Overview
Harvinder Singh is the Co-Founder & CTO of 7Zen Labs. He specializes in high-correctness systems architecture, distributed backend services, local-first offline applications, and mission-critical compliance platforms.

- **Primary Website**: https://harvindersingh.in
- **Full Architecture Corpus (llms-full.txt)**: https://harvindersingh.in/llms-full.txt
- **Commercial Startup (7Zen Labs)**: https://7zenlabs.com
- **Direct Contact & Inquiries**: https://harvindersingh.in/#contact
- **Portfolio Repository**: https://github.com/harvindertapper/portfolio
- **GitHub**: https://github.com/harvindertapper
- **GitHub Organization**: https://github.com/HarvinderDev
- **LinkedIn**: https://www.linkedin.com/in/harvindertapper
- **Email**: contact@harvindersingh.in
- **Location**: India (UTC+5:30) • Co-Founder & CTO @ 7Zen Labs • Available for enterprise partnerships and systems architecture advisory.

---

## Core Engineering Competencies

### Systems & Architecture
- **Correctness & Consistency**: Finite state machines (FSM), immutable audit ledgers, temporal validity, double-entry accounting models.
- **Local-First & Offline Resilience**: Room SQLite, transactional sync outbox patterns, service worker offline persistence.
- **Strict Compliance & Rule Engines**: Abstract Syntax Tree (AST) dynamic rule orchestration, Drug-Drug Interaction (DDI) decision matrices.
- **License Isolation & Security**: AGPL-3.0 build-time precomputation isolation with automated CI verification gates.

### Languages & Frameworks
- **Backend**: Python (FastAPI, SQLAlchemy, Alembic, Celery), Node.js (TypeScript, Express, Fastify).
- **Mobile**: Native Android (Kotlin, Jetpack Compose, Coroutines, Room SQLite, CameraX ML Kit).
- **Frontend & Edge**: Next.js 16 (App Router), React 19, TypeScript, Astro, Tailwind CSS v4, Motion, Cloudflare Workers & D1 SQL.
- **Databases & Storage**: PostgreSQL (immutable audit trails, RLS), Cloudflare D1 SQL, SQLite (WAL mode), Redis.
- **Cloud & DevOps**: Cloudflare Workers & Pages, Docker, AWS (S3, ECS, RDS), GitHub Actions CI/CD, Linux Systems Administration.

---

## Notable Projects & Architectural Case Studies

### 1. RxCompliance — Enterprise AST Audit & Clinical Matrix
- **Case Study**: https://harvindersingh.in/projects/pharma-compliance
- **Description**: Enterprise regulatory compliance and audit tracking engine designed for clinical pharmacies, distributor inventory validation, and cold-chain compliance verification.
- **Key Innovation**: Dynamic AST rule orchestrator, Drug-Drug Interaction (DDI) clinical decision support, multi-tier anomaly detection, immutable append-only audit ledgers, and formal Module Acceptance Records (M01-M08).
- **Tech Stack**: Python FastAPI, SQLAlchemy, PostgreSQL, Alembic, Redis, Celery.

### 2. RetailOS — Offline-First Native Android POS
- **Case Study**: https://harvindersingh.in/projects/retail-os
- **Description**: High-throughput native Android point-of-sale and retail inventory platform engineered for zero rounding errors and unreliable network connectivity.
- **Key Innovation**: Sub-second CameraX ML Kit barcode scanning, integer-paisa financial safety, offline-first transactional Room SQLite outbox sync, and bilingual localization.
- **Tech Stack**: Native Android (Kotlin), Jetpack Compose, Room SQLite, Coroutines, Material 3.

### 3. CarePulse — Clinical Operations & Triage Platform
- **Case Study**: https://harvindersingh.in/projects/carepulse
- **Description**: Mission-critical clinical operations ecosystem streamlining patient triage queues, appointment verification, multi-department telemetry, and administrative records.
- **Key Innovation**: Edge-deployed with Cloudflare D1 SQL, role-based access control (RBAC), OTP appointment verification, and a 127KB admin console.
- **Tech Stack**: Next.js 15, React 19, Cloudflare D1 SQL, Tailwind CSS, TypeScript.

### 4. CareDispatch — Distributed Clinical Operations Monorepo
- **Case Study**: https://harvindersingh.in/projects/caredispatch
- **Description**: Multi-package clinical care orchestration monorepo with Turborepo, Drizzle ORM, type-safe scenario domain contracts, and algorithmic dual-supply dispatch modeling.
- **Key Innovation**: Zero-leakage domain contracts, sub-80ms route solver, and automated unit-economics pricing simulation.
- **Tech Stack**: Turborepo, TypeScript 5, Drizzle ORM, PostgreSQL, Vitest.

### 5. Aaj — Offline Indian Daily Almanac (PWA)
- **Case Study**: https://harvindersingh.in/projects/7zen-aaj
- **Description**: Consumer daily almanac PWA featuring build-time Swiss Ephemeris astronomical precomputations and strict legal compliance.
- **Key Innovation**: Automated CI gate isolating AGPL-3.0 astronomical calculation code to build-time Python tools, precomputing facts for ~30 Indian cities (2026-2028) with dual-source Rashtriya Panchang golden set validation.
- **Tech Stack**: Astro, PWA, Service Workers, Python SwissEph, GitHub Actions.

---

## Architecture Notes & Articles
- **Architecting Offline-First Point-of-Sale: Integer Paisa Math and Transactional Sync Outboxes**: Deep dive into 64-bit integer paisa math, Room SQLite WAL transactions, and idempotent outbox state machines.
- **What 2 AM Hospital Bugs Taught Me About Database Isolation**: Practical patterns for zero-trust immutable audit logs and transactional consistency in healthcare systems.
- **Getting Autonomous AI Swarms to Review GitHub PRs Without Hallucinating**: Design patterns for finite-state multi-agent coordination and deterministic verification gates.
