This guide tries to go through some of the requirements for developing on this project, but feel free to adopt it to your own needs.
- Git: Linux or Windows
- Node.js: Linux or Windows
- PHP: Linux or Windows
- Composer
- Windows Terminal (optional, and for Windows only)
- A text editor of your choice
Only PHP CLI (Command Line Interface) is required ; no need for a web-sver (like Apache or nginx).
Git installation is quite straightforward, and can also be replaced by installing a Git GUI, or a text editor that has Git built-in like Visual Studio Code. If you choose to install GIT standalone, you can leave most options to default, but it might be worth to change the editor config to an editor you prefer on this screen:
Getting a working version of EqualStreetNames consists of a couple of steps:
-
Clone the repository
git clone https://github.com/EqualStreetNames/equalstreetnames.git
-
Go to the folder
cd equalstreetnames
-
Initialize and download city submodules
git submodule update --init --recursive
-
Install JavaScript dependencies with
npm
(command to run inwebsite/
directory)
Required if you want to run the website locallynpm install
-
Install PHP dependencies with
composer
(command to run inprocess/
directory)
Required if you want to run the data update process locallycomposer install
You should now have a completely working version of EqualStreetNames to work on.
-
Create a Mapbox token
-
Create a file named
.env
in thewebsite/
directory of the project -
Add the following line to the
.env
file:MAPBOX_TOKEN=[your Mapbox token]
replacing[your Mapbox token]
with the token you created -
Choose the city you want to run locally (command to run in
website/
directory)npm run build:country:city -- --serve
Example for Brussels, Belgium:
npm run build:belgium:brussels -- --serve
-
Once installed and running, go to http://localhost:1234/
-
Choose the city you want to update locally (command to run in
process/
directory)composer run update-data -- --city=country/city
Example for Brussels, Belgium:
composer run update-data -- --city=belgium/brussels