iPWA
š Spin up an isomorphic progressive web app or native app deployable in the cloud, publishable as an npm package or docker container with a fully automated supercharged pipeline, all in under an hour, so you can focus on creating stuff!
How this works
This package was created with automated pipeline in mind. One codebase for web and native apps where when something gets merged to master, it gets to production. All you need to do is spin up a new project, set the tokens and secrets correctly and the rest is all magic. When you push code to master, it will just be deployed everywhere after a series of checks. What happens behind the scene is once you push code to Github, it triggers Github actions. If its the master branch, it runs a basic Sanity Check where it builds the client and server code base, runs lint and unittests and reports to Codecov. This sanity check is followed by staging in Heroku. The application is dockerized and deployed as a docker container on Heroku. Once done, regression tests are performed on this staging environment. Unit tests, Cypress tests, Puppeteer and Percy visual regression tests are performed on this environment. Once passed, the docker image is pushed to Dockerhub and Github Container Registry, deployed into Firebase and published to Expo as over-the-air update. To top it all, its published to npm as well.
Install
Install ipwa globally
npmĀ iĀ -gĀ ipwa
Create a new ipwa app
ipwaĀ my-appĀ install
This will create a new project called my-app in the current directory and install npm dependencies.
./.env/env.sh
.
Set these runtime env vars in config_secrets__linkedin__clientIdconfig_secrets__linkedin__clientSecretconfig_secrets__github__clientIdconfig_secrets__github__clientSecretconstĀ config_secrets__sendInBlue__userconstĀ config_secrets__sendInBlue__passconfig_secrets_jsdrome_encryptKeyconfig_props__gtmId
./.env/env.sh
and in Github secrets
Set these build time env vars in CODECOV_TOKEN
IMAGE_NAME
HEROKU_APP_NAME
HEROKU_API_KEY
CYPRESS_TOKEN
CYPRESS_PROJECT_ID
PERCY_TOKEN
FIREBASE_APP_NAME
FIREBASE_TOKEN
config_props__url
.configrc
as necessary.
Change defaults in Development
Run app locally
npmĀ runĀ devnpmĀ runĀ nodemon
Run app as docker container
Make appropriate changes to ./infra/docker/docker-compose.yml
and ./infra/docker/Dockerfile
.
npmĀ runĀ build:docker
Run unit tests
npmĀ runĀ test
Run cypress tests
npmĀ runĀ test:cypress
Run puppeteer tests
npmĀ runĀ test:puppeteer
āļø Star us on GitHub ā it helps!