The growing importance of context-awareness in the construction of adaptable systems requires the development of formal models and notations that can bring this new dimension from middleware concerns into the higher levels of modelling. In this paper, we propose a formal approach to the design of context-aware systems that is well integrated with the concepts and techniques that have been proposed for software architectures. This approach is based on a set of primitives through which the notion of context can be modelled as a firstclass entity and context-awareness addressed explicitly as an additional dimension of architectural elements. We illustrate the approach around an image search system.