This todo app was initially over-engineered, routing all operations through a backend, resulting in slow performance due to excessive API calls. The developer chose native iOS and NestJS on Google Cloud Run for the frontend and backend with Firestore for the database. The initial architecture, driven by a desire for control and perceived security, slowed down the app significantly. After beta testing revealed slowness, the developer shifted to a hybrid approach, using Firestore's native capabilities like real-time listeners and offline support. This meant direct client-side access for reading and updating tasks, only using the backend for tasks like transcription and quota management. The change significantly improved performance, reducing task completion time from 500-1000ms to 50-100ms. The new method leverages Firestore's security rules to handle authorization, eliminating the need for extensive backend validation. This performance boost highlighted the pitfalls of premature optimization and the advantages of utilizing platform features. The story emphasizes that the “boring” solution, using the platform's strengths, often provides the best results. The app now has a more responsive user experience, with faster task completion. The developer learned that over-engineering can hinder speed and the value of choosing the most direct method.
dev.to
dev.to
