kaushik.paykoli()fullstack_engineer
// Case Study / Real Estate SaaS & Production Infrastructure

OwnEx Properties

A premium, full-stack real estate discovery storefront and administrative CRM engine. Built for an actual client and deployed to production, it implements custom client-side asset pipelines, technical SEO indexes, and event-driven routes to handle heavy media within serverless gateway constraints.

Tech Stack

Next.js 15TypeScriptMongoDB AtlasMongooseCloudinary CDNWeb WorkersDiscord Webhooks
STATUS: DEPLOYED // CDN_OPTIMIZED
OwnEx Properties Showcase Banner
// 01 / The Friction

The Problem & Target Constraints

Luxury real estate brokerages operate in highly competitive, low-latency environments where lead acquisition velocity is directly tied to revenue. Standard real estate CRMs are clunky, slow to index property inventory in search engines, and crash silently when agents attempt to upload massive high-resolution property portfolios directly in the field.

[!]

Real-World Impact: Every second of delay in indexing a new multimillion-dollar listing is a lost organic search opportunity. Additionally, direct CRM crashes during photo uploads cause database desynchronization and halt brokerage operations.

// 02 / System Design

System Architecture & Flows

Direct client-side visual model mapping of data transactions, lifecycle schemas, and event hooks.

Loading System Architecture...
Loading System Architecture...
// 03 / The Post-Mortem

Deep-Dive Engineering Challenges

Below is a structured breakdown of the difficult constraints and tradeoffs resolved during the design phase.

Challenge 01: Bypassing Serverless Payload Gateways (413 Content Too Large)

SYSTEM_STABILITY: ACTIVE

// The Problem

Vercel’s serverless hosting architecture strictly rejects incoming HTTP payloads exceeding 4.5MB at the reverse-proxy layer, causing multi-file high-res property photo uploads to fail instantly.

// Why It Was Difficult

Increasing the Next.js standard body limit does not override physical reverse-proxy serverless limitations. Heavy server-side processing also spikes serverless execution budgets and costs.

// The Solution

Engineered a client-side Web Worker pipeline that intercepts file selections. The pipeline utilizes browser-image-compression in parallel threads via Promise.all() to compress high-res assets by over 80% directly on the client's hardware before appending the compressed binary payloads to the FormData transmission stream.

// Pragmatic Tradeoffs

Slightly increases the client's local CPU utilization during file selection, but guarantees 100% upload success, saves massive CDN storage space, and cuts serverless egress bandwidth costs.

Challenge 02: Cross-Domain Brochure Rendering Restrictions

SYSTEM_STABILITY: ACTIVE

// The Problem

Cloudinary CDN serves PDF assets with forced Content-Disposition: attachment headers, making direct inline browser previews within the administrative dashboard impossible without launching local PDF viewer downloads.

// Why It Was Difficult

Raw bucket URL manipulation is restricted. Compiling heavy WebAssembly PDF rendering libraries (like PDF.js) in the client bundle spikes loading weights by over 2.5MB.

// The Solution

Created a zero-dependency React preview wrapper that wraps the Cloudinary URL inside the Google Docs Viewer API, forcing native cross-domain rendering directly inside an iframe container.

// Pragmatic Tradeoffs

Relies on an external Google rendering service, but completely avoids bundle-bloat, maintaining a lightning-fast dashboard load speed.

Challenge 03: Non-POJO Client-Server Serialization Crashes

SYSTEM_STABILITY: ACTIVE

// The Problem

Passing MongoDB document records containing ObjectId parameters directly from Next.js Server Components to interactive Lead Modals (Client Components) triggers strict network boundary serialization errors.

// Why It Was Difficult

Manually mapping every schema record is tedious, prone to typing bugs during updates, and creates maintenance overhead.

// The Solution

Implemented a deep-cloning JSON.parse(JSON.stringify(data)) utility mapping all '_id' keys to standard interface strings before pushing data across the network boundary, ensuring schema integrity.

// Pragmatic Tradeoffs

Wastes minor CPU cycles during deep cloning of massive datasets, which we mitigate by applying database select projections (.select() and .lean()) to prune document sizes.

// 04 / Core Logic

Architecture & Execution Decisions

// Core Pipeline Design

OwnEx uses a modular Event-Driven Serverless architecture. The Next.js 15 App Router handles routes and dynamic server-side rendering (SSR), and Server Actions serve as secure, typed boundaries validating payloads via Zod schemas. Mongoose ODM handles document mapping to MongoDB Atlas. When actions write data (such as listing inquiries), the server fires parallel Webhooks pushing lead cards to Discord, serving as a zero-cost, zero-latency CRM.

// Interface Orchestration

The public UI is designed with static routing fallbacks, while the sitemap generator dynamically queries MongoDB active listings at compile-time to merge static metadata with live listing URLs, guaranteeing instant Google Search Console indexing.

// Media & Memory Bounds

Media is streamed directly from Web Worker compression threads to Server Actions, which stream the buffers to Cloudinary CDN, writing the resulting secure URLs back to MongoDB. This prevents the serverless functions from holding large files in memory.

// 05 / Visual Telemetry

Production Screenshots & Gallery

Select and maximize thumbnails below to audit raw workspace interfaces and active dashboards.

active_workspace_preview.png
OwnEx Public Storefront Homepage
Click to expand

OwnEx Public Storefront Homepage: Premium client-facing property discovery marketplace optimized for SEO and technical speed.

// 06 / Features Matrix

Detailed Technical Highlights

Production Deployment

Successfully configured client domain DNS, custom email redirects, and continuous integration pipelines.

Dynamic Technical SEO

Automated sitemap mapping that updates sitemaps in real-time as listings are modified in the database.

Lead Generation Gates

Gated PDF document downloads that capture and validate user contact information before unlocking assets.

// 07 / Post-Mortem Lessons

Lessons & Engineering Retrospectives

// 01 / WHAT WENT WELL

System Successes

The Web Worker image compression pipeline worked exceptionally well, saving several gigabytes of CDN storage costs and ensuring zero upload failures.

// 02 / IMPROVEMENT BOUNDS

Areas to Optimize

For large scale data, relying on full MongoDB text searches can become slow. Integrating a dedicated search index (like Meilisearch or Algolia) would optimize filtering speeds.

// 03 / SYSTEM MINDSET

Operational Learnings

Deploying to production forces you to respect physical network and gateway limits that never appear in local host mockups. Architecture must be designed with constraints in mind.

Interactive Video Walkthrough

Watch a complete structural screen-cast demonstration detailing the pipeline routing, interface mechanics, and active ledger locks.