title: How to integrate PWA with Next.js to allow for notifications and push notifications
body: <p>I'm building a PWA with next.js and have been having a few issues.</p>
  <p>I am trying to integrate in device motion to my users accounts and geolocation, and then notifications.</p>
  <p>Basing this off of this repo, <a href="https://github.com/shadowwalker/next-pwa/" rel="noreferrer">https://github.com/shadowwalker/next-pwa/</a> , and this tutorial, <a href="https://medium.com/@sarafathulla/how-to-add-firebase-push-notifications-in-next-js-react-8eecc56b5cab" rel="noreferrer">https://medium.com/@sarafathulla/how-to-add-firebase-push-notifications-in-next-js-react-8eecc56b5cab</a> .</p>
  <p>As well as these API's, <a href="https://whatwebcando.today/device-motion.html" rel="noreferrer">https://whatwebcando.today/device-motion.html</a> and <a href="https://whatwebcando.today/geolocation.html" rel="noreferrer">https://whatwebcando.today/geolocation.html</a> .</p>
  <p>Currently the PWA is boilerplate using next-pwa,</p>
  <p>next.config.js</p>
  <pre><code>module.exports = withPWA({
    pwa: {
      disable: process.env.NODE_ENV === 'development',
      dest: 'public',
      runtimeCaching,  
    },
    poweredByHeader: false,
  },
  withBundleAnalyzer(),
  
  )
  </code></pre>
  <p>I am very confused about how one can integrate just the simple device motion into the PWA, and how to move forward in general.</p>
  <p>If someone could point me in the right direction that would be brilliant! So different from usual web dev code.</p>