Copyright (C) 2024 PremoWeb LLC
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License v3 for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
While this software is open source and free to use, professional setup and customization services are available:
- Rate: $125/hour
- Provider: Nick Maietta [email protected] or call +1-855-624-3882
- Billing: PremoWeb LLC
- Payment: Upfront payment required for estimated time. Quotes are free.
A full-featured SvelteKit realty website is available for purchase and customization. This modern, high-performance website integrates seamlessly with this RETS data service. Contact Nick Maietta for pricing and customization options. Volume discounts available for multiple sites.
This software was released as open source after a complete rewrite from the ground up. The previous version was developed in partnership, but due to payment collection issues, a new version was created independently. This new version is entirely separate from the previous partnership, allowing it to be released under the GPL v3 license.
This service manages the synchronization of real estate data and photos from RETS servers.
The main data synchronization service that runs continuously and handles:
- Automatic data synchronization from RETS servers
- Database updates and maintenance
- Table creation and schema management
- Background photo processing and optimization
- Active listings: Updated every minute
- Sold listings: Updated every 3 hours (at 3, 6, 9, 12 hour intervals)
- Expired/Withdrawn listings: Removed every 3 hours (at 3, 6, 9, 12 hour intervals)
To start the data sync service:
bun run service.ts
An integrated service that automatically processes photos in the background:
- Processes property photos in parallel
- Optimizes images for different sizes (original, large, medium, small, thumb)
- Manages photo processing state in the database
- Handles retries and error recovery
- New/Updated listings (immediate processing)
- Active listings
- Sold listings
Photos are processed in the background and uploaded to Object Storage according to the priority order above. No manual intervention required - the service automatically manages the entire photo processing pipeline.
The following scripts are available for manual operations:
-
getPhotos.ts
- Fetch photos for a specific listing, agent, or officebun run getPhotos.ts <type> <id> # Example: bun run getPhotos.ts Property 230475 # Example: bun run getPhotos.ts Agent 42 # Example: bun run getPhotos.ts Office 5
-
fetchAgentOfficePhotos.ts
- Batch fetch photos for agents and officesbun run fetchAgentOfficePhotos.ts
-
syncLookups.ts
- Synchronize lookup tables and reference databun run syncLookups.ts
This script maintains essential lookup tables that power front-end functionality:
- Property types and styles
- Cities, neighborhoods, and school districts
- Agent and office information
- Property features and amenities
- Status codes and listing types
These lookup tables are crucial for:
- Search filters and faceted navigation
- Form dropdowns and selection menus
- Data validation and standardization
- Geographic search capabilities
- Property categorization and organization
Run this script after initial setup and whenever you need to refresh reference data.
-
lib/
- Core library coderets/
- RETS-specific functionalityphotoProcessingService.ts
- Photo processing servicephotoWorker.ts
- Worker thread for parallel photo processingpropertyPhotos.ts
- Core photo processing functionality
db/
- Database operationsauth/
- Authentication and session managementutils/
- Utility functions
-
scripts/
- Utility scriptssyncPhotosToObjectStorage.ts
- Sync photos to object storage
-
cache/
- Local cache directory for photos and temporary data
- Bun runtime
- MySQL database
- RETS server credentials
- S3-compatible object storage provider (e.g., Vultr Object Storage, AWS S3, etc.)
- Access key
- Secret key
- Bucket name
- Endpoint URL