Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@lego-box/shell

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lego-box/shell

Piral microfrontend shell for Lego Box - provides authentication, PocketBase integration, RBAC, and shared UI components

Source
npmnpm
Version
1.0.18
Version published
Weekly downloads
35
40%
Maintainers
1
Weekly downloads
 
Created
Source

@lego-box/shell

Piral microfrontend shell providing authentication, PocketBase integration, RBAC, and shared UI components for the Lego Box ecosystem.

Installation

npm install @lego-box/shell
# or
pnpm add @lego-box/shell

Usage

Creating a Pilet

pilet new @lego-box/shell --target my-pilet
cd my-pilet
pnpm install
pnpm start

Pilet Development

import type { PiletApi } from '@lego-box/shell/pilet';

export function setup(app: PiletApi) {
  // Access authentication
  const user = app.auth.getUser();
  
  // Access PocketBase
  const records = await app.pocketbase.collection('items').getList();
  
  // Register protected pages
  app.registerProtectedPage('/my-route', MyPage, {
    action: 'read',
    subject: 'items'
  });
  
  // Register sidebar menu
  app.registerSidebarMenu({
    id: 'my-menu',
    label: 'My Feature',
    href: '/my-route',
    action: 'read',
    subject: 'items'
  });
}

Shared Dependencies

The shell provides these dependencies to all pilets:

  • @lego-box/ui-kit - Reusable UI components
  • pocketbase - Backend SDK
  • piral-auth - Authentication plugin
  • react & react-dom - UI framework

API Reference

See full documentation for complete API reference.

License

MIT

Keywords

piral

FAQs

Package last updated on 08 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts