I'm new to this community so please, be gentle and if I'm on the wrong community please let me know. And yes, What I'm asking is kind of opinion based. But I'm trying to find a good solution to my project. I am a not a PHP professional, but I am fairly versed in PHP. I know very little about JavaScript though. I had been using the old Prototype framework for my app which I am getting away from in this new version.
I am a farrier, I take care of horse's feet. I have developed a web application that allows me to track all of my client appointments, as well as keep track of all the horses I have trimmed/shod for said clients. I can track my expenses, mileage, add/delete clients. Set up preferences for my prices as well as many different options. I'm on like the 6th version of my app.
I was approached by some people in the horse industry that saw me using my app and suggested that I should make it so other farriers could use it also. So I did. And I have different subscription plans for them to subscribe to in order to use my app. At that time, my application was a web application only. I have a hosting service that uses the MariaDB. My web application is written in PHP which serves the pages and I utilize sessions for tracking the "users"(farrier's) to keep everyone's information separate and for security.
I had some people "beta" testing the system and they said they would like to see it as a phone app rather than a web app. So I found out how to create a PWA (Progressive Web Application). One person told me that places they go have poor connection so an offline capability would be nice. Here in lies the issue.
After doing tons of research about PWA's and offline usage using service workers and a caching system (Which I'm still learning), I am running into a dilemma. I would like for the farrier's (me included) to be able to add/update trimming/shoeing schedules and input expenses/mileage, cost of trimming/shoeing for the clients even when offline. I have found that I may be able to use the IndexDB to make this work (I'm still reading on how to even use the IndexDB). Then when a connection is reestablished, have it upload (sync) the data to the database.
QuestionWould I be able to store all of the information locally using the IndexDB and just use the back-end to track the user's for the subscription purposes? That way the application would be an offline application? Am I making this harder than it needs to be? Should I just stick with storing offline data and then uploading(syncing) it to the database when a connection is reestablished?
Here is a ball park of the amount of information that a typical farrier would be storing. On average a farrier will trim/shoe around 2,400 horses per year. They can have anywhere from 50 to over 100 clients. Each client has to have their name, address, phone, email information as well as the name and number of their horses stored. This is where having a relational DB comes into play. Then the farrier will have to have their preferences stored. Pricing, trim cycle (which is the amount of weeks between trimming/shoeing), the time zone they are in so that the times show up properly in the schedule, be tracking their milage from one client to another. I myself put about 1,500 miles a month on my vehicle going from one client to another. Plus all the income and expenses. If a horse is having foot problems, I can take notes and take pictures of the feet for reference to see if we have any change down the road.
I have looked over mongoDB and firebase and a couple of others. Even the server-less stuff which I didn't really understand.
Right now I just need a bit of guidance on the best approach...
I'm thinking K.I.S.S. Just learning the IndexDB and utilizing it to store any information they may input while offline and syncing it to the db after a connection is reestablished. But I would like some guidance on perhaps the best approach for this?
I appreciate ya'll taking the time to read this and help out.