I have a Firebase application that with store user data and deliver static data. I am struggling to figure out a safe way to store this static data.
The static data is a list of video urls and other information that a user will take as a learning course (pre-set data). These can change periodically.
My problem is any developer could accidentally delete the entire data store with the click of a button.
This is what I want but am not sure how to accomplish:
- I write in the static data directly into firebase
- There is a Live (app) version of the data, a develop (app) version, and staging (app) version - the live should be un-editable
- When staging has been properly tested, I want to migrate all of that data into the live Firebase app for the static data
I know how to accomplish this outside of Firebase but I would really like to build my entire back-end here on Firebase. Any thoughts?
Price can change. Ordering can change, new courses can be added,etc.
The data looks something like this:
{
"slopes": {
"slopeiOS": {
"featuredCourse": "k43l2l2-beginner-ios",
"courses": {
"k43l2l2-beginner-ios": {
"name": "Beginner iOS 1",
"order": 12,
"price": 250,
"salePrice": 150,
"onSale": true,
"purchases": 12000,
"totalMinutes": 102282,
"videos": {
"k23j3l": {
"order": 22,
"duration": 150,
"title": "How to install Xcode",
"description": "Learn how to install Xcode.."
}
}
}
}
}
}
}