Frontend Documentation

December 22, 2025 ยท View on GitHub

This document provides an overview of the frontend architecture for PropertyWebBuilder.

Architecture

The frontend uses a server-rendered approach with:

TechnologyPurpose
ERB TemplatesRails view templates
Liquid TemplatesDynamic page parts and theming
Tailwind CSSStyling (responsive, utility-first)
Stimulus.jsJavaScript interactions
ImportmapES module loading (no build step)

Deprecated

The following are deprecated and should not be used for new development:

  • Vue.js - See app/frontend/DEPRECATED.md
  • GraphQL API - See app/graphql/DEPRECATED.md
  • Bootstrap CSS - See vendor/assets/stylesheets/bootstrap/DEPRECATED.md

JavaScript with Stimulus

Stimulus provides modest JavaScript for server-rendered HTML. See Stimulus Guide for full documentation.

Available Controllers

ControllerPurpose
toggleShow/hide elements
tabsTabbed interfaces
galleryProperty photo carousels
dropdownDropdown menus
filterSearch filter panels

Example Usage

<div data-controller="toggle">
  <button data-action="toggle#toggle">Show Details</button>
  <div data-toggle-target="content" class="hidden">
    Property details here...
  </div>
</div>

Creating Controllers

rails generate stimulus my_controller

Public Pages

RouteControllerDescription
/welcome_controllerHome page with featured properties
/buysearch_controllerProperty search (for sale)
/rentsearch_controllerProperty search (for rent)
/properties/:id/:titleprops_controllerProperty detail page
/p/:page_slugpages_controllerCustom CMS pages
/about-uspages_controllerAbout page
/contact-uscontact_us_controllerContact form

Admin Panel

The admin panel is located at /site_admin and uses server-rendered ERB views with Stimulus for interactivity.

Sections

SectionDescription
DashboardWebsite activity overview
PropertiesManage property listings
PagesManage custom pages
ContentManage reusable content blocks
MessagesView contact form submissions
SettingsWebsite and agency configuration

Theming

Themes are located in app/themes/ and use:

  • Liquid templates for page parts
  • Tailwind CSS for styling
  • CSS variables for customization

See Theming System for details.


Assets

CSS

  • Tailwind CSS (primary)
  • SCSS via Dart Sass (legacy)

JavaScript

  • Stimulus controllers in app/javascript/controllers/
  • Loaded via importmap (no build step required)

Images

  • Stored via Active Storage
  • Served from CDN when configured

Resources