Hi community! Great to be part of the discussions here.
We are developing a new app, our background in software engineering helps, but we are running into a knowledge gap with flutterflow and firebase here.
We have searched the forum and YouTube extensively, but there are no clear examples.
Context:
Our app has a collection called locations, a user has gets an overview of locations they created, that they are invited to or locations from their own organisation.
We are using flutterflow and firebase.
Current involved collections:
- users
- organisations (name, userRef (that created the organisation)
- locations (name, coordinates, organisationRef, userRef (that created the location) etc.)
Goal:
A secure and scalable setup to share locations among users. You should have access to a location if:
- A user within the same organisation as the user that created the location
- A user has been invited for a location by another user (where both users are in other organisations)
Constaints:
- Minimal firebase cost
- Scalable solution where a single location could have tens or possibly 100+ users that have access
Questions:
- How do we realize this best (scalable) in flutterflow? What collection schema do you suggest?
- How do we make sure this is secure in firestore?
- What exact firestore rules do we need?
- How do we create a list with all these locations in the Flutterflow frontend?
To us this seemed like a pretty common use case, but we could not find a good example or tutorial anywhere.
Some help would be greatly appreciated!