Client
Getting Started

Getting Started

Logging In

login

When presented with this screen you login with the KOJI_SECRET you set in your .env or docker-compose.yml file.

Projects

A "project" in Kōji is how you create custom endpoints for distributing your geofences to the various integrations. Lets quickly walk through the process of setting up a basic project to use with ReactMap.

  1. Navigate to the Admin Panel by clicking the Admin button on the landing page.

  2. Navigate to the Projects panel by clicking Projects in the left hand side drawer.

  3. Click Create to start your new project.

  4. Give your project a name, such as ReactMap.

    💡

    If your project is your scanner, you can set Scanner to true by clicking the toggle switch.

  5. If your project supports a refresh endpoint to make it call Kōji again for updated geofences, you can input the API endpoint here, as well as any headers. For this example, we will ignore these though.

  6. Click Save to create your new project.

  7. Below we will go through different ways you can import your existing fences and assign them to your new project.

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

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

    💡

    Please see Integrations for assistance with a specific project.

Import existing Projects

  1. After logging in, click the Map button on the landing page

  2. Open up the drawer, and go to the Import panel

  3. Click the Import Wizard button

  4. In the JSON section, click Browse and select your desired file, such as the areas.json file from ReactMap (opens in a new tab) or geofence.json from PoracleJS (opens in a new tab)

  5. No matter what format you use, they will be converted into standard GeoJSON features

  6. Click Next

  7. If the features from your file have a name property that isn't called name, you can select which one Kōji should use in step 2

    Import Name Page
  8. You can also select which properties you would like to save to the Kōji database

  9. There are two special actions, "Combine by Name Key" and "Split Multi Polygons"

    • "Combine by Name Key" will combine all features with the same name into one feature (rare)
    • "Split Multi Polygons" will split any MultiPolygons into multiple Polygons, this might be useful if your integration does not support MultiPolygons
  10. Click Next

  11. Now you can choose to assign each feature a mode and a project to be associated with. If you haven't already created a project, you can add one directly from this menu by typing in the name of the new project and clicking Add {project_name}

    Import Mode Page
  12. Click Next

  13. Same as above but for routes

  14. At any point you can check out the current code generated and a preview of your features on a map

    Map Preview
  15. Click Save to Kōji to save all of the selected routes and fences to the respective tables in the Kōji database

    Import Name Page
  16. Repeat for however many projects/files you want to import! The import wizard can import from all sorts of different sources, including Nominatim and shape files.

Dragonite Quick Start

  1. Complete the above steps to initialize Kōji
  2. If you are starting from scratch and have no existing areas
    1. Visit the Kōji Map
    2. Create a fence
    3. Name it and save to Kōji database
  3. Visit the Kōji Map
  4. Load your fence (if it isn't present)
  5. Go to the Calculation tab
  6. Select Bootstrap Mode
    1. Strategy: Radius (for pokemon), S2 (for forts)
    2. Save to Kōji Db: Enabled
    3. Save to Scanner db: Enabled
    4. Skip Rendering: Enabled
  7. Click update
  8. Once complete navigate to the Admin portal of Kōji
  9. Click "Sync" on the geofence. This will create the Area in Dragonite if it doesn't exist.
  10. Click "Sync" on the route. This will push the bootstrap route into Dragonite.
  11. Then I add that new fence to my Dragonite project (and to my consumer (poracle/RM/golbat) project if I don't want to split it up).

In dragonite admin:

  1. Edit the area and set the desired worked count

Back in koji:

  1. Wait a few hours/a day for the bootstrap to update
  2. Load the fence up into Kōji again, run pokemon route (again with save to koji and save to scanner dbs selected) - if I'm doing multiple, I load the fence names into a script (check docs) and call it via api.

Back in dragonite admin:

  1. Go back into Dragonite Admin, update worker count to appropriate amount, enable quests and set quest hours