Before we start…

Before we get started there are a few things you’re going to need, apart from a computer!

We’ll be building the app on a Mac, so all of the terminal commands, apps etc. will be OSX focused and the code will be transferable due to the beauty of Docker however if you’re following the screencasts on a PC or Linux – things may look and feel a little different.

Below is a list of things you’ll need to get started, and is my set up list whenever I set. up my mac

A lot of things we’ll install via Homebrew but before we can install homebrew we’ll need to install the xCode Command line tools, amongst other things it gives you git.

When you see a code snippet as below starting with ‘$’ it’ll indicate it’s a terminal command

$ xcode-select —install

This’ll take a while to install so go watch an episode of Silicon Valley, I highly recommend the Middle Out episode

Once installed you can go ahead and install Homebrew

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

Once you’ve installed Brew here’s what I tend to install

Python Version Manager – just in case I ever need to flip between python versions

$ brew install pyenv

Now we can install a specific version of python using Pyenv

$ pyenv install 3.11.1

Now check which version of python you’re using

$ python —version

I use zsh and if you get a zsh: command not found: python you’ll need to edit your .zshrc file

$ echo "alias python=/usr/bin/python3" >> ~/.zshrc

Now either restart your terminal or run

$ source ~/.zshrc

Now if you check your python version again you should see

$ python —version 
Python 3.9.6 

Now, the observant of you will no doubt be asking why the devil is it showing 3.9.6, we installed 3.11.1… well spotted. 3.9.6 was my system default version, we’ll be using pyenv from now on and not relying on the system version as we’ll be using virtual environments anyways

$ pyenv local 3.11.1 
$ pyenv global 3.11.1 

Now if you check again

$ pyenv local
3.11.1

$ pyenv global
3.11.1

Next let’s install the database, I’m a postgres guy – don’t judge me!

$ brew install postgresql@15

While we’re here we may as well install node, similar to python we’ll use Node Version Manager to install and manage our node versions:

$ brew install nvm

If it wasn’t automatically created you’ll need to run 

$ mkdir ~/.nvm

You’ll then need to add the following to your .zshrc file

$ nano ~/.zshrc

An editor will open, at the bottom of the file past the snippet below

export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. 
"/opt/homebrew/opt/nvm/nvm.sh" 
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"

 To save and exit out of nano press ctrl + x then y to save.

Let’s reload zsh again

$ source ~/.zshrc

Now check we have nvm installed and it’s all works OK

$ nvm
v19.5.0

I think that’s most of what I do to set up, there are a few other things I install via pip but the only other thing we’ll need to do is install Docker, you can do that from the Docker website.

I use Pycharm and Webstorm from JetBrains but do flip over to VS code sometimes… just use whatever IDE you’re used to, this is less of a worry!

OK, I think we’re ready to go