Ultra high performance progressive web application built with React and Next.js.
- Progressive web app
- offline
- install prompts on supported platforms
- Server side rendering
- Next.js 9.x (canary)
- Webpack 4.x
- Babel 7.x
- Now.sh 2.x
- Yarn (monorepo with workspaces)
- A production build is deployed from a merge to master
- A staging build is deployed from a PR against master
First of all make sure you are using node 10.15.3
(any node 10.x would also do) and latest yarn, you can always have a look at the engines
section of the package.json
. Why node 8.10. We are using Now.sh to make the app available online and underneath it's using AWS lambda and you have to use Node 8.
$ yarn (install)
$ yarn dev
After doing this, you'll have a server with hot-reloading running at http://localhost:3000.
Make sure you set both scripts as executable
$ chmod +x scripts/deploy-ci.sh
$ chmod +x workflows/action-puppeteer/entrypoint.sh
We don't want to use snapshots, we use also use react-testing-library to avoid having to use enzyme and to enforce best test practices.
$ yarn format
$ yarn typecheck
$ yarn lint
$ yarn test
or
$ yarn ci
We use cypress. Please check e2e
for more details.
If you wan to add a new test use the following command and wait for cypress to open
yarn e2e-build
yarn start
yarn workspace @dblechoc/e2e cypress open
This is where we list all our components (comes with hot reloading)
$ yarn storybook
After doing this, you'll have a showcase page running at http://localhost:6006
We are using Github Actions.
All the documenation is located here: https://nextjs.org/docs/#setup
All the documentation is located here: https://zeit.co/docs
# Install
$ curl -sfLS https://zeit.co/download.sh | sh
# check all running instances
$ now ls
# check logs for a given instance
$ now logs nextjs-template.now.sh --all
# check all alias (running instances to nextjs-template.now.sh)
$ now alias ls