PropSpaceX Property Service

Real-estate management microservice — geospatial search on MongoDB, a property lifecycle state machine, and decentralized ownership verification through Ethereum smart contracts.

Node.jsTypeScriptMongoDBEthereumgRPC
GitHub
01

System Architecture

REQUESTPOST /properties/:id/listtracing
gRPCsearchdocsstate changeverify on-chainAPI GatewayExternal trafficEDGEInternal ServicesBulk syncEDGEREST APIProperty CRUDSVCgRPC ServerStreaming queriesSVCGeo EngineRadius · polygon searchSVCDoc VerifierOCR · fraud checksSVCLifecycle SMlisted → pending → soldSVCMongoDB2dsphere indexDATAEthereumTokenized ownershipEXT

Listing changes run through a lifecycle state machine. Legal documents pass the verifier, ownership is proven against Ethereum smart contracts, and the result — including the 2dsphere-indexed location — is persisted to MongoDB.

02

Database Design

SCHEMA3 tables · 2 relationshover a table
propertiesMongoDB_idobjectIdowner_iduuidtitlestringpricenumberstatusenumlocation2dspheretoken_idstringcreated_atdatedocumentsMongoDB_idobjectIdproperty_idobjectIdtypestringurlstringverifiedboolverified_atdateownership_recordsMongoDB_idobjectIdproperty_idobjectIdwallet_addressstringtx_hashstringblock_numbernumbercreated_atdate

Every property carries its documents and an immutable chain of ownership records tied to wallet addresses and transaction hashes.

03

Engineering Challenges

01

Geospatial search

MongoDB 2dsphere indexes power radius and polygon searches over listings without a separate search service.

02

Document verification

OCR and validation pipeline for legal property documents, with fraud-pattern checks before approval.

03

Lifecycle state machine

Listing → pending → sold transitions are guarded server-side so no property skips required verification steps.

04

On-chain ownership

Smart-contract integration proves ownership on Ethereum and records tokenized transfers immutably.

04

Trade-offs & Decisions

ChoseOverBecause
MongoDBPostGISFlexible listing attributes plus native 2dsphere indexing covered the geo needs without a second store.
gRPCRESTStreaming works better for bulk property sync between services.
EthereumDB-only recordsTokenized real estate needs an ownership record that no single operator can rewrite.