I have a Fuel application that powers some e-commerce related sites. The sites were originally built as stand-alone no database fronts for authorize.net checkouts in order to support super high volumes of traffic in very short periods of time. As I started getting a feel for the level of traffic I started adding database driven components to the site through a Fuel application back end.
So we currently build out these light-weight e-commerce fronts that are mostly knockoutjs apps which talk directly to the database, and then one central management for all these sites using a Fuel app.
So all these light-weight sites are starting to look just like each other other than some CSS and a few design tweaks here or there. I'm considering combining it into the fuel application and have each site be a theme for the most part and somehow use routing so I can route different domains to different themes, eventually giving users the ability to upload their own themes and providing some basic template tags like {% list_products%} that I can extend a parser for to inject our code for those sections.
So how would you take all these independent e-commerce sites and the central Fuel management system and start to link them together at a deeper level? I'm not really sure themes is the best way to go. It would be possible to have thousands of these themes. I'm just not sure the theme will give me the flexibility I need to customize some of the sites the way customers what them customized.
For a simple parser, have a look at Lex (http://github.com/pyrocms/lex), it's light-weight, simple, but very powerful.
If it's a high-volume site, I would look for a solution with more performance.
For such I site, I have implemented a modified View class, that can generate views from strings instead of files. The strings (containing view partials) are stored in the database, and cached after retrieval so no DB or disk I/O is needed to generate pages. The partial content was quite dynamic, so I couldn't cache later. If your partial contents is rather static, you could opt to cache the rendered result.