Sparking Asia · 2024 – 2025

DIFM

Multi-tenant content management system and website builder enabling non-technical staff to publish branch microsites.

Adonis API
React admin
Next.js storefront
Next.js·AdonisJS·PostgreSQL·React

Problem

Organizations needed to manage multiple branch websites from a single platform without developer intervention. Initial wildcard DNS subdomain routing (sacramento.difm.com) diluted search engine domain authority and posed tenant subdomain poisoning risks.

Approach

Separated architecture into an AdonisJS/PostgreSQL backend API, a React administrative dashboard with Puck visual block editor, and a SSR Next.js storefront.

Refactored routing architecture from wildcard subdomains to unified path-based URLs (difm.com/sacramento), restructuring Next.js proxy middleware and routing boundaries.

Enforced hierarchical Role-Based Access Control (RBAC) separating global platform administrators from branch-level content editors. Built automated cron jobs polling YouTube and Facebook APIs to syndicate video streams and social posts to branch galleries.

Technical Decisions

  1. Path-based routing refactor over wildcard subdomains

    Consolidated branch sites onto path-based routes (difm.com/location) to concentrate SEO authority on the root domain and eliminate subdomain hijack risks.

  2. Puck visual editor integration for non-technical users

    Embedded a structured component layout editor into the React admin panel, allowing non-technical editors to compose pages without code deployments.

  3. Background social media syndication workers

    Automated YouTube and Facebook API polling via background cron workers, categorizing ingested media directly into PostgreSQL branch galleries.

Key Achievements

  • Architected multi-tenant CMS across AdonisJS API, React admin, and Next.js storefront tiers.
  • Refactored routing from wildcard subdomains to path-based URLs, unifying domain SEO authority.
  • Integrated Puck visual page editor into React admin panel for layout composition.
  • Engineered hierarchical RBAC isolating global platform administration from branch editor roles.
  • Built automated social media syndication pipelines polling YouTube and Facebook APIs.

Outcome

Non-technical branch staff compose and publish custom site layouts through a visual editor, while path-based routing protects search domain authority across all tenant locations.