Skip to content

Setting up dev environment

Susanna Ånäs edited this page Jan 12, 2026 · 2 revisions

Set up local development environment

Build setup: wikidocumentaries-ui

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# serve with hot reload at localhost:8080
# and use a local wikidocumentaries-api instead of the production one
API_URL=http://localhost:3000/ npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run all tests
npm test
  • Set environment variables. There are three environment variables to define. You can ask for them in the developer Slack or mail [email protected]. In a Mac (bash) you can define them like this:
export WIKIDOCUMENTARIES_API_USER_AGENT=<email address>
export FLICKR_KEY=<flickr key>
export BING_MAPS_KEY=<Bing maps key>
export MAPBOX_ACCESS_TOKEN=<Mapbox access token>
export TROVE_API_KEY=<Trove API key>
export EUROPEANA_API_KEY=<Europeana API key>
export SMITHSONIAN_API_KEY=<Smithsonian API key>

Wikimedia and project accounts

  1. Get a Wikimedia account (the same account for all Wikipedias, Wikimedia Commons, Wikidata etc.) e.g. https://www.wikidata.org/wiki/Special:UserLogin
  2. Get the Wikimedia developer account > Registration instructions under "VPS and General Users". The same key and password let you access The Wikimedia Cloud Services at https://wikitech.wikimedia.org/ and the git repositories located at https://gerrit.wikimedia.org/. You are also creating a separate Shell account. Read also:
    1. https://wikitech.wikimedia.org/wiki/Main_Page
    2. https://wikitech.wikimedia.org/wiki/Help:Access
  3. Create an account in Wikimedia Phabricator
  4. Ask to join the codebase in GitHub

Communication channels for developers

Clone this wiki locally