Skip to content

BlocMarket Documentation

BlocMarket is a multi-platform land assembly marketplace that connects grouped homeowners with property developers via consolidated “Blocs,” resolving the Holdout Problem through gamification and the Tenant Eviction Problem through guaranteed financial incentives.

The entire stack is Rust (edition 2024) organised as a 35-crate Cargo workspace, with a Leptos WASM web frontend, a Tauri v2 mobile app, and an Axum HTTP/WebSocket API backed by PostgreSQL 16 + PostGIS and Redis 7.

  • Bloc Formation — Aggregate individual properties into development-ready assemblies with contiguity validation and a gamified state machine (proposals, voting, consensus)
  • Spatial Search — PostGIS-powered proximity, radius, and bounding-box queries for property discovery
  • Escrow Payments — Stripe-integrated escrow plus Open Banking instant bank payments via TrueLayer
  • E-Signatures — DocuSign execution of Option Agreements
  • Real-Time Updates — JWT-authenticated WebSocket streams for bids and notifications
  • Enterprise API — OAuth 2.0 client credentials and API key authentication for third-party integrations
  • Expansion Products — Nine additional products across Developers, Grid, and Yield categories
LayerTechnologyRole
Frontend (Web)Leptos 0.7.8Reactive WASM UI, compiled via Trunk
Frontend (Mobile)Tauri 2.10Native iOS/Android shell over Leptos WASM
API ServerAxum 0.8.8Async HTTP/WebSocket backend
DatabasePostgreSQL 16 + PostGISSpatial queries, relational data
CachingRedis 7Session store, rate limiting
Tile ServerMartinVector tile serving for MapLibre GL
PaymentsStripeEscrow, Open Banking, identity verification
E-SignaturesDocuSignOption Agreement execution
Push NotificationsFirebase (FCM)Mobile push delivery
bloc_market/
apps/api/ # Axum API binary (bloc-api)
apps/web/ # Leptos WASM frontend (bloc-web)
apps/mobile/ # Tauri v2 mobile app
crates/ # 31 library crates (auth, db, cache, geospatial, ...)

Key crates: core (domain types), db (SQLx queries), auth (JWT/Argon2id), geospatial (PostGIS spatial search), monitoring (metrics/alerting), assemblies (bloc formation state machine), payments (Stripe integration), webhooks (HMAC-SHA256 delivery).

Installation

Set up Rust 1.85+, Docker, PostgreSQL 16, and build the workspace.

Quickstart

Start services, register a user, create a property, and place a bid in 5 minutes.

Architecture

The 35-crate workspace, event sourcing foundations, and RBAC model.

API Reference

REST endpoints, authentication, RFC 7807 errors, and rate limits.

Deployment

nginx + systemd production deployment, Docker, and Kubernetes.

Compliance

UK GDPR data mapping and FCA PSD2 payment compliance.