Skip to content

Commit

Permalink
docs: Integration notes for Project API calls
Browse files Browse the repository at this point in the history
90% sure this is accurate from our DMs and my notes
  • Loading branch information
clburlison committed Nov 17, 2023
1 parent 90f083f commit d3b908d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/pages/client/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ A "project" in Kōji is how you create custom endpoints for distributing your ge
1. Once you've completed those steps, your geofences assigned to this project will now be accessible at `http://{your_koji_url}/api/v1/geofence/feature-collection/ReactMap`
1. Projects don't have to be striclty used with external integrations though. Kōji's client can also import geofences by project so it may be convenient to group them for this reason as well.

<Callout type="info" emoji="💡">
Please see [Integrations](/integrations) configuration assistance with a
specific project.
</Callout>

## Import existing Projects

1. After logging in, click the `Map` button on the landing page
Expand Down
41 changes: 40 additions & 1 deletion docs/pages/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { GitHubLogo } from '../components/GitHub'

# External Integrations

In Kōji's architecture, various external integrations primarily leverage HTTP `GET` requests for data retrieval. These integrations can be configured to fetch the latest updates either during the initialization phase of a process or based on a predefined schedule. Additionally, Kōji supports an event-driven approach where it can proactively trigger updates in external services. This mechanism enables synchronization with Kōji's latest state changes, enhancing the responsiveness and efficiency of the integrated systems.

## ReactMap

- Remove the need to have an `areas.json` file by loading your managed geofences straight from Kōji
Expand Down Expand Up @@ -44,6 +46,15 @@ import { GitHubLogo } from '../components/GitHub'
- `config.geofence.path`
- Example: `http://{koji_ip}/api/v1/geofence/poracle/{project_name}`

### Project setup

This is configured inside your Kōji `/admin/project` and will allow hot reloading of your areas within PoracleJS.

```yml
API Endpoint: http://{poraclejs_ip}:{port}/api/geofence/reload
API Key: X-Poracle-Secret:{config.server.apiSecret}
```
### Supported Features
- Polygons ✅
Expand Down Expand Up @@ -87,17 +98,45 @@ import { GitHubLogo } from '../components/GitHub'
- `koji.url`
- Example: `http://{koji_ip}`

### Project Setup

Use these values if Koji and Dragonite are on the **same** network.

```yml
API endpoint: http://{drago_host_ip}:{drago_port}/reload
API key: Leave empty. Dragonite currently does not support authentication
```

### Supported Features

- Polygons ✅
- MultiPolygons ½ (Works, but is downconverted to a Polygon, may produce unexpected results)
- MultiPolygons ½ (Works, but is down converted to a Polygon, may produce unexpected results)
- Auto quest, Pokemon, and fort route calculations, both in the admin panel and used server side

<GitHubLogo
title="Dragonite"
href="https://github.com/UnownHash/Dragonite-Public"
/>

## Dragonite Admin

- Outbound requests from Dragonite Admin are proxied through Dragonite
- Inbound requests from Kōji can be received by Dragonite Admin to update routes and geofences

### Project Setup

Use these values if Koji and Dragonite are on **different** networks. This will proxy the request through Dragonite Admin to Dragonite utilizing the api_secret value.

```yml
API endpoint: http://{drago_admin_host_ip}:{drago_admin_port}/api/reload
API key: X-Dragonite-Admin-Secret:{your_api_secret_value}
```

<GitHubLogo
title="Dragonite"
href="https://github.com/UnownHash/Dragonite-Public"
/>

## RealDeviceMap

- RealDeviceMap (RDM) is marked as depreciated and support will be removed in the future.
Expand Down

0 comments on commit d3b908d

Please sign in to comment.