Skip to main content

Set up a GeoGirafe client

If you're new to GeoGirafe, this guide is the perfect place to start.

tip

GeoGirafe and this tutorial are written in TypeScript. However, it doesn't mean your project must be in TypeScript. We use Vite to bundle our project. Please ensure you follow the "Getting Started" guide for Vite before proceeding.

Requirements

  • NodeJS version 20+
  • GIT

Install

The last stable version of GeoGirafe can be installed with just one command:

npm create @geogirafe/template <application-name> <version>

This will :

  • create a folder my-geogirafe-app containing a minimal project of GeoGirafe.
  • download all the dependencies and build the project

This will take 2-3 minutes, depending on your network speed.

Install the last stable version

To install the last stable version, you can just omit the version parameter:

npm create @geogirafe/template my-geogirafe-app

Install the last development version

If you want to install the last development version, which includes all the last features and bugfixes, you can use the following command:

npm create @geogirafe/template my-geogirafe-app next

Please note that the development versions can have some small bugs or regressions, even if we try to kleep them as stable as possible.

Install an old version

It is also possible to install old version of GeoGirafe, by passing the version number as last parameter:

npm create @geogirafe/template my-geogirafe-app v0.9

Create SSL certificates

Once the installation is done, you'll have to create an SSL-Certificate that can be used for local development.
This is important, because some functionalities will only work with a valid SSL Certificate. This is a limitation of the browsers, that do not allow for example services-workers do work correctly is they are used on a non-secured website.

You can either do it manually on your own, or use the scripts provided by GeoGirafe and that will help you to create this certificate, and tell the system and the browser to trust it:

On Windows:

cd my-geogirafe-app
npm run generate-dev-certs-win

On Linux:

cd my-geogirafe-app
npm run generate-dev-certs

Then you can start the project :

npm start

That's it, you should now be able to see your first map, congratulations!

Next steps

You can now start by reading the README file of the project, it contains the first explanations.
Each file in this project also contains comments. This will allow you to better understand how is working GeoGirafe, and how you can configure it to your needs, add your own layers, ...

If necessary, you can always get in touch with us on Discord: https://discord.com/channels/1194934479282778122

Have a nice journey with GeoGirafe! :-)