This React app features server-side rendering, react-helmet, and advanced meta data and SEO optimizations. Feel free to inspect.
NOTE: Some aspects of the app may be difficult to absorb from superficial glance. Deep directory traversal is recommended for forensic analysis.
First, copy the contents of
.eslintrc.json
to clipboard, then:
$ eslint --init
- Select 'Use a popular style guide'
- Select Airbnb
- Select React Yes
- Select JSON
- Select Update ESLint
Paste clipboard contents back into .eslintrc.json
- Install
node-sass-chokidar
- Install
cross-env
- Add SASS compiler
- Add project version environment key/value pair to
react-scripts start
"scripts": {
"build-css": "node-sass-chokidar src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive",
"start": "cross-env REACT_APP_VERSION=$npm_package_version react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
$ git clone https://github.com/agm1984/adammackintosh-dot-net-ssr.git
$ cd adammackintosh-dot-net-ssr
$ yarn install
$ yarn start
The App contains an example environment config which facilitates Apollo Client configuration and CORS.
Simply rename the file from ./src/env/config.example.js
to ./src/env/config.js
and change the database credentials.
This project generally follows the Component-as-a-Folder Architecture Pattern. This is the most scalable approach that also minimizes potential for file collisions in multi-developer environments.
- Create a folder in
./src/components
- CSS can be kept with the component or based in
./src/styles
but property inheritance should be avoided. Relying on inheritance creates hard to diagnose bugs and does not foster server-side rendering. - Create Component UI
- Define Redux data flow as needed, reducers are combined in
./src/store/index.js
- Define GraphQL Queries & Mutations as needed
- Define validator.js validations for Redux-Form if there is any data input.
- Add puppeteer to provide a hands-free browsing experience (demonstrate QA and automation by clicking around the website automatically, like Ranorex)
- Find way to implement this as image preloaded state: http://www.rand-on.com/projects/2018_quadtree/quadtree.html
- Put poll rating system for each Example so people can rate its impressiveness out of 10 (with optional reasons top positive, top negative)
- Graph poll results with Recharts use Neo4j
- Add gamification system that allows users to achieve 100% visibility of examples
- Add gamification easter eggs with animations
Submit any questions as issues on GitHub: https://github.com/agm1984/adammackintosh-dot-net-ssr/issues