Real-time collaborative WebGIS represents a significant trend in the evolution of Geographic Information Systems. Current commercial collaborative WebGIS platforms, such as ArcGIS Online and Felt, rely on centralized servers for data storage and spatial analysis. However, this centralized architecture poses notable limitations: the software becomes non-functional in the absence of a network connection or if the service is discontinued. Moreover, data ownership resides with the commercial providers, exposing users to potential data loss in the event of service disruptions. To address these challenges, this paper introduces the concept of local-first software into WebGIS. By leveraging Conflict-free Replicated Data Types (CRDTs) and advanced web technologies, we develop a user-friendly, interactive, and offline-capable local-first WebGIS application that supports real-time collaboration. The application enables multi-user collaborative editing, offline functionality, and efficient browser-based spatial analysis. This paper outlines the design methodology and system prototype for the local-first WebGIS application, utilizing open-source software and libraries throughout the development process. Practical examples are provided to demonstrate the application’s functionality. The proposed solution enhances real-time collaboration and data security in WebGIS, ultimately improving user productivity and collaborative experiences.