- Mac Setup:
- Terminal upgrade (Optional)
- Install ZSH
- ZSH auto-complete plugin
- Powerlevel10k (optional)
- Command Line Tools, Homebrew & Casks
- Homebrew & Casks
- Setting up git
- Helpful settings
- Development Environment
- Node & NVM
- PNPM
- Docker
- AWS CLI
- Run LocalStack
- MongoDB
- Redis
- Secret management via Doppler (Optional)
- Local dev domain (Optional)
- Code Editor
- Productivity tools
- GitHub Desktop (Optional)
- Clean your Dock bar (Optional)
- What’s next?
Mac Setup:
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)"
sh
command from above again.~/.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 speed, flexibility, and out-of-the-box experience.
- Clone the repository:
- SetÂ
ZSH_THEME="powerlevel10k/powerlevel10k"
 inÂ~/.zshrc
. - Restart your terminal and follow the onboarding wizard to configure it to your likings and preferences.
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
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/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
It will ask you to enter 'Return' to confirm the installation.
echo
and eval
commands shown on screen to add brew to your shell executablesSetting 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.
- Install nvm on your machine.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
- 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:
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.nvm install v16.15.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@latest
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:
You should get something like this:
If needed, see:
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
- Create local S3 buckets needed for the app:
add fake credentials
export AWS_ACCESS_KEY_ID=your_access_key_id
export AWS_SECRET_ACCESS_KEY=your_secret_access_key
export AWS_DEFAULT_REGION=us-east-1
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
- 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.
- 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
- To install MongoDB, run the following command in your macOS Terminal application
- You might need to update the Command Line Tools to be compatible with Xcode - see
brew install mongodb-community
- Run the service in the background and start automatically after restart.
brew services start mongodb/brew/mongodb-community
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
Secret management via Doppler (Optional)
Doppler is used for secret management. Request access to Novu Doppler account. The account contains the api
project that has three sets of secrets for development, staging and production environments.
To download secrets for the local development environment:
- Install the Doppler CLI
- Authenticate in the CLI via
doppler login
- Download the secrets via
pnpm run get-remote-env-files
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 , 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
What’s next?
Check out the Start Coding guide to learn how to run and test the project