flagd/playground-app
Michael Beemer 9891df2d0c
chore: bump flagd-core in playground, add metadata example, fix doc links
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2025-01-07 20:52:31 +00:00
..
src chore: bump flagd-core in playground, add metadata example, fix doc links 2025-01-07 20:52:31 +00:00
.eslintrc.cjs docs: add flag definition playground (#1084) 2023-12-19 16:29:47 -05:00
README.md docs: add flag definition playground (#1084) 2023-12-19 16:29:47 -05:00
index.html docs: add flag definition playground (#1084) 2023-12-19 16:29:47 -05:00
package-lock.json chore: bump flagd-core in playground, add metadata example, fix doc links 2025-01-07 20:52:31 +00:00
package.json chore: bump flagd-core in playground, add metadata example, fix doc links 2025-01-07 20:52:31 +00:00
tsconfig.json docs: add flag definition playground (#1084) 2023-12-19 16:29:47 -05:00
tsconfig.node.json docs: add flag definition playground (#1084) 2023-12-19 16:29:47 -05:00
vite.config.ts docs: add flag definition playground (#1084) 2023-12-19 16:29:47 -05:00

README.md

flagd playground

The flagd playground is an application designed to test the behavior of flagd. It allows users to define flags and experiment with various inputs to understand how flagd responds. This tool is particularly useful for developers and testers who are working with flagd in their projects and need a simple and effective way to validate their flag definitions.

Development

Getting Started

To get started with the development of the flagd playground, you'll need to have Node.js installed on your machine.

  1. Install Node.js version 18 or newer.
  2. From the root of the project, run make playground-dev.
  3. Open your browser and navigate to http://localhost:5173/;

[!NOTE] This page is mostly unstyled because it inherits the styles from Mkdocs Material.

Add a new scenario

A new scenario can be added to the playground by following these steps:

  1. Add a new scenario file during the ./src/scenarios directory.
  2. Export a constant that conforms to the Scenario type.
  3. Include the scenario in the scenarios objects at ./src/scenarios/index.ts.

[!NOTE] Make sure to update the docs once you're ready. This does not happen automatically! Please see below for more information.

Adding Playground to the Docs

Adding the playground app to the docs can be done by running the following command from the root of the project:

make make playground-publish

[!NOTE] This will build the app and copy the output to the docs.