This project was bootstrapped with Create React App for client side app, and uses an Express server to serve the CMS content.
In the root directory, you can run:
Can be executed after running npm install on root directory. Alternatively, one can go into the 'client' directory and execute 'npm install' there.
Runs both the server as well as the client side app in development mode.
Open http://localhost:3000 to view the app in browser. The server runs on port 3001.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
Builds the app for production to the client/build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
This project uses following tech stack:
express with graphql
The backend consists of GraphQL Queries exposed at https://localhost:3001/graphql.
React, React Router, Apollo Client for GraphQL Client application uses create-react-app build, coupled with GraphQL interfaces using Apollo Client
Helmet For setting title and meta descriptions on pages for crawlers and SEO purposes.
react-a11y For accessibility checks
styled components For CSS in JS, and global styling of the app
Have tried to include use of some react concepts like Hooks, Higher Order Components, Render Props etc. Since this was a very small project, I had to compromise with code consistency to include as many variations of doing stuff as possible.
Some sample test cases have been included to ensure some code coverage is provided. This app employs Jest test runner with Enzyme.
Use following commands to setup and view the app in action -
git clone https://github.com/sumgwork/qantas-dev-challenge
cd qantas-dev-challenge
npm install
npm run client-install
npm run dev
Thank you.