Git Product home page Git Product logo

react-cv's Introduction

Table of Contents

How It Works

The CV is written as a ReactJS website which is accessible at cv.crisboarna.com and has a Download button to save a pdf of the CV.

Short behind the scenes

Website is hosted on S3 accessed onl by Cloudfront CDN via OIA. You can view the architectural diagram at the bottom of the page.

Lambda runs a custom runtime Docker container based on Lambda NodeJS AL3 environment. This is done to ensure local and remote environments are identical. This container runs a headless Chrome browser via Puppeteer which loads the CV live page at https://cv.crisboarna.com, uses Chrome inbuilt PDF printing feature to generate the PDF.

This has the added benefit of

  1. Ensuring the PDF has selectable text that is extractable
  2. Has a standard rendering viewport that is not reliant on client

During the CDK Web stack deployment, the above Lambda is called and via Cloudformation Custom Resource and places in S3 the generated PDF to be available on-demand for download to reduce download latency and reduce costs, having to invoke the Lambda only once.

Development

Languages and tools used 0. Docker

  1. Typescript
  2. AWS CDK
  3. ReactJS
  4. Webpack
  5. Nx Monorepo

You can use nx docker:run exporter for testing locally the PDF generation to S3/local directory.

Testing

Jest is used for exporter and web.

Jest & AWS CDK Assertions is used for infra.

Installation

yarn install

Running

Web

nx serve web

Exporter

nx docker:run exporter

Alternatively, in the .run folder there are run configurations for running the exporter from IntelliJ.

Building

Build can be triggered across all services (exporter,infra,web) by running

yarn build

Alternatively each can be run individually via one of the commands

nx build exporter
nx build infra
nx build web

Linting

Linting can be triggered across all services (exporter,infra,web) by running

yarn lint

Alternatively each can be run individually via one of the commands

nx lint exporter
nx lint infra
nx lint web

Note

Infrastructure CDK code is linted with eslint and cdk-nag, the CDK equivalent of Cloudformation cfn_nag to ensure standard & best practice adherence by IaC.

Other apps are linted with eslint.

Testing

Tests can be run across all services (exporter,infra,web) by running

yarn test

Alternatively each can be run individually via one of the commands

nx test exporter
nx test infra
nx test web

Testing coverage is enforced globally via the individual jest.config.js as follows

Exporter

Category Minimum
Branches 100%
Functions 100%
Lines 100%
Statements 100%

Infrastructure

Category Minimum
Branches 100%
Functions 100%
Lines 100%
Statements 100%

Web

Category Minimum
Branches 76%
Functions 82%
Lines 87%
Statements 87%

Infrastructure

Architectural Diagram

Deployment from local

Single command

nx deploy infra

Individual components in order Note Deployment order is important as subsequent stacks have dependencies on previous ones.

cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/ECR.ts'
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/Exporter.ts'
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/Web.ts'

or simpler, with build included

nx deploy:ecr infra
nx deploy:exporter infra
nx deploy:web infra

Cloudformation Resource Diagrams

These are the diagrams of all resources and their connections as generated by cfn-diagram from the CDK source code.

To generate the diagram on the fly while tweaking the infrastructure run

nx diagram exporter
nx diagram layer
nx diagram web

How to Contribute

  1. Clone repo and create a new branch:
git checkout https://github.com/crisboarna/react-cv -b name_for_new_branch`.
  1. Make changes and test
  2. Submit Pull Request with comprehensive description of changes

License

CC0

Full license details can be found in LICENSE.md

react-cv's People

Contributors

crisboarna avatar greenkeeper[bot] avatar greenkeeperio-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-cv's Issues

An in-range update of react is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 16.3.0 of react was just published.

Branch Build failing 🚨
Dependency react
Current Version 16.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

react is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v16.3.0

16.3.0 (March 29, 2018)

React

  • Add a new officially supported context API. (@acdlite in #11818)
  • Add a new React.createRef() API as an ergonomic alternative to callback refs. (@trueadm in #12162)
  • Add a new React.forwardRef() API to let components forward their refs to a child. (@bvaughn in #12346)
  • Fix a false positive warning in IE11 when using React.Fragment. (@XaveScor in #11823)
  • Replace React.unstable_AsyncComponent with React.unstable_AsyncMode. (@acdlite in #12117)
  • Improve the error message when calling setState() on an unmounted component. (@sophiebits in #12347)

React DOM

  • Add a new getDerivedStateFromProps() lifecycle and UNSAFE_ aliases for the legacy lifecycles. (@bvaughn in #12028)
  • Add a new getSnapshotBeforeUpdate() lifecycle. (@bvaughn in #12404)
  • Add a new <React.StrictMode> wrapper to help prepare apps for async rendering. (@bvaughn in #12083)
  • Add support for onLoad and onError events on the <link> tag. (@roderickhsiao in #11825)
  • Add support for noModule boolean attribute on the <script> tag. (@aweary in #11900)
  • Fix minor DOM input bugs in IE and Safari. (@nhunzaker in #11534)
  • Correctly detect Ctrl + Enter in onKeyPress in more browsers. (@nstraub in #10514)
  • Fix containing elements getting focused on SSR markup mismatch. (@koba04 in #11737)
  • Fix value and defaultValue to ignore Symbol values. (@nhunzaker in #11741)
  • Fix refs to class components not getting cleaned up when the attribute is removed. (@bvaughn in #12178)
  • Throw with a meaningful message if the component runs after jsdom has been destroyed. (@gaearon in #11677)
  • Don't crash if there is a global variable called opera with a null value. @alisherdavronov in #11854)
  • Don't check for old versions of Opera. (@skiritsis in #11921)
  • Deduplicate warning messages about <option selected>. (@watadarkstar in #11821)
  • Deduplicate warning messages about invalid callback. (@yenshih in #11833)
  • Deprecate ReactDOM.unstable_createPortal() in favor of ReactDOM.createPortal(). (@prometheansacrifice in #11747)
  • Don't emit User Timing entries for context types. (@abhaynikam in #12250)
  • Improve the error message when context consumer child isn't a function. (@raunofreiberg in #12267)
  • Improve the error message when adding a ref to a functional component. (@skiritsis in #11782)

React DOM Server

  • Prevent an infinite loop when attempting to render portals with SSR. (@gaearon in #11709)
  • Warn if a class doesn't extend React.Component. (@wyze in #11993)
  • Fix an issue with this.state of different components getting mixed up. (@sophiebits in #12323)
  • Provide a better message when component type is undefined. (@HeroProtagonist in #11966)

React Test Renderer

  • Fix handling of fragments in toTree(). (@maciej-ka in #12107 and @gaearon in #12154)
  • Shallow renderer should assign state to null for components that don't set it. (@jwbay in #11965)
  • Shallow renderer should filter legacy context according to contextTypes. (@koba04 in #11922)
  • Add an unstable API for testing asynchronous rendering. (@acdlite in #12478)

React Is (New)

  • First release of the new package that libraries can use to detect different React node types. (@bvaughn in #12199)
  • Add ReactIs.isValidElementType() to help higher-order components validate their inputs. (@jamesreggio in #12483)

React Lifecycles Compat (New)

Create Subscription (New)

React Reconciler (Experimental)

  • Expose react-reconciler/persistent for building renderers that use persistent data structures. (@gaearon in #12156)
  • Pass host context to finalizeInitialChildren(). (@jquense in #11970)
  • Remove useSyncScheduling from the host config. (@acdlite in #11771)

React Call Return (Experimental)

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of react-dom is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 16.3.0 of react-dom was just published.

Branch Build failing 🚨
Dependency react-dom
Current Version 16.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

react-dom is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v16.3.0

16.3.0 (March 29, 2018)

React

  • Add a new officially supported context API. (@acdlite in #11818)
  • Add a new React.createRef() API as an ergonomic alternative to callback refs. (@trueadm in #12162)
  • Add a new React.forwardRef() API to let components forward their refs to a child. (@bvaughn in #12346)
  • Fix a false positive warning in IE11 when using React.Fragment. (@XaveScor in #11823)
  • Replace React.unstable_AsyncComponent with React.unstable_AsyncMode. (@acdlite in #12117)
  • Improve the error message when calling setState() on an unmounted component. (@sophiebits in #12347)

React DOM

  • Add a new getDerivedStateFromProps() lifecycle and UNSAFE_ aliases for the legacy lifecycles. (@bvaughn in #12028)
  • Add a new getSnapshotBeforeUpdate() lifecycle. (@bvaughn in #12404)
  • Add a new <React.StrictMode> wrapper to help prepare apps for async rendering. (@bvaughn in #12083)
  • Add support for onLoad and onError events on the <link> tag. (@roderickhsiao in #11825)
  • Add support for noModule boolean attribute on the <script> tag. (@aweary in #11900)
  • Fix minor DOM input bugs in IE and Safari. (@nhunzaker in #11534)
  • Correctly detect Ctrl + Enter in onKeyPress in more browsers. (@nstraub in #10514)
  • Fix containing elements getting focused on SSR markup mismatch. (@koba04 in #11737)
  • Fix value and defaultValue to ignore Symbol values. (@nhunzaker in #11741)
  • Fix refs to class components not getting cleaned up when the attribute is removed. (@bvaughn in #12178)
  • Throw with a meaningful message if the component runs after jsdom has been destroyed. (@gaearon in #11677)
  • Don't crash if there is a global variable called opera with a null value. @alisherdavronov in #11854)
  • Don't check for old versions of Opera. (@skiritsis in #11921)
  • Deduplicate warning messages about <option selected>. (@watadarkstar in #11821)
  • Deduplicate warning messages about invalid callback. (@yenshih in #11833)
  • Deprecate ReactDOM.unstable_createPortal() in favor of ReactDOM.createPortal(). (@prometheansacrifice in #11747)
  • Don't emit User Timing entries for context types. (@abhaynikam in #12250)
  • Improve the error message when context consumer child isn't a function. (@raunofreiberg in #12267)
  • Improve the error message when adding a ref to a functional component. (@skiritsis in #11782)

React DOM Server

  • Prevent an infinite loop when attempting to render portals with SSR. (@gaearon in #11709)
  • Warn if a class doesn't extend React.Component. (@wyze in #11993)
  • Fix an issue with this.state of different components getting mixed up. (@sophiebits in #12323)
  • Provide a better message when component type is undefined. (@HeroProtagonist in #11966)

React Test Renderer

  • Fix handling of fragments in toTree(). (@maciej-ka in #12107 and @gaearon in #12154)
  • Shallow renderer should assign state to null for components that don't set it. (@jwbay in #11965)
  • Shallow renderer should filter legacy context according to contextTypes. (@koba04 in #11922)
  • Add an unstable API for testing asynchronous rendering. (@acdlite in #12478)

React Is (New)

  • First release of the new package that libraries can use to detect different React node types. (@bvaughn in #12199)
  • Add ReactIs.isValidElementType() to help higher-order components validate their inputs. (@jamesreggio in #12483)

React Lifecycles Compat (New)

Create Subscription (New)

React Reconciler (Experimental)

  • Expose react-reconciler/persistent for building renderers that use persistent data structures. (@gaearon in #12156)
  • Pass host context to finalizeInitialChildren(). (@jquense in #11970)
  • Remove useSyncScheduling from the host config. (@acdlite in #11771)

React Call Return (Experimental)

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of react-dev-utils is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 5.0.1 of react-dev-utils was just published.

Branch Build failing 🚨
Dependency react-dev-utils
Current Version 5.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

react-dev-utils is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Cannot push to the Git repository.

semantic-release cannot push the version tag to the branch master on the remote Git repository with URL https://x-access-token:[secure]@github.com/crisboarna/react-cv.git.

This can be caused by:


Good luck with your project ✨

Your semantic-release bot 📦🚀

An in-range update of prop-types is breaking the build 🚨

Version 15.6.2 of prop-types was just published.

Branch Build failing 🚨
Dependency [prop-types](https://github.com/facebook/prop-types)
Current Version 15.6.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

prop-types is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 15 commits.

  • fa6fbb7 15.6.2
  • 5115f5c Merge pull request #180 from jaller94/master
  • 2ac742c Merge pull request #171 from barrymichaeldoyle/master
  • a7a5a64 Merge pull request #194 from facebook/no-fbjs
  • d6c9c5c Preserve "Invariant Violation" name
  • 07d1b47 Remove fbjs dependency
  • 3c99d57 Remove trailing spaces
  • a36cda8 Move explanation of isRequired and show it in PropTypes.shape
  • ba3da12 Show that shapes can have required properties
  • 2bde8eb Add example for PropTypes.exact
  • d65f80e Updated vars to consts and lets in PropTypesProductionStandalone-test.js
  • c10c93f Updated vars to consts and lets in PropTypesDevelopmentStandalone-test.js
  • 8e2b34e Updated vars to consts and lets in PropTypesDevelopmentReact15.js
  • c5527c8 Updated vars with consts and lets in PropTypesProductionReact15-test.js
  • 7cc8c81 Add 15.6.1 to CHANGELOG

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of babel-preset-react-app is breaking the build 🚨

Version 3.1.2 of babel-preset-react-app was just published.

Branch Build failing 🚨
Dependency [babel-preset-react-app](https://github.com/facebookincubator/create-react-app)
Current Version 3.1.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

babel-preset-react-app is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.