How pcondonjr/easy-spaces-lwc works
Project type and purpose
• This is a modular, full‑stack Salesforce sample application built with Lightning Web Components (LWC), Aura components, Apex services, Salesforce Flows, custom metadata and custom objects.
• The goal is to illustrate a pop‑up space reservation system (“Easy Spaces”) deployed as a series of unlocked packages on Salesforce Platform, with CI/CD, local development, theming, and sample data import.
File structure
• Top‑level:
• config/project-scratch-def.json, sfdx‑project.json → scratch org & package config
• package.json, .prettierrc, .eslintrc → local dev tooling (Prettier, ESLint, Husky pre‑commit)
• .github/workflows → CI (lint, test, packaging)
• data/… → sample data JSON/CSV imports
• docs/… → images and code tours
• bin/… → helper scripts for scratch org installation
• Package folders (as defined in sfdx‑project.json):
• es-base-objects → custom objects (Market__c, Space__c, Reservation__c), layouts, listViews, permissions
• es-base-styles → Aura app pages, brand assets, LWC UI building blocks (imageGallery, pillList…)
• es-base-code → generic Aura actions (openRecordAction, selectObject), shared Apex services + custom metadata types, LWC utility components (errorPanel, ldsUtils)
• es-space-mgmt → core business logic: ReservationManager Apex, Space Management Aura & LWC components, Flows, Flexipages, permission sets, prompts
README for additional insights
• Confirms modular unlocked packages and package dependencies (order: objects → styles → code → space‑mgmt).
• Highlights features: dynamic flows (lightning:flow + LWC screens), object‑agnostic design (customerList/customerTile), console navigation APIs, Lightning Data Service, modular packaging.
a. Main components
• Developer Environment
• VS Code + Salesforce Extensions
• Node.js, Prettier, ESLint, Husky (pre‑commit)
• Salesforce CLI (SFDX)
• GitHub (repo + workflows)
• CI/CD Pipeline (GitHub Actions)
• On push/PR: lint, test (Jest), build & packaging
• Salesforce Platform (Scratch Org or Sandbox)
• Unlocked Packages: es-base-objects → es-base-styles → es-base-code → es-space-mgmt
• Metadata types: custom objects, metadata, flows, flexipages
• Apex services (CustomerServices, MarketServices, ReservationManager)
• UI layer:
· 🌐 Aura components (console APIs, dynamic flows)
· 🌐 Lightning Web Components (customerList, spaceDesigner, relatedSpaces…)
• Data storage: Salesforce DB (standard objects: Lead, Contact; custom objects)
• External services: Salesforce Flow engine, Lightning Console API, NavigationMixin
b. Relationships & interactions
• Developer pushes code → GitHub → runs CI → on success deploys packages via SFDX → Salesforce Org
• User in browser interacts with LWC/Aura UI → Lightning Data Service or apex calls → Salesforce DB returns records → UI updates
• LWC flow screens embed in Aura dynamic flows → events drive FlowNavigationNextEvent → control interview
• Console APIs in Aura open/refresh tabs in the Lightning Console
c. Architectural patterns & principles
• Modular unlocked packages for separation of concerns and reuse
• Object‑agnostic UI components (use design attributes to switch between Leads/Contacts)
• Dynamic Flow interviews embedding LWC as flow screens
• Use of Lightning Data Service for caching and automatic refresh
d. Key technologies & frameworks
• Salesforce Platform: SFDX, Scratch Org, Unlocked Packages
• Front‑end: Lightning Web Components, Aura Components, Lightning Console API, NavigationMixin
• Backend: Apex classes & methods, Salesforce Flow
• Dev tooling: GitHub Actions, Jest for LWC tests, Prettier, ESLint, Husky