This is an example of functional PWA for team work and planing things.
NOTE Is focussed on a class management as it has exams and homework but it can be changed in a simple way.
Clone this repo or dowanload it.
Then, go to this repo locally:
cd asier
npm install
npm run vapid > vapid.txt
Create a .env
file, and put the public key and private key generated from the previous step.
Also add a mongoDB secure url to this .env
file.
Other things to add to this file is REGISTRAR, for allowing or not to register new admin users, PASSWORD for the autentication password for regular users and the DATA_URL will include your page url, it can be localhost:3000.
[email protected]
WEB_PUSH_PRIVATE_KEY=<vapid-private-key>
NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY=<vapid-public-key>
MONGO_URI=<mongo-url>
DATA_URL=<page-url>
REGISTRAR=<si|no>
PASSWORD=<some-password>
Build and start
npm run build
npm run start
**/public/workbox-*.js
**/public/sw.js
**/public/worker-*.js
.env
vapid.txt