How dependency injection rescued my app from the abyss
summary
Migrates a tightly coupled Firebase→Supabase codebase by extracting a database interface and wrapping providers in a Nuxt plugin so composables receive their DB via injection, not creation. Implements concrete drivers (Supabase, Firebase, in-memory driver) behind that interface, switches drivers via runtimeConfig, and shows tests that mount components with a real in-memory DB instead of mocking internals, enabling safer migrations and focused business-logic tests.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:04Tightly coupled legacy app
- 4:15Mocking dependency pitfalls
- 8:49Dependency injection solution
- 13:07Tight coupling vs dependency injection
- 16:17DI with Next.js plugins
- 19:06Decoupling business logic
- 22:39Recap and key takeaways
- 23:44Q&A
related talks
30mEmpowering Vue with TypeScript, Inversify, Vuex and some other super to
31m'I need it yesterday!' - The secret story of MDS
25mLessons Learned from Crafting a Thriving Vue.js SaaS Behemoth
23mFull Stack with Nuxt
39mDeep DI-ving: how Angular's DI system defeated a monolith
23mThayse Onofrio at LeadDev West Coast 2023
23mSuperpositioned Vue componentes with Module Federation
33mNew Developer Experiences with Nuxt 3
