content moderation
We use UI components from MaterialUI. https://mui.com
We follow atomic design principles. https://blog.bitsrc.io/atomic-design-and-ui-components-theory-to-practice-f200db337c24
Mandatory
node 18.7.0
npm 8.15.1
- Dynamically render components based on json data. https://www.pluralsight.com/guides/how-to-render-a-component-dynamically-based-on-a-json-config
yarn run start
https://github.com/dotansimha/graphql-code-generator
I followed this tutorial with some modifications https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/deploy-a-react-based-single-page-application-to-amazon-s3-and-cloudfront.html
To successfully run build script, you have to add DISABLE_ESLINT_PLUGIN=true
for now in .env.production to suppress. Need to clean up the errors in the future.
aws s3 sync build s3://www-frontend
aws cloudfront create-invalidation --distribution-id E1ENF29FUWH1YB --paths "/*"
Video entails how to set it up. https://www.youtube.com/watch?v=kvlSep7m7Uk
probably better to build react app in docker and inject envs via pipeline but not high priority right now.
REACT_APP_APOLLO_CLIENT_URL=http://localhost:4000/graphql
ESLINT_NO_DEV_ERRORS=true
REACT_APP_APOLLO_CLIENT_URL=https://graphql.beta.app.getsocialkarma.com/graphql
DISABLE_ESLINT_PLUGIN=true