Search by

drupal / realtor

Drupal-Infrastructure

A site template for an individual real estate agent: searchable listings, listing pages with inquiry, neighborhoods, and buyer and seller services. Demonstrated by Harbor Hollow Realty.

Package info

git.drupalcode.org/project/realtor.git

Homepage

Type:drupal-recipe

pkg:composer/drupal/realtor

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

1.0.0 2026-11-24 08:13 UTC

This package is not auto-updated.

Last update: 2026-11-25 17:43:35 UTC


README

A site template for an individual real estate agent: searchable listings, listing pages with inquiry, neighborhoods, and buyer and seller services. Demonstrated by Harbor Hollow Realty.

The front end is the Curb Appeal theme, and every page is built in Drupal Canvas.

Realtor is built on the Drupal CMS base. It applies no other recipe. It installs the modules and ships the config and config actions of drupal_cms_site_template_base and of the recipes the base applies (administrator and content editor roles, media types, Easy Email, forms and search) without the Utility page content type and its privacy policy node. Pages are Canvas pages; the privacy notice is the Canvas page at /privacy, and the Klaro consent dialog links to it. Editors use the Drupal CMS content editor role, with permissions for listings, people, articles, neighborhoods, property types, topics, the business settings and the form submissions. Listings, people and articles use the editorial workflow. A recipe cannot ship a theme, so Curb Appeal is a separate Composer package that this recipe requires.

What ships

  • The content model: listings (the property type, labeled Listing), people, journal articles, neighborhood, property type and topic terms, image, document and SVG media, and the business identity config page. A listing names its agent, an article names its author (shown as a Written by card) and the neighborhood it is about. The types, fields and relation lists are a shared starter content model, copied into this recipe by the Saltmarsh build tools; the recipe applies no other recipe.
  • Views for listing search, featured and related listings, galleries, documents, neighborhoods, the journal and the team, and the relation lists: an article's author and a person's articles.
  • Six Canvas content templates (listing, person and article, each full and card), the header and footer regions, and 16 Canvas pages. Every page opens with Curb Appeal's page header: a framed photo with tiles, a ruled row and the title beside a facts table, filled from the page's data.
  • Demonstration content for Harbor Hollow Realty: 18 fictional listings, 3 people, 6 neighborhoods, 4 property types, 7 articles, menus and the business identity config page. Every listing page says it is a fictional demonstration listing.

  • Four webforms: listing inquiry (on every listing page), contact, buyer inquiry and seller consultation. Each uses an ALTCHA spam check, keeps no submission log, deletes stored submissions after 90 days and emails the listing's agent, the lead agent, or the business inbox. Each also sends the visitor a short receipt that repeats only their name. The contact form is the contact_form webform from Drupal CMS's forms recipe, changed by config actions.

  • Site search at /search: the Drupal CMS search index covers listings, people, articles, neighborhoods and Canvas pages. Only published items are indexed, and each save is indexed at once, so a listing leaves the results as soon as it is unpublished. The homes search and the listing lists show active, pending and sold listings only. The homes search at /homes stays a filtered listing search.

The Harbor Hollow Realty logo is the house-over-a-wave mark beside the wordmark, in one SVG. The mark was generated with Codex image generation (OpenAI, model GPT-6.1-Sol), traced to SVG. The wordmark, the default share image and the floor plans (two for Lantern House, one each for DEMO-HH-001 and DEMO-EM-001, each labeled "Illustrative plan, not to scale") were made for the Saltmarsh templates. Every photograph and portrait is a generated image of a fictional subject; the credits page names who made what. The Kanopi Studios logo on the credits page is Kanopi's horizontal full-color logo, copied from Kanopi's brand assets.

The header logo is the theme logo setting (curb.settings, public://branding/harbor-hollow-realty-wordmark.svg), and the default share image and the schema.org logo come from media on the business identity config page. A public:// path and a media reference follow each site's own files folder, so nothing assumes sites/default/files. To rebrand, change the logo under Appearance, Curb Appeal settings, and the brokerage logo and default share image under Business identity.

Requirements

  • PHP 8.3 and Drupal core 11.4 or later, in a Drupal CMS 2.2 project (drupal/cms).
  • Drupal Canvas 1.11 or later.
  • The Curb Appeal theme (drupal/curb). A recipe cannot contain a theme, so the theme is a separate package this recipe requires.

Installing

With the Drupal CMS installer:

composer create-project drupal/cms my-site
cd my-site
composer require drupal/realtor

Open the site in a browser and choose Realtor on the "Choose a template" step.

With Drush:

drush site:install ../recipes/realtor --site-name="Harbor Hollow Realty" -y

Pass --site-name; without it Drush replaces the template's site name with "Drush Site-Install".

Search and the XML sitemap fill on the first page request after install. Drupal CMS includes Automated Cron, and a new site has never run cron, so the first visit runs it and cron indexes all demo content and writes the sitemap. On a site that already ran cron, run drush cron once.

Installing before the first release

Until Realtor and Curb Appeal have tagged releases on drupal.org, install from the repositories. This is the setup of the verify site. It uses DDEV; the folder names are examples.

  1. Clone both repositories side by side. Realtor's development branch is main and Curb Appeal's is 1.0.x:

    mkdir realtor-work && cd realtor-work
    git clone -b main https://git.drupalcode.org/project/realtor.git realtor
    git clone -b 1.0.x https://git.drupalcode.org/project/curb.git curb
    mkdir site-cms && cd site-cms
    
  2. Create a DDEV project and a Drupal CMS codebase. drupal/cms ships its own .ddev/config.yaml, so set the project name in it afterwards and run ddev restart:

    ddev config --project-type=drupal11 --docroot=web
    ddev start
    ddev composer create-project drupal/cms
    
  3. Mount the clones into the web container, so Composer's relative path repositories resolve there as on the host. Save this as .ddev/docker-compose.sources.yaml, then run ddev restart:

    services:
      web:
        volumes:
          - "../..:/var/www/sources:cached"
          - "../../realtor:/var/www/realtor:cached"
          - "../../curb:/var/www/curb:cached"
    
  4. Add the clones as path repositories, before the drupal repository in composer.json, and require them:

    {"type": "path", "url": "../realtor", "options": {"symlink": true, "versions": {"drupal/realtor": "1.0.x-dev"}}},
    {"type": "path", "url": "../curb", "options": {"symlink": true, "versions": {"drupal/curb": "1.0.x-dev"}}}
    
    ddev composer require "drupal/realtor:@dev" "drupal/curb:1.0.x-dev as 1.0.0" -W
    

    Composer places the recipe at recipes/realtor and moves its requirements into the project.

  5. Install the site and log in:

    ddev drush site:install ../recipes/realtor --site-name="Harbor Hollow Realty" -y
    ddev launch $(ddev drush user:login)
    

The demo site sends mail to DDEV's Mailpit (ddev mailpit).

Adapting it for another agent

  1. Edit Business identity at /admin/structure/config_pages/business_identity/edit: business name, brokerage, office location, phone and hours, inquiry email, lead agent, required notices, brokerage logo and default share image. Pages, the footer and structured data read from it.
  2. Set the site name, slogan and email at /admin/config/system/site-information, and the time zone at /admin/config/regional/settings.
  3. Replace the logo at /admin/appearance/settings/curb.
  4. Change colors and fonts as the theme's CUSTOMIZING.md explains.
  5. Replace the default share image on Business identity (1200 by 630 pixels) and the theme's share.png. Pages without their own image use them when shared.
  6. The front page Metatag defaults at /admin/config/search/metatag describe the business as a RealEstateAgent. Change the type, address and region there if another type fits.
  7. Replace the demo content and images: listings, people, neighborhoods, articles and the photos. Give every image alt text, a caption where it helps, and a credit with a credit link for anything you did not make.
  8. Rewrite the About, Accessibility, Privacy and Credits pages in Canvas.
  9. Edit the menus at /admin/structure/menu. The Social media menu holds the footer icon links; the demo links point to each platform's home page, so replace them with the agent's own profiles.
  10. Set up mail delivery: add an SMTP or provider transport at /admin/config/system/symfony-mailer-lite/transport and make it the default.

Before launch, add what a host or the business needs and the template leaves out: analytics with the site's own container ID, upload virus scanning, a launch checklist and HTTP header hardening.

Forms and JavaScript

ALTCHA needs JavaScript in the visitor's browser, so the forms cannot be submitted with JavaScript turned off. The visitor sees "The answer you entered for the CAPTCHA was not correct." If this matters for your audience, list another way to reach the agent, such as the contact email or phone on the contact page.

Accounts and roles

Editors get the content_editor role. Accounts without an editor role see the public site only: no admin sidebar, no Coffee search box and no admin theme.

Images

Every demo photograph and portrait is a generated image of a fictional subject, and each has alt text and a credit. The Credits page lists who made what.

Known issues

  • Share image URLs come from the Drupal CMS base's social image styles and end in .avif. Some social crawlers do not read AVIF. Only the theme's share.png, used when a page has no image and Business identity has no default share image, is a PNG.
  • The release tests (tests/) have not been run in a pipeline. They run in the drupal.org GitLab pipeline.

Verified versions

PackageVersion
drupal/cms2.2
drupal/core11.4.13
drupal/canvas1.12.0
drupal/drupal_cms_site_template_base2.2.9
drupal/curb1.0.x-dev

Importing listings from a RESO Web API provider (optional)

The demonstration install makes no network calls and holds no credentials. Listing import is a separate recipe in this package, recipes/realtor_reso_import, applied only on a site that has a provider. It adds Migrate Plus migration config, no custom code:

  • migrate_plus.migration_group.realtor_reso: the connection. The url source with the http fetcher and json parser reads the OData envelope's value array, follows @odata.nextLink from page to page, and gets a bearer token with the oauth2_client authentication plugin (client credentials grant). The URL and credentials in the shipped config are placeholders on the .invalid domain.
  • migrate_plus.migration.realtor_reso_listing: Property records to listing nodes. It writes only the source-owned fields: title, public ID, status, location, property type, price and price mode, bedrooms, bathrooms, living and lot area, public remarks and the listing date. A missing value stays empty. The provider's listing key is kept in the migration's map table; the listing stores no feed fields. StandardStatus maps to the listing statuses (Active Under Contract and Pending to pending, Closed to sold). A record is published only when its status is active, pending or sold and InternetEntireListingDisplayYN is true; an unknown status, or a missing or false flag, unpublishes it on the next refresh. On update it overwrites only those fields, so field_editorial_intro, field_local_notes, promote, field_agent, the photos, the SEO fields and a neighborhood an editor has set stay as edited.

Photos are not imported; a provider's media rights decide whether to add a media migration.

To connect a provider:

  1. Require the modules: composer require drupal/migrate_plus drupal/migrate_tools league/oauth2-client.
  2. Apply the recipe: drush recipe ../recipes/realtor/recipes/realtor_reso_import.
  3. Put the provider's settings in settings.php, ideally reading secrets from environment variables. Config overrides never reach config export:

    $reso = &$config['migrate_plus.migration_group.realtor_reso']['shared_configuration']['source'];
    $reso['urls'] = ['https://api.example-mls.com/odata/Property?$top=200'];
    $reso['authentication']['provider_options'] = [
      'clientId' => getenv('RESO_CLIENT_ID'),
      'clientSecret' => getenv('RESO_CLIENT_SECRET'),
      'urlAuthorize' => 'https://auth.example-mls.com/oauth2/authorize',
      'urlAccessToken' => 'https://auth.example-mls.com/oauth2/token',
      'urlResourceOwnerDetails' => 'https://auth.example-mls.com/oauth2/resource',
    ];
    unset($reso);
    $config['migrate_plus.migration.realtor_reso_listing']['source']['constants']['provider'] = 'example_mls';
    
  4. Map the provider's values to the site in the migration config: the PostalCode and SubdivisionName maps to the six neighborhood terms (the shipped postal codes are placeholders), and the PropertyType and PropertySubType maps to the property type terms.

  5. Switch Listing settings to "Provider listings", which unpublishes the demonstration listings.
  6. Run drush migrate:import realtor_reso_listing --update from cron, so every record gets a fresh refresh time.

Do not run the import with --sync: an interrupted fetch would delete listings. Withdrawals reach the site as status changes. Migrate caches migration definitions, including the overridden credentials, in the cache_discovery_migration table; keep database dumps private.

The recipe was tested against a fake RESO feed: two pages of Property records linked by @odata.nextLink per feed version (the second with a price change and a withdrawal), a token response, a router to serve them with php -S inside the web container, a settings fixture to point the migration at it, and a script to print the imported listings. The feed is not part of this recipe.