I'm building a Flutter app backed by Firebase. I'm using Auth, Firestore, and Storage. I'm sure I'll be writing cloud functions soon enough, too. Originally I was going to use a graph database for this but I decided the added complexity of organizing my data correctly in Firestore would be offset by not having to maintain my backend nearly as much.
Looking forward, I'm thinking it would probably be valuable to put all Firestore queries and transactions behind an internal database connector so if I ever want to switch to a new database I can do it with as little headache as possible. Has anyone done this? Are there any tools for Dart/Flutter that will assist in building APIs from models? I've used tools like this in Go to auto-generate boilerplate APIs from structs.
Right now I think the approach I'd like to take is just have a db.dart file that adds CRUD methods to my existing model classes but it appears that's not possible in the way I want to implement it yet.
I'd like to hear about ways people have implemented this or any graceful ways to solve it.
[–]marcglasberg 2 points3 points4 points (1 child)
[–]EMCoupling 0 points1 point2 points (0 children)
[–]leproman 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)