Ultra high performance progressive web application built with React Reason (hooks, react ppx 3), GraphQL (api and client) and rollup.
- Progressive web app
- offline
- install prompts on supported platforms
- Server side rendering (including prefetching graphql queries for the current route)
- GraphQL (client using graphql-hooks)
- GrappQL (server, using reason-graphql)
- Rollup (dual bundling, module and nomodule)
- Now.sh 2.x
- Reason React (hooks, react ppx 3)
- Yarn (monorepo with workspaces)
- Routing (including ssr support, static routing)
- 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 8.11.3
and latest yarn, you can always have a look at the engines
section of the package.json
.
$ yarn (install)
$ yarn dev
After doing this, you'll have a server with hot-reloading (ui only) running at http://localhost:8004
You can also start in production.
$ yarn start
After doing this, you'll have a server running at http://localhost:8004
$ yarn dev-graphql
After doing this, you'll have a server with hot-reloading running at http://localhost:3000
$ yarn send-introspection-query http://localhost:8004/api/graphql
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 lint
$ yarn build
$ yarn test
or
$ yarn ci
The end to end test go fetch latest news from the server and expect it to be found inside the homepage. Please check e2e/basic.test.js
for more details.
$ yarn e2e
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.
# force a deploy
$ now
# check all running instances
$ now ls
# check logs for a given instance
$ now logs hackerz.now.sh --all