The integration of Internet of Things (IoT) networks into smart cities is crucial to enhance the efficiency of city operations and services. Designing a smart city architecture that can adapt to the constantly changing functional and quality requirements of city services is essential. However, critical decisions must be made during this process, such as selecting communication protocols, ensuring security and safety, optimizing time performance, and processing data capacity. To address these challenges, this paper proposes a systematic approach to guide the system architecture design of IoT-based smart cities. The approach starts with feature-driven domain analysis to model smart city requirements, followed by the design of a reference architecture for IoT-based smart cities. The architecture is modeled using selected architectural views, while considering key stakeholders and their concerns. Additionally, this paper presents valuable insights into lessons learned and challenges encountered during the process of creating IoT-based smart cities. This information can assist practitioners in developing such smart cities and pave the way for future research in this field. By following this proposed approach, smart city architects can design a robust and adaptable system architecture that can meet the evolving needs of smart city services.