Terminal upgrade (Optional)

Install ZSH

ZSH is a shell on steroids, it has multiple plugins and functionality that can save a lot of time.

To install zsh run in your command line:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

If you previously haven’t installed git on the machine, a prompt to install git will show up. After installation, run the sh command from above again.

Make sure you have a ~/.zshrc exists, if not it might be an indicator that the installation failed for some reason.

ZSH auto-complete plugin

Add the autocomplete plugin for autocompleting previously typed commands in the shell. Follow the instructions here.

Powerlevel10k (optional)

Powerlevel10k is a theme for Zsh. It emphasizes speedflexibility, and out-of-the-box experience.

  1. Clone the repository:

    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

  2. Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.

  3. Restart your terminal and follow the onboarding wizard to configure it to your likings and preferences.

Command Line Tools, Homebrew & Casks

Every developer utilizes Command Line Tools. A simple terminal command will allow you to download these. It will ask you to confirm after you have entered the command.

xcode-select --install

Homebrew & Casks

Homebrew, it’s the missing package manager for macOS, and quite powerful at that.

Copy and paste the following code into your terminal to install Homebrew.

/bin/shell -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

It will ask you to enter ‘Return’ to confirm the installation.

After installation run, the echo and eval commands shown on screen to add brew to your shell executables

Setting up git

To set up git and create an access token for GitHub, suggested installing GitHub Desktop before.

Helpful settings

Show hidden files in Finder: cmd + shift + . or in the terminal:

defaults write com.apple.finder AppleShowAllFiles YES

Development Environment

Node & NVM

For installing node we suggest installing it using NVM (Node Version Manager) for easily managing multiple node versions.

  1. Install nvm on your machine.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | shell

Make sure that you have installed zsh previously, so NVM can automatically inject the executable to PATH in the .zshrc config file.

  1. After installing nvm and checking that it’s in the path by running nvm --version in your CLI. You can now install our node version:

After running the install script, if you get nvm: command not found or see no feedback from your terminal after you type command -v nvm, simply close your current terminal, open a new terminal, and try verifying again.

  1. Optional for M1 processors - Install Rosetta.

Rosetta enables a Mac with Apple silicon to use apps built for a Mac with an Intel processor.

softwareupdate --install-rosetta

PNPM

For package management, we use PNPM instead of npm or yarn to speed up our install times and space efficiency. To install pnpm globally run:

npm install -g pnpm@8.9.0

Docker

Follow the installation guide on docker website to install docker on your own machine. For ease of use, we suggest installing Docker Desktop.

AWS CLI

Follow the instructions to install the AWS CLI so you can use it to create env later on, based on existing S3 buckets:

Installing or updating the latest version of the AWS CLI

You should get something like this:

AWS CLI

If needed, see:

Resolve “Unable to locate credentials” error in Amazon S3

Run LocalStack

This is needed only when you upload files (for example - an image) in the admin panel from your local environment.

LocalStack emulates cloud service that runs in a single container on your computer. So you can run your AWS applications on your local machine without connecting to the remote cloud provider.

  1. Build a container and run it:
docker run --rm -it -p 4566:4566 -p 4571:4571 localstack/localstack
  1. Create local S3 buckets needed for the app:

    In local environment:

    aws --endpoint-url=http://localhost:4566 s3 mb s3://novu-local
    

    In test environment:

    aws --endpoint-url=http://localhost:4566 s3 mb s3://novu-test
    
  2. Update cors:

    aws --endpoint-url=http://localhost:4566 s3api put-bucket-cors --bucket novu-local --cors-configuration file://cors.json
    
    cors.json
    {
      "CORSRules": [
        {
          "AllowedOrigins": ["*"],
          "AllowedHeaders": ["*"],
          "AllowedMethods": ["GET", "PUT", "POST", "DELETE"],
          "MaxAgeSeconds": 3000,
          "ExposeHeaders": ["x-amz-server-side-encryption"]
        }
      ]
    }
    

MongoDB

After installing brew you can easily install the MongoDB community edition.

  1. Tap the MongoDB Homebrew Tap to download the official Homebrew formula for MongoDB and the Database Tools, by running the following command in your macOS Terminal:
brew tap mongodb/brew
  1. To install MongoDB, run the following command in your macOS Terminal application

    1. You might need to update the Command Line Tools to be compatible with Xcode - see

    Sign in with your Apple ID

brew install mongodb-community@5.0
  1. Run the service in the background and start automatically after restart.
brew services start mongodb/brew/mongodb-community@5.0

Redis

After installing homebrew run the redis installation

brew install redis

After installation run the service to start on system start as well.

brew services restart redis

Local dev domain (Optional)

This will allow you to use local.novu.co instead of localhost when accessing the service on your machine.

Open the /etc/hosts file:

sudo nano /etc/hosts

And add the local.novu.co domain

127.0.0.1       local.novu.co

Code Editor

Feel free to install your favorite code editor. We supply licenses for WebStorm, or you can Visual Studio Code if you prefer it.

Productivity tools

  • GitHub Desktop (Optional)

GitHub Desktop simplifies the development workflow and interaction with Git. Download the client from their website.

  • Clean your Dock bar (Optional)

For better productivity and wellness, we suggest removing the not-used apps from LaunchBar. Don’t worry if you will remove most apps from there. You can always use the spotlight to open the apps you need. Clean workspace === Happy life :) Right Click on the app icon > Options > Remove from Dock

Dock