Conflake {{ currentPage ? currentPage.title : "" }}

Overview

Conflake is an internal configuration management tool, that will be used by engineers and operations to create, edit and update project configuration, these configuration can be used across apps (same key can be used in multiple apps).

Tip: Conflake is replacing the old Firebase configuration we used to have before.

Production URL: https://common.internal-aui.io/config/projects

Staging URL: https://common-staging.internal-aui.io/config

If you don’t have credentials to login, please contact omara@aui.io or hibas@aui.io

How to use Conflake

Login with your credentials

for a regular user, this is how the Conflake dashboard will look like

Add a new Key

To Add a new configuration (key)

  • Click on Projects

  • Select the folder of Interest, e.g. Product Configurations and Navigate inside the folder

  • Click on “New Config file“ and proceed with the key creation

  • Adding a new key to Production is done from Conflake Staging only through the Sync Button

Few important notes

  • Make sure the key name is relevant to the feature and descriptive, use _ to separate words inside the key name and not spaces

  • Delete Key is prohibited so far in the system, but keys can be moved to other folders, or update its name.

  • Every time a user does an operation on the Conflake (New key, New Folder, update key name, move keys, move folders) a new version is created (this happens in the background, and reverting to the old version is not supported from the UI yet)

How to use Sync

User must have Admin or Moderator Role

  • Navigate to the key you wish to transfer to Production, click on “Sync”

  • Note that the sync button will not only move the key to Production, but will also move/ update the full key path, meaning, if a folder in the key path on staging is missing from production, the sync will also add this folder to production and then add the key inside it

Move Folders

  • Navigate to the folder you wish to transfer and Click on the button with the arrow icon

  • Select the new destination folder from the popup window, click on Select, then click “Confirm” in the confirmation popup

API Technical Info

# Confkale API

The purpose of this API is to handle Cornflake UI operations and allow other engineers to retrieve keys values(Constants) from different applications.

## API Documentation

## ProjectConfig (Projects) values retrieval using GET method via endpoint

```js
const axiosConfigurationsMs = axiosInstance(`${process.env.SERVER_URL}`, {
  'Content-Type': 'application/json',
  [`api-key`]: process.env.API_KEY
}).get();
const apiRes = await axiosConfigurationsMs.get(
  `/api/configurations/project-config-by-key/${key}`
);
```

### Real time ProjectConfig (Projects) values retrieval via pusher

```js
// Enable pusher logging - don't include this in production
Pusher.logToConsole = true;

const pusher = new Pusher(`${process.env.PUSHER_CONFLAKE_KEY}`, {
  cluster: `${process.env.PUSHER_CONFLAKE_CLUSTER}`
});

let jsontext = '';
const channel = pusher.subscribe(`${process.env.CONFLAKE_CHANNEL_NAME}`);

channel.bind(`${YOUR_KEY_NAME}`, function (key) {
  jsontext = JSON.stringify(key?.data);
});
```

{{{ content }}}