Skip to content

A monorepo template for creating an Admin UI with Piral.

License

Notifications You must be signed in to change notification settings

piral-samples/piral-admin-template

Repository files navigation

Piral Logo

piral-admin-template

⚡ A monorepo template for creating an Admin UI with Piral.

The component system of this sample is based on tabler-react.

Provides a great starting point for building modular (Admin) UI interfaces. Different repositories? Monorepo? Hybrid? You decide.

Feel free to play around with the code using StackBlitz.

Open in StackBlitz

You can visit this demo at admin-template.samples.piral.cloud/.

Getting Started

First, use lerna to bootstrap the mono repo. Make sure to have yarn (v1) installed for this.

npx lerna bootstrap

Running the Code

Now you can run all pilets:

yarn watch:all

Alternatively, run only a single pilet (e.g., the pilet-status):

name=status yarn watch:pilet

Or if you wan to, you can also run the app shell in isolation:

yarn watch:portal

Adding a new pilet

Just run

name=foo yarn add:pilet

it will create a new directory packages/pilet-foo, already scaffolded and integrated. Choose a different run than foo for your purposes.

Publishing the pilets

You can publish all pilets using

npx lerna run publish-pilet

This will require two environment variables to be set:

  • FEED_URL pointing to your feed
  • API_KEY the API key to publish pilets to the given feed

Doing it in one sweep:

FEED_URL="https://feed.piral.cloud/api/v1/pilet/admin-sample" API_KEY="..." npx lerna run publish-pilet

License

Piral and this sample code is released using the MIT license. For more information see the license file.