Commercially available wearables and apps that convert mobile devices into data collection hubs can be used to implement smart applications in aware cities. In this paper, we consider wearable devices on various human users as a networked cluster of computing power and information source in an Internet-of-People architecture. Applications can be developed to perform computation on this data and gain group level aggregate inferences and provide feedback. We propose "SafeDrive", an autonomous transportation application, that estimates mental fatigue of a driver using brain sensors, predicts collision probability by fusing car parameters with driver mental state, and issues feedback just in time to avoid accidents. However, significant challenges exist with respect to ensuring safety, accurate context computation and real-time operation, and sustainability, resource efficiency. In this regard, we present the "HumaNet" framework that consists of a middleware installed in mobile devices for developing aware cities applications. HumaNet applies model-based requirements checking approach for off-line analysis and optimization of a given application. Further, it applies context-based requirements checking to decide how to use different types of computation resources to satisfy safety and sustainability requirements in run-time.