graphql-engine/community/sample-apps/whatsapp-clone-typescript-react
Aaysha 1add19e2a8 Documentation for One Click Deploy to Hasura
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7499
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Praveen Durairaju <14110316+praveenweb@users.noreply.github.com>
GitOrigin-RevId: 3406f6befa84b0f63e51c829b86d2fe6333f9ca2
2023-02-07 08:36:07 +00:00
..
auth-server Upgrade all package-lock.json files to the v2 format. 2022-09-28 08:15:29 +00:00
hasura community: fix sample apps metadata for v3 config 2021-08-19 03:46:59 +00:00
react-app Documentation for One Click Deploy to Hasura 2023-02-07 08:36:07 +00:00
README.md readme: use cloud signup endpoint for "Deploy to Hasura" CTA 2021-08-19 07:03:05 +00:00

WhatsApp Clone

The react client is a forked version of urigo/whatsapp-client-react and the server is backed by Hasura GraphQL Engine

Edit whatsapp-clone

Running the app yourself

Deploy Postgres and GraphQL Engine on Hasura:

  • Deploy GraphQL Engine on Hasura Cloud and setup PostgreSQL via Heroku:

    Deploy to Hasura Cloud

  • Get the Hasura app URL (say whatsapp-clone.hasura.app)

  • Clone this repo:

    git clone https://github.com/hasura/graphql-engine
    cd graphql-engine/community/sample-apps/whatsapp-clone-typescript-react
    
  • Install Hasura CLI

  • Apply the migrations:

    cd hasura 
    hasura metadata apply --endpoint "https://whatsapp-clone.hasura.app"
    hasura migrate apply --endpoint "https://whatsapp-clone.hasura.app"
    

Run the auth server

cd auth-server
  • Set the environment variables in .env

  • Install and run the app

  npm install
  npm start

Run the react app

cd react-app
  • Set the environment variables in .env
  yarn install
  • Modify the codegen.yml to include the correct endpoint and headers

  • Generate the graphql types by running

  gql-gen

This would generate the required types in src/graphql/types

  • Run the app
  yarn start