This document summarizes a proposal to extend the Apostrophe CMS to build a variable-based CMS for rendering PDF brochures for SunRun, a solar power company. The CMS would allow the sales team to maintain complex sales documents across 25 partners, 13 markets, and 24 utilities while reusing content through variables. It would introduce a "Flapjack" CMS built with Symfony, Doctrine, and extensions of Apostrophe's slots and blog plugins to support custom data models for documents, pages, blocks, widgets, and variables with visibility filters.
Building a variable-based CMS for rendering PDF brochures with Apostrophe
1. Extending Apostrophe to build a variable-based CMS for rendering PDF brochures Spike Brehm Front-end Engineer @ SunRun, Inc.
2. About Me Symfony developer since 2009 @spikebrehm About SunRun The nation’s largest provider of Solar Power Service – think SaaS Complex business model and fragmented markets Able to scale quickly because of software tools
3. The Problem 25 Partners 13 Markets 24 Utilities Retail vs. direct sale Maintaining Sales Documents Custom document for each combination (25 * 13 * … ) Flat PHP files, edited by hand Symlinks on the filesystem to approximate reuse
4. The Proposed Solution “Let’s build a CMS so that our Sales team can maintain these documents and Engineering can focus on building more cool tools!”
7. Why Apostrophe? Experience Built our corporate website on Apostrophe Learned how to extend it at the app level Don’t reinvent the wheel Rich text editor templates Framework for building custom slots (widgets)
10. Slots to Pages: original aPage can be both concrete and virtual. Notice circular relationships.
11. Slots to Pages: Flapjack Instead of associating aBlogItem to aSlot using the aSlot.value field, we use a join object srBlogItemBlockSlot for many-to-many. Note: simplified visibility filter schema.