This week I listened to a session from the SharePoint Conference in Las Vegas about ‘Site provisioning techniques with SharePoint apps’. This session was all about how to use the app model to provision sites, libraries and everything else you need in SharePoint. The had a lot of examples how to do this and what is changed in both SharePoint Online and SharePoint 2013 SP1.
The overall point the made is that with the use of an SharePoint app you can make a template that will work both on premise and online without the use of web templates and sand boxed solutions A other benefit of this is that you can use one of the default templates that Microsoft supplies and you only have to change what you want to be different instead of creating complete new templates.
The examples they used and a lot of others can be found at Codeplex http://officeams.codeplex.com/.