> ## 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.

# Overrider Panel

> Tool for overriding weather data, statuses, and text forecasts for Pinpoint

## Overview

Overrider Panel is a tool used to override weather data for Pinpoint. It allows editing weather data, statuses, and text forecasts for enterprise locations, WeatherWatch locations, and any valid Geos locations.

## Repositories

Overrider consists of two repositories:

* **Overrider (Panel):** [https://git.wthr.ws/weathertech/Overrider](https://git.wthr.ws/weathertech/Overrider)
* **Overrider API:** [https://git.wthr.ws/weathertech/overrider-api](https://git.wthr.ws/weathertech/overrider-api)

**Admin Panel:** [http://panel.devops.arabiaweather.com/](http://panel.devops.arabiaweather.com/)

Clone the repositories:

```bash theme={null}
git clone https://git.wthr.ws/weathertech/Overrider
git clone https://git.wthr.ws/weathertech/overrider-api
```

## Architecture

### Components

The Overrider Panel consists of three main components, each with its own Dockerfile:

1. **app** - Frontend application
2. **backend** - Backend API service
3. **nginx** - Web server/reverse proxy

### Authentication

Overrider uses **Atlas** for authentication. Users must be registered in Atlas to access the Overrider Panel.

### Data Storage

Overrides are stored in **Redis** on `cluster-n03`. For more information about Redis deployment, see [Redis Infrastructure](/infrastructure/databases/redis).

<Warning>
  **Important:** Overrides stored in Redis have a **TTL (Time To Live) of 10 days**. After 10 days, overrides will expire and need to be recreated. Make sure to refresh or recreate overrides before they expire.
</Warning>

## Deployment

Overrider is deployed via **Portainer** on Docker Swarm using two separate stacks.

### Deployment Locations

* **Overrider Panel Stack:** [wt-ovrd-panel](https://portainer.devops.arabiaweather.com/#!/2/docker/stacks/wt-ovrd-panel?id=264\&type=1\&regular=true\&orphaned=false\&orphanedRunning=false)
* **Overrider API Stack:** [wt-overrider-api2](https://portainer.devops.arabiaweather.com/#!/2/docker/stacks/wt-overrider-api2?id=308\&type=1\&regular=true\&orphaned=false\&orphanedRunning=false)

### Deployment Process

<Warning>
  Overrider has **no CI/CD pipeline**. All deployments must be done manually.
</Warning>

#### Overrider API Deployment

1. **Make code changes** in the `overrider-api` repository
2. **Commit** your changes:
   ```bash theme={null}
   git add .
   git commit -m "Your commit message"
   ```
3. **Push** to the repository:
   ```bash theme={null}
   git push
   ```
4. **Tag** the release:
   ```bash theme={null}
   git tag vYYYY.MM.DD-X
   git push --tags
   ```
5. **Build** the Docker image:
   ```bash theme={null}
   docker build -t registry.docker.devops.arabiaweather.com/overrider-api:vYYYY.MM.DD-X .
   ```
6. **Push** the image to the registry:
   ```bash theme={null}
   docker push registry.docker.devops.arabiaweather.com/overrider-api:vYYYY.MM.DD-X
   ```
7. **Update the stack** in Portainer (`wt-overrider-api2`)

#### Overrider Panel Deployment

The Overrider Panel has three components (app, backend, nginx), each with its own Dockerfile:

1. **Make code changes** in the `Overrider` repository
2. **Commit** and **push** your changes
3. **Tag** the release
4. **Build** each component:
   ```bash theme={null}
   # Build app
   docker build -f app/Dockerfile -t registry.docker.devops.arabiaweather.com/overrider-app:vYYYY.MM.DD-X ./app

   # Build backend
   docker build -f backend/Dockerfile -t registry.docker.devops.arabiaweather.com/overrider-backend:vYYYY.MM.DD-X ./backend

   # Build nginx
   docker build -f nginx/Dockerfile -t registry.docker.devops.arabiaweather.com/overrider-nginx:vYYYY.MM.DD-X ./nginx
   ```
5. **Push** all images:
   ```bash theme={null}
   docker push registry.docker.devops.arabiaweather.com/overrider-app:vYYYY.MM.DD-X
   docker push registry.docker.devops.arabiaweather.com/overrider-backend:vYYYY.MM.DD-X
   docker push registry.docker.devops.arabiaweather.com/overrider-nginx:vYYYY.MM.DD-X
   ```
6. **Update the stack** in Portainer (`wt-ovrd-panel`)

## How Overrider Works

### Overrider Adapter

Overrider uses an **adapter** that takes Pinpoint data and changes its structure to apply overrides. This adapter integrates with Pinpoint to modify weather data before it's returned to clients.

### Location and Weather IDs

<Warning>
  Overrider depends heavily on **location ID** and **weather ID** from Geos. When querying data from Pinpoint using longitude/latitude for the same location, it will be **without overrides**.
</Warning>

#### Location ID

* Overrides are applied based on **location ID** from Geos
* Queries using longitude/latitude directly will not receive overrides
* Always use location ID when querying for overridden data

#### Weather ID

* **Weather ID** is used to apply one override for a location and all linked locations
* All locations with the same **weather ID** will receive the same override
* This allows bulk updates across multiple locations that share the same weather conditions

### Supported Override Types

Overrider can override:

1. **Weather Data** - Modify forecast values, temperatures, conditions, etc.
2. **Statuses** - Change status indicators for locations
3. **Text Forecasts** - Override text-based forecast descriptions

### Supported Location Types

Overrides can be applied to:

* **Enterprise locations**
* **WeatherWatch locations**
* **Any valid Geos locations**

## Related Services

* **[Atlas](/data-ai/legacy-met-tools/atlas)** - Authentication service used by Overrider
* **[Pinpoint](/data-ai/pinpoint)** - Weather API that Overrider modifies
* **[Geos](/data-ai/geos)** - Location service providing location and weather IDs
* **[Redis](/infrastructure/databases/redis)** - Storage for override data
