Despite recent advances in mobile hardware, most mobile devices still fall short to execute complex multimedia applications with real-time requirements such as augmented reality (AR). Because offloading the application to the cloud is not always a solution due to the high and often unpredictable WAN latencies, the concept of cloudlets has been introduced: nearby infrastructure offering virtual machines for remote execution.In this paper we present a cloudlet platform, providing two important contributions. First, the platform allows cloudlets to be formed in a dynamic way, including (fixed) virtualized infrastructure co-located with the wireless access point, as well as any device in the LAN network supporting the platform. The approach can also be extended towards the cloud, facilitating distribution of applications over three tiers (i.e. the device, the cloudlet and the cloud). Second, instead of moving a complete virtual machine to the cloudlet, we propose a more fine-grained approach, by managing and deploying applications on the component level. Application components are declared by the developer, together with their real-time constraints and configuration parameters, which are configured and distributed among the cloudlet by the platform at runtime depending on the application context, in order to meet the constraints and to optimize the user experience.An OSGi-based prototype implementation on the Android platform is highlighted and evaluated using a mobile AR use case, showing the need for a component-based approach for the cloudlet.