Prototyping guidance
Guidance to accompany the training we offer in GitHub, the prototyping kit and HTML and CSS. Book and explore our various code training courses.
Setting up for the first time
How to download all the kit you need to start creating prototypes.
- Download Atom
- Create a GitHub account
- Download GitHub desktop
- Download Node
- Open ‘Terminal’ on your laptop.
- In Terminal, type this (exactly):
xcode-select --install
and hit enter. It will install. If you already have it installed it will say error, this is already installed.
If you have an option, always choose the one that’s recommended for most users.
To do this, hit the command (cmd) key and the space bar at the same time. This is an easy way to find anything on your Mac.
We’re now going to do some stuff with code. Don’t panic. You’re just typing stuff into a box.
I’m set up, how do I create a new prototype?
First, download the GOV.UK prototyping kit. This is effectively a blank prototype with example pages designed in the GOV.UK brand. You'll need to download the kit every time you create a new prototype.
- Click on this link to the govuk prototyping kit.
- Click on the green ‘Clone or download’ button and choose to download a zip of the kit.
- Go to your download and double click to unzip it.
- Open GitHub desktop, then minimise. Drag and drop your prototype into GitHub desktop. It will tell you that this isn’t a Git repository and ask if you would like to create a repository here instead. Click that link and then click the 'Create repository' button.
- Your new prototype is now linked to your GitHub account.
- Open Atom.
- Open your prototype in Atom by going to ‘File’, ‘Open’ and finding your prototype folder on your desktop (or wherever you’ve saved it).
Think about where you want to save your prototype on your computer. Your desktop is good for the first time as it’s nice and easy to find. Rename your prototype folder (the folder name defaults to govuk_prototype_kit): For example, passports-prototype
You’re now in your prototype and ready to make changes.
Seeing what your prototype looks like
Obviously it’s important to see what your prototype looks like as you're working on it.
- Open Terminal, then minimise.
- Find your prototype folder.
- Drag the whole folder into Terminal (basically drop it onto the Terminal icon in your Mac dock)
- Type
npm install
into terminal and then hit enter (you only need to do this once per prototype) - Now type
npm start
and hit enter. It should say it’s ‘Listening on port 3000’. - Go to this url: http://localhost:3000
Stuff will happen. This can take a few minutes. Have a cup of tea.
And there is it! Your prototype in all its glory. Note, you can’t send http://localhost:3000 to other people to look at because it only exists on your computer. You’ll also need to save your changes in Atom (command+s) before you can see them on localhost3000.
If I close everything, how do I open my prototype again?
- Open Atom.
- Open your prototype in Atom.
- Open Terminal, then minimise.
- ‘Open’ your prototype in Terminal by dragging and dropping your prototype folder onto the Terminal icon in your dock.
- Type
npm start
and hit enter.
And you’re back. This will make your prototype available again at http://localhost:3000