Cross-cutting Concepts
Domain Model
Authentication & Authorization
The platform uses a layered security approach:
-
Supabase Auth provides user registration, login (email/password, social providers), and JWT token issuance
-
Row-Level Security (RLS) in PostgreSQL enforces data isolation — users can only access their own data, agents can access their listings
-
Role-Based Access Control (RBAC) defines permissions for: Buyer, Seller, Renter, Agent, Developer, Admin
-
Workload Identity Federation secures CI/CD pipelines between GitHub/Azure DevOps and GCP without shared credentials
-
Account Federation between Google Workspace and Azure Entra enables single sign-on for internal team members
Location & Geocoding
Location handling is central to Asta Homes. The platform supports multiple addressing systems:
| System | Handling |
|---|---|
Ghana Post Digital GPS |
Addresses like "GA-543-0125" or "GA5430125" (without dashes) are both accepted. The system normalizes input and decodes to GPS coordinates. |
Google Plus Codes |
Open Location Codes (e.g., "9G5MGJ4G+X4") are decoded to latitude/longitude via the Google Maps API. |
Traditional Addresses |
Street addresses are geocoded via Google Maps Geocoding API with location autocomplete restricted to Ghana. |
GPS Coordinates |
Direct latitude/longitude input is supported for geofencing and property pinning. |
Adaptive Image Quality
Property images are critical for the user experience. The platform implements:
-
Responsive image serving: Different image resolutions served based on device screen size and network conditions
-
CDN caching: Images are cached at Cloud CDN edge locations for fast global delivery
-
Format optimization: Modern formats (WebP, AVIF) served when supported by the browser
-
Lazy loading: Images below the fold are loaded on demand to improve initial page load time
Natural Language Search
The search system processes queries in natural English:
-
Query parsing — Extract intent, constraints (distance, time, price), landmarks, and property types
-
Entity resolution — Map landmark names to coordinates (e.g., "Kotoka airport" → lat/lng)
-
Fuzzy matching — Handle spelling errors using edit distance algorithms
-
Geospatial computation — Calculate distances/travel times using Google Maps Distance Matrix API
-
Result ranking — Combine relevance, proximity, price match, and ML-based personalization
Machine Learning & Recommendations
-
Similar properties — Content-based filtering using property features (location, price, size, type)
-
User preference matching — Collaborative filtering based on browsing history and saved searches
-
Market predictions — Price trend analysis using historical transaction data
-
Search ranking — Personalized result ordering based on user behavior patterns
Workflow Automation
Windmill orchestrates the following key workflows:
-
Property listing approval — Automated checks + manual review for new listings
-
Saved search alerts — Periodic matching of new listings against saved search criteria
-
Transaction processing — Multi-step payment, verification, and notification flow
-
Data synchronization — Regular sync with Ghana Lands Commission and partner data sources
-
Report generation — Scheduled market analytics reports for agents and developers
Monitoring & Observability
-
Cloud Monitoring — Tracks request latency, error rates, container CPU/memory, and custom business metrics
-
Cloud Logging — Centralized structured logging from all Cloud Run services
-
Alerting — Automated alerts for SLA violations (targeting 99.999% uptime)
-
Dashboards — Real-time visibility into platform health, search performance, and user engagement
Internationalization
-
Default language: English
-
Multilingual support planned for: French, Twi, and other regional languages
-
Currency: Ghana Cedi (GHS) as primary, with USD and EUR conversion for international users
-
Date/time formatting respects user locale settings
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.