1.9.0 • Published 3 years ago

steezy-api v1.9.0

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

STEEZY Studio

Installation

Use your terminal to run the commands below during the installation process.

  1. Clone GitHub repository onto your local environment.

    git clone git@github.com:steezyinc/fury.git
  2. Navigate to fury root folder in your terminal and install npm modules.

    npm i
  3. Create .env in your root folder. Get access to Steezy's shared LastPass space and copy the fury-local-env-file environment variables under the Shared-STEEZY Engineering space to your new file.

  4. Run local development environment on fury.

    npm run dev 
  5. Access the application on http://localhost:3001/graphql

GraphQL Playground Setup

  1. If you haven't already, head over to the Sprite repo and follow the README.md to set it up locally.

  2. Copy the following snippet and paste it into the HTTP HEADERS section of GraphQL Playground.

{
  "Authorization": "Bearer {TOKEN}",
  "apollographql-client-name": "gui",
  "apollographql-client-version": "1.0.0"
}
  1. Replace {TOKEN} with a firebase auth token (steps for obtaining your auth token are on Guru).

Git Workflow

We are following the source-control branching model of Github Flow

  1. Go to root folder of your app and pull main branch.

    git checkout main
    
    git pull
  2. Create a new branch off of main. Name your branches off of the ticket number from the project management board e.g. STZY-### or STZY-###-what-you-are-working-on

    git checkout -b STZY-###-some-title
  3. Commit your files early and often with a descriptive message of WHY the commit was needed.

    git add [FILE_NAME]
    
    git commit -m "A clear descriptive message of WHY this commit was needed and NOT WHAT was implemented"
  4. Push your branch to central respository.

    git push -u origin HEAD
  5. Once you are finished with your task, go to Github and create a pull request from your new branch to main. There must be a review and approval from at least ONE other developer (if no developers are available, it's up to the discretion of the author to self-review or wait)

  6. Once the pull request has been approved, be sure to Squash and merge your pull request into main. Adhere to AngularJS's commit message convention and provide a short title of the commit with a description of the changes (Be as detailed as possible with the description. These notes will automatically be compiled into the release notes). Don't forget to prefix your commit title with a type. This helps the package semantic-release automate version management and release notes. Squash and merge PR example e.g. feat(STZY-###): Adding new feature or fix(STZY-###): remediates this bug

Deployment Process

View build workflows on CircleCI: https://app.circleci.com/pipelines/github/steezyinc

Testing Environment

Located @ https://dev-api.steezystud.io/graphql

  1. CircleCI will automatically deploy to the testing environment whenever there is a commit or merge onto main.

Production

Deploys to production are manual and are done through CircleCI.

  1. Go to CircleCI Dashboard.

  2. Click on the CircleCI job that corresponds to your commit.

  3. Inside the workflow there will be a job labeled approve-production with a pause button. Click this button to manually approve build promotion from testing to staging.

Hotfixes

When subscribing to the Github Flow hotfixes are handled just like features. Since every commit to main is production-ready, hotfixes can just be branched off of main, fixed, PR reviewed, squash & merged, and deployed to production after QA on testing and staging. Don't forget to prefix the commit title with fix: commit title and a description of what was updated so that patch releases to our app is automatically bumped and release notes updated.