docs_skill

This skill guides you to use the AIRIOT client for API, auth, forms, models, pages, and real-time data integration with TypeScript.
  • TypeScript

4

GitHub Stars

15

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill sshwsfc/airiot-client --skill docs

  • api.md4.9 KB
  • auth.md4.5 KB
  • CHANGELOG.md4.2 KB
  • DOCS_SUMMARY.md7.7 KB
  • examples.md11.9 KB
  • form.md19.7 KB
  • getting-started.md8.2 KB
  • hooks.md3.5 KB
  • index.md3.6 KB
  • model.md20.9 KB
  • page-hooks.md17.4 KB
  • README.md3.5 KB
  • SKILL.md22.1 KB
  • subscribe.md11.7 KB
  • vite.md2.5 KB

Overview

This skill is a complete development guide for the AIRIOT client built with React + TypeScript, shadcn/ui and Vite. It explains project initialization, directory and coding standards, and the full client library surface for API, auth, forms, state models, page hooks, real-time subscriptions and global configuration. The guide focuses on practical patterns and ready-to-use hooks/components to accelerate building AIRIOT-enabled frontends.

How this skill works

The guide inspects and documents the @airiot/client library to show how to create typed API clients, perform CRUD and paginated queries, and wire authentication flows with useLogin/useUser hooks. It covers JSON Schema driven forms (SchemaForm, FieldArray), Jotai-based models and TableModel for shared state, page-scoped hooks for variables and data sources, and real-time subscriptions via Subscribe, useDataTag and useTableData. It also shows how to set global behavior with setConfig and useMessage.

When to use it

  • Start a new AIRIOT frontend using Vite and shadcn/ui and need a production-ready guide.
  • Implement typed REST calls, pagination and custom conversions for AIRIOT resources.
  • Add user authentication, session persistence and registration flows in a React app.
  • Build dynamic admin pages driven by JSON Schema forms and array fields.
  • Manage shared UI state and dynamic table schemas using Jotai-based models.
  • Subscribe to real-time device or telemetry updates using data tags and table subscriptions.

Best practices

  • Follow the prescribed src directory layout: pages, blocks, components, components/ui.
  • Use TypeScript and functional components; define Props via interfaces or types.
  • Create API instances with createAPI and use convertItem to normalize server data.
  • Encapsulate business logic in Model/TableModel and expose actions via hooks.
  • Register custom form fields with setFormFields instead of mutating form internals.
  • Wrap the app with Subscribe provider for consistent real-time behavior and use manual subscribeTags only when needed.

Example use cases

  • Admin user management page: createAPI for core/user, SchemaForm for create/update, useModelList for listing.
  • Device dashboard: real-time temperature display using useDataTag and Subscribe, with fallback offline state handling.
  • Dynamic data table: TableModel fetches schema and renders DataGrid, with server-driven columns and CRUD hooks.
  • Settings page: usePageVar and useSetPageVar for per-page preferences and useDatasourceValue for shared datasets.
  • Onboarding flow: useLogin and useUserReg for authentication, then load user profile with useUser.

FAQ

Run npx @airiot/mcp-server and configure AIRIOT_BASE_URL and AIRIOT_PROJECT_ID; provide either AIRIOT_TOKEN or username/password in environment variables.

When should I use TableModel vs Model?

Use TableModel for dynamic table pages that fetch schema from the server and need built-in table operations; use Model for smaller domain models or custom state logic.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational