1.0.0-0 • Published 4 years ago

found-money-personalization v1.0.0-0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

💰 found-money-personalization 💰

Table Of Contents

Setting Up Your Environment

Node

Starting Fresh

You may have already installed some required items in a conflicting fashion. Just in case, check your brew-installed dependencies via brew list. If yarn, node, nvm, or anything else that looks "JavaScripty" exists, use brew uninstall ${THAT}.

Installation

Before you get going on this project, you'll want to setup your environment for development. First, you'll want to install Node. We recommend using NVM. After you install NVM, you'll be able to go into any project with an .nvmrc and run nvm use to automatically use (or install) the node version used in a project. You can also setup a default (for when a project doesn't have an .nvmrc). Anytime you dive into a new new version of Node, we recommend running npm i -g yarn which installs yarn globally. What is yarn?

NPM

We have private NPM modules which you need access to before you can install this project's dependencies.

  1. Create an account on https://npmjs.org if you don't already have one
  2. Get access to the Acorns NPM organization by submitting a Help Desk ticket
  3. Generate a read/write capable API token
  4. Create ~/.npmrc and add //registry.npmjs.org/:_authToken=${YOUR_TOKEN_HERE}

Installing Project Dependencies

Now that you have node setup and access to our private registry, you can install the project's dependencies with yarn (which is an alias for yarn install). We recommend setting up a system alias for yarn install && yarn dev to always keep dependencies in sync with your workflow.

AWS Setup

Gain access to Acorns AWS and setup your CLI.

Workflow

With your dependencies installed, copy the .env.sample file into a .env file. Once you've setup your local dotenv, you should be able to run the dev server with yarn dev, and a link will show up in your terminal where a GraphQL Playground is deployed.

Deployments

Local deployments to serverless happen via a bash script inside the scripts folder.

sh ./scripts/sls.sh ENVIRONMENT deploy where ENVIRONMENT can either be "development", "staging", or "production".

Project-Specific Commands

To see the commands you have available, checkout the scripts key in package.json.

Technologies At Play

Node.js

This is a JavaScript server run-time built upon a Chrome™️ JavaScript engine. It's just the way that we use JavaScript to integrate with the file system, as opposed to the browser.

TypeScript

TypeScript is a strict, typed superset of ECMAScript that compiles to plain JavaScript. Note that when adding dependencies, a project may or may not have type declarations. Always check to see if you can install types for a dependency via yarn add @types/NEW-DEPENDENCY-NAME. Large collections of declaration files for popular JavaScript libraries are hosted on GitHub in DefinitelyTyped.

Learn fast! 🏎

GraphQL

https://acorns.atlassian.net/wiki/spaces/~890732460/pages/570197528/GraphQL+Recap+at+Acorns+2017-2019

Jest

This is a JavaScript testing framework brought to us by Facebook.

Learn all about testing with Jest

DynamoDB

DynamoDB is a document store/no-sql database from AWS. It is very, very scalable but does not support SQL queries.

https://aws.amazon.com/dynamodb/

AWS Lambda

Lambdas are bits of code that execute in reponse to AWS and can be hooked up to various queues or streams (CloudWatch Events, SQS, Kinesis, DynamoDB streams).

Serverless

Serverless is a wrapper of CloudFormation that makes it easy to create and maintain projects that use DynamoDB + Lambda (and han be used for other AWS resources too).

Yarn

yarn is simply a faster and more reliable npm (not to be confused with NPM - an evil organization). They both act as a package managers as well as a project Node task runner.