> ## Documentation Index
> Fetch the complete documentation index at: https://docs-v2.ard.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started

> First-time setup and local development notes for Pinpoint

## Repository

Clone the Pinpoint repository:

```bash theme={null}
git clone https://git.wthr.ws/weathertech/Pinpoint
cd Pinpoint
```

Before running Pinpoint locally, follow the steps below.

## 1. Environment variables (Python / pyd versions)

Pinpoint uses `pyd` and needs a set of environment variables describing supported Python versions.

Run these commands in your terminal:

```bash theme={null}
export PYD_D_VERSION_1=Python_2_4_Or_Later
export PYD_D_VERSION_2=Python_2_5_Or_Later
export PYD_D_VERSION_3=Python_2_6_Or_Later
export PYD_D_VERSION_4=Python_2_7_Or_Later
export PYD_D_VERSION_5=Python_3_0_Or_Later
export PYD_D_VERSION_6=Python_3_1_Or_Later
export PYD_D_VERSION_7=Python_3_2_Or_Later
export PYD_D_VERSION_8=Python_3_3_Or_Later
export PYD_D_VERSION_9=Python_3_4_Or_Later
export PYD_D_VERSION_10=Python_3_5_Or_Later
export PYD_D_VERSION_11=Python_3_6_Or_Later
export PYD_D_VERSION_12=Python_3_7_Or_Later
export PYD_D_VERSION_13=Python_3_8_Or_Later
export PYD_LIBPYTHON_DIR=/usr/lib64
export PYD_LIBPYTHON=python3.10
```

<Note>
  Adjust `PYD_LIBPYTHON_DIR` and `PYD_LIBPYTHON` if your Python installation is in a different path or version.
</Note>

## 2. Initialize submodules

Pinpoint uses a submodule for logging:

```bash theme={null}
git submodule update --init fluentd-log
```

Make sure this completes successfully before building.

## 3. Local `dub.json` overrides (do not commit)

Update `dub.json` locally to match the recommended configuration, but **do not commit** these changes:

```json theme={null}
{
  "authors": [
    "Yazan Dabain",
    "AlQurashi, Abdullah",
    "Khaled Sharif"
  ],
  "copyright": "Copyright (c) 2015-2021, ArabiaWeather",
  "dependencies": {
    "vibe-core": "~>1.24.0",
    "vibe-d:data": "==0.9.3",
    "vibe-d:http": "==0.9.3",
    "vibe-d:redis": "==0.9.3",
    "vibe-d:tls": "==0.9.3",
    "pyd": "~>0.14.0",
    "fluentd-log": { "path": "fluentd-log" },
    "shaped": { "path": "shaped" },
    "fluent-asserts": "~>0.12.5"
  },
  "subConfigurations": {
    "pyd": "env",
    "vibe-d:tls": "notls"
  },
  "description": "The centralized weather API of ArabiaWeather",
  "libs": [
    "tiff",
    "geotiff"
  ],
  "name": "pinpoint",
  "targetType": "executable",
  "versions": [
    "VibeNoSSL"
  ]
}
```

<Warning>
  Keep these changes local only. Do **not** push `dub.json` modifications unless explicitly agreed with the team.
</Warning>

## 4. Local `dub.selections.json` overrides (do not commit)

Similarly, adjust `dub.selections.json` locally to pin the recommended versions:

```json theme={null}
{
  "fileVersion": 1,
  "versions": {
    "botan": "1.12.19",
    "botan-math": "1.0.4",
    "ddmp": "0.0.1-0.dev.3",
    "diet-ng": "1.8.3",
    "eventcore": "0.9.35",
    "fluent-asserts": "0.12.5",
    "fluentd-log": { "path": "fluentd-log" },
    "libasync": "0.8.6",
    "libdparse": "0.8.8",
    "libevent": "2.0.2+2.0.16",
    "memutils": "1.0.10",
    "mir-linux-kernel": "1.0.1",
    "openssl": "1.1.6+1.0.1g",
    "openssl-static": "1.0.5+3.0.8",
    "pyd": "0.14.5",
    "shaped": { "path": "shaped" },
    "stdx-allocator": "2.77.5",
    "taggedalgebraic": "0.11.23",
    "vibe-container": "1.4.1",
    "vibe-core": "1.24.0",
    "vibe-d": "0.9.3"
  }
}
```

<Warning>
  As with `dub.json`, these selections are meant for local development. Do **not** commit them without alignment with the rest of the team.
</Warning>

## 5. Dependencies

Make sure required system dependencies are installed. For example:

```bash theme={null}
sudo apt install redis-server
```

Other missing libraries will usually be indicated by build or runtime errors; install them as needed on your environment.
