Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions example/hello-world/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Hello World Plugin Example

A simple KubeStellar UI plugin with WASM backend and React frontend.

## Prerequisites

- **TinyGo** (v0.30.0+) - `brew install tinygo` (macOS) or [download](https://tinygo.org/getting-started/install/)
- **Node.js** (v18+) - For frontend build
- **Go** (v1.21+) - For backend development

## Build & Package

```bash
# 1. Build frontend
cd frontend
npm install
npm run build

# 2. Build WASM backend
cd ..
make build

# 3. Package everything
make package
```

## Installation

1. Start KubeStellar UI locally
2. Go to **Plugin Manager** tab
3. Click **"Install from Local Path"**
4. Select `plugin.tar.gz`
5. Click **Install**

## API Endpoints

- `POST /hello` - Returns personalized greeting
- `GET /status` - Returns plugin health status

## Project Structure

```
hello-world/
├── main.go # WASM backend
├── plugin.yml # Plugin manifest
├── Makefile # Build automation
├── hello-world.wasm # Compiled WASM
├── plugin.tar.gz # Final package
└── frontend/ # React frontend
├── src/App.jsx # Main component
└── dist/ # Built assets
```

## Development

```bash
# Frontend development
cd frontend && npm run dev

# Rebuild backend
make build

# Package for testing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package is there for packaging frontend build and backend into one compressed file. It is used for installation of plugin via kubestellar ui. It is not only for used for testing.
@antedotee

make package
```