Parcela
ActiveFeatured

Parcela

Full-stack real estate platform with geo search, offer negotiation, and mortgage pipeline

Technologies

Next.js 15v15TypeScriptReact QueryTailwind CSSFastifyPostgreSQLv16ElasticsearchRedis+4 more

Overview

Parcela is a full-stack real estate platform covering the full transaction lifecycle. Buyers browse and filter properties with sub-100ms full-text and geo-radius search, schedule showings, and submit offers through a multi-step negotiation flow with counter-offer chains. Agents manage their pipeline through a Kanban CRM and respond to offers as they come in. The mortgage module lets buyers upload documents, tracks OCR processing via BullMQ workers, and moves applications through approval stages. The platform is live in production: API on Fly.io, web on Vercel, database on Neon PostgreSQL.

Key Highlights

  • Full-stack platform live in production: API on Fly.io, web on Vercel, database on Neon
  • Elasticsearch geo-radius and full-text search with auto-complete and sub-100ms queries
  • Real-time offer negotiation with counter-offer chains via Socket.io
  • Agent CRM with Kanban pipeline (offer pending, in escrow, closing, closed)
  • 5-queue BullMQ system for async indexing, OCR, notifications, and PDF generation
  • Two-layer offer idempotency: Redis cache backed by a PostgreSQL UNIQUE constraint
  • JWT and Google OAuth with role-based access control across buyer, agent, and admin
  • S3 presigned URLs for secure document uploads (15min PUT, 5min GET)

The Challenge

Problem Statement

Real estate transactions involve multiple parties, complex multi-round negotiation, and document-heavy mortgage workflows. All of that requires strong consistency, real-time updates, and a clean separation of buyer, agent, and admin concerns. Building on a tight budget meant choosing managed infrastructure that scales to zero while staying production-ready.

This challenge required a solution that could scale to handle enterprise-level traffic while maintaining accuracy and providing a seamless user experience. The system needed to be production-ready from day one, with robust error handling and monitoring capabilities.

The Solution

Our Approach

A Fastify API with raw SQL enforces strict RBAC across three roles. Elasticsearch handles listing discovery with geo queries and auto-complete. Socket.io broadcasts offer events to all parties live. BullMQ workers handle async work (Elasticsearch indexing, OCR, email notifications, PDF generation) without blocking the API. Redis backs both the queue broker and idempotency keys to prevent duplicate offer submissions.

Architecture Overview

Loading diagram...

The Next.js frontend on Vercel communicates with the Fastify API on Fly.io. The API handles authentication via JWT and RBAC, writes to Neon PostgreSQL, and dispatches events. Five BullMQ workers consume from Redis queues for async work: Elasticsearch indexing, OCR processing, Socket.io notifications, PDF generation, and scheduled tasks. S3 stores documents and listing images behind presigned URLs.

Key Technical Decisions

1

Raw SQL over ORM

Full control over query plans, no N+1 surprises, and direct use of PostGIS extensions for geo queries. Every query is explicit and reviewable.

Alternatives Considered:

  • Prisma
  • Drizzle
2

BullMQ for all async work

Separating Elasticsearch indexing, OCR, notifications, and PDF generation from the request cycle keeps API latency predictable and makes job failures retryable without data loss.

Alternatives Considered:

  • In-process async functions
  • Serverless jobs
3

Offer idempotency via Redis and DB constraint

Two-layer protection: Redis deduplicates within 24 hours for speed, while a PostgreSQL UNIQUE constraint acts as a durable backstop, preventing double submissions even after cache expiry.

Alternatives Considered:

  • DB constraint only
  • Client-side deduplication
4

Neon PostgreSQL with branch-based environments

Neon's branching model gives instant dev/prod database isolation with point-in-time restore, without running a separate server.

Alternatives Considered:

  • Supabase
  • Render PostgreSQL

Technologies Used

Results & Achievements

🏠

Active Listings

22

All with images, indexed and searchable in Elasticsearch

Search Latency

<100ms

Full-text and geo-radius queries via Elasticsearch

🗄️

Domain Tables

13

Full relational schema with PostGIS, triggers, and 18 migrations

⚙️

Async Workers

5

BullMQ workers covering ES sync, OCR, notifications, PDF, and scheduled tasks

📡

Event Types

17

Event-driven architecture covering offers, showings, mortgage stages, and documents

Key Achievements

  • Full-stack platform live in production: API on Fly.io, web on Vercel, database on Neon

  • Elasticsearch geo-radius and full-text search with auto-complete and sub-100ms queries

  • Real-time offer negotiation with counter-offer chains via Socket.io

  • Agent CRM with Kanban pipeline (offer pending, in escrow, closing, closed)

  • 5-queue BullMQ system for async indexing, OCR, notifications, and PDF generation

  • Two-layer offer idempotency: Redis cache backed by a PostgreSQL UNIQUE constraint

  • JWT and Google OAuth with role-based access control across buyer, agent, and admin

  • S3 presigned URLs for secure document uploads (15min PUT, 5min GET)

Want to Build Something Similar?

I specialize in building production-ready AI systems that scale. Let's discuss your project.