Hi, we are looking to create a sports app that collects and displays player stats. It will include team chats with push notifications for upcoming games etc. We are thinking of using the standard MERN stack route with a GraphQL API or a real-time Firebase database. Any advice would be greatly appreciated.
hi it looks like an interesting app, I have been working on apps with mern stack but recently I came across hasura and it was a total game-changer, it fast forward most of my developing process on the backend, here is a sample code to manage notifications, you can twist it a bit to work in an app https://hasura.io/docs/1.0/graphql/core/event-triggers/samples.html#push-notifications
Firebase won’t provide GraphQL (out of the box) but is great for creating real-time apps. I’ve done this using Vue/Quasar framework (Quasar.dev) and Vuex with Vuefire or Vuexfire and their Firestore database. Deployment is easy as even with multiple project instances for Development/Staging/Production. Their RTDB or Firestore databases will be great for Chat apps. Push notifications are also supported. Free tier is large and serverless functions remove the need to manage servers and generally cheaper if you’re not using them 24/7. Local emulators with debugging support will speed up your coding. Firebase UI will handle most of your sign in UI. Firestore security rules allow you to move some business logic to the client side app and thus support offline and faster real-time updates as they occur client side first. Downside of Firestone is its query language is quite limited so you may also want to combine it with Google’s BigQuery to support complex SQL and reporting. Knowing what you need to query will be a deciding factor in choosing between Firebase and a GraphQL solution. There’s a BigQuery extension for Firebase to get you started. You can also use it with Google Data Studio.
If you want/need GraphQL, I’d recommend having a look at AWS Amplify. I’ve not yet used it but looks like a reasonable alternative to Firebase though pricing is likely to be a bit higher and will likely have a steeper learning curve depending on past AWS experience.