LandMarket API is the core backend engine powering Nigeria's premier real estate, agent, and architectural marketplace. Built with Django REST Framework and Django Channels, it provides scalable, secure, and resilient endpoints handling role-based authentication, real-time WebSocket chat connections, identity verification, property directories, wallet escrows, and blogging modules.
🔌 Live Production API Base URL: https://real-estate-api-orbx.onrender.com/api/v1/
🌐 Client Frontend SPA: https://landmarketnig.vercel.app
- JWT Authentication: Powered by
djangorestframework-simplejwtwith short-lived access tokens and refresh mechanisms. - Role-Based Access Control (RBAC): Custom model roles distinguishing between
buyer,realtor,architect,agent,landlord, anddeveloperworkflows.
- Stateful Connections: Async WebSocket consumers built on
channelsanddaphneto handle instant chat messaging. - Query String Authentication: WebSocket connections authenticate token-based sessions directly via URL query params.
- Dojah Integration: Real-time identification check API validating BVN (Bank Verification Number) and NIN (National Identification Number).
- Webhooks Listener: Receives asynchronous verification success/failure webhooks directly from Dojah.
- Milestone Escrows: Secure payment holding module. Connections fees or property transactions are deducted from the buyer's wallet and held in escrow.
- Milestone Dispute & Release: Standard dispute filing and validation logic allowing users to resolve or release milestone funds.
- Multi-Owner Listings: Unified property creation schema supporting Realtors, Landlords, Developers, and certified Architects.
- View Deduplication: Custom property view tracking logic to filter unique view count increments by IP per hour.
- Auto-Read Time: Custom tag, category, and markdown parsing that auto-calculates article read time.
- Role Permissions: Staff, admins, and authenticated realtors can manage and publish drafts.
| Endpoint Prefix | Description | Key Features / Methods |
|---|---|---|
/auth/ |
Authentication, registrations, profile completions, and details | POST /login/, GET /profile/, PATCH /complete-profile/ |
/properties/ |
Property listings catalog, views, state/LGA filtering, and creations | GET /properties/, POST /properties/, POST /properties/<id>/images/ |
/agents/ |
Agent profiles, locations coverage management, and connection setups | GET /agents/profiles/, POST /agents/profiles/<id>/add_location/ |
/architects/ |
Accredited architects directory, profile setups, and ratings | GET /architects/profiles/, POST /architects/profiles/me/ |
/landlords/ |
Private landlord directories, descriptions, and reviews | GET /landlords/profiles/, POST /landlords/profiles/me/ |
/developers/ |
Estate developers layout showcases and directories | GET /developers/profiles/, POST /developers/profiles/me/ |
/wallets/ |
Deposit modules, transaction logs, and balances | GET /wallets/me/, POST /wallets/deposit/ |
/escrows/ |
Property escrow contracts, releases, and dispute declarations | POST /escrows/, POST /escrows/<id>/release/ |
/chat/ |
Chat session details, message lists, and WebSocket routes | GET /chat/sessions/, WS /ws/chat/<session_id>/ |
/blog/ |
Public blog posts, category configurations, and dashboard draft editors | GET /blog/posts/, POST /blog/posts/, GET /blog/categories/ |
/kyc/ |
BVN/NIN identity check submissions and Webhook interfaces | POST /kyc/initiate/, POST /kyc/webhook/ |
- Python 3.10+
- SQLite (or PostgreSQL/Neon for live operations)
git clone https://github.com/Victormarshall911/real_estate_api.git
cd real_estate_api
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root:
DEBUG=True
SECRET_KEY=your-development-secret-key
DATABASE_URL=sqlite:///db.sqlite3
FRONTEND_URL=http://localhost:5173python manage.py migratepython manage.py createsuperuserTo enable full WebSocket support (chat), run the server using Daphne:
daphne -p 8002 config.asgi:applicationAPI endpoints will be accessible at http://localhost:8002/api/v1/.
apps/
├── accounts/ # Custom user models, JWT tokens, & RBAC profiles
├── agents/ # Agent locations pricing, connections & completions
├── architects/ # Accredited architect profiles & reviews
├── blog/ # Categories, tags, & markdown draft posts
├── chat/ # Chat message models & WebSocket routing consumers
├── developers/ # Developer layouts & showcase listings
├── escrows/ # Payment holds, milestones & disputes
├── kyc/ # Dojah BVN/NIN verification services & webhooks
├── landlords/ # Landlord profiles & reviews
├── payments/ # Paystack transaction logging
├── properties/ # Property listings, image uploads & unique view counts
├── subscriptions/ # Listing plans & limitations
└── wallets/ # Wallet transactions & deposits
config/
├── asgi.py # ASGI configuration (Daphne/Channels setup)
├── settings/ # Base, local, dev & production settings init
└── urls.py # Global versioned route entries