The most advanced serverless starter kit for a progressive web application. It's bootstrapped with:
- React 16 for building rich UI interface
- The blazing fast and zero configuration Parcel bundler
- Babel 7
- ESLint for linting with Airbnb JS style guide.
- Jest for unit testing
- TestCafe for e2e testing
Based on Atomic Design methodology for organizing components and Material UI as design framework.
Please respect theses clean code concepts.
To get started, first install all the necessary dependencies.
yarn install
Start the development server (changes will now update live in browser)
yarn dev
Start the Hasura GraphQL
docker-compose up -d
cd hasura
hasura console
To view the project, go to: https://localhost:1234/
Don't forget to add ESLint to your IDE or run the following command before commiting:
yarn lint
Run the unit tests
yarn test:unit
Launch the end-to-end tests (you can add the extension TestCafe test runner
to run in your favorite IDE)
yarn test:e2e
Build files for production
yarn build
Serve builded static files
yarn serve
Export Hasura GraphQL schema
sudo npm install -g apollo
apollo schema:download --endpoint https://my-graphql-engine.com/v1/graphql
Export Hasura data
docker-compose exec postgres pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Export PostgreSQL data from Heroku
heroku pg:backups:capture
heroku pg:backups:download
Restore to local database
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump
Create migrations with Hasura
curl -L https://cli.hasura.io/install.sh | bash
hasura migrate create "init" --from-server
hasura migrate apply --version "<version>" --skip-execution
Apply the migrations on another instance of the GraphQL engine
hasura migrate apply --endpoint http://another-graphql-instance.herokuapp.com