neemata

Before working with a Neemata project, check if node_modules/nmtjs exists. If not, install the nmtjs package using the project's package manager (e.g., pnpm add nmtjs ).

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "neemata" with this command: npx skills add neematajs/neemata/neematajs-neemata-neemata

Prerequisites

Before working with a Neemata project, check if node_modules/nmtjs exists. If not, install the nmtjs package using the project's package manager (e.g., pnpm add nmtjs ).

Do not install internal @nmtjs/* packages directly. The nmtjs umbrella package re-exports everything users need. Transport packages (@nmtjs/ws-transport , @nmtjs/http-transport ) are separate dependencies for server-side application definitions only:

pnpm add nmtjs @nmtjs/ws-transport @nmtjs/http-transport

For client-side usage, install:

pnpm add nmtjs @nmtjs/ws-client # or @nmtjs/http-client

Finding Documentation

Search source code in node_modules/nmtjs/ :

  • Public API: grep -r "query" node_modules/nmtjs/src/

  • Core DI: grep -r "query" node_modules/@nmtjs/core/src/

  • Contract types: grep -r "query" node_modules/@nmtjs/contract/src/

  • Type system: grep -r "query" node_modules/@nmtjs/type/src/

  • Protocol: grep -r "query" node_modules/@nmtjs/protocol/src/

Key Concepts

Import Convention

All user-facing code should import from nmtjs :

import { n, t, c, Scope, ErrorCode, ProtocolBlob, ConnectionType } from 'nmtjs'

  • n — Namespace with all builder functions (n.procedure , n.router , n.app , n.server , etc.)

  • t — Type system (wraps zod/mini with encode/decode, e.g., t.string() , t.object() , t.date() )

  • c — Contract definitions (c.procedure() , c.router() , c.event() , c.blob() )

  • Scope — DI scopes: Global , Connection , Call , Transient

Architecture

Neemata uses a layered architecture:

  • Config (neemata.config.ts ) — defines applications and server entry point via defineConfig()

  • Server (n.server() ) — orchestrates workers, proxy, store, metrics

  • Application (n.app() ) — defines transports, router, guards, middleware for one app

  • Router (n.rootRouter() / n.router() ) — groups procedures

  • Procedure (n.procedure() ) — individual RPC endpoint with input/output types and handler

  • Client (StaticClient / RuntimeClient ) — type-safe RPC calls

Dependency Injection Scopes

  • Scope.Global — Singleton, lives for entire app lifetime

  • Scope.Connection — Per WebSocket/HTTP connection, disposed on disconnect

  • Scope.Call — Per RPC call, disposed after handler completes

  • Scope.Transient — New instance on every injection

Containers form a hierarchy: Global → Connection → Call . A scope can only depend on same-or-higher scopes.

Streaming

Two streaming mechanisms:

  • RPC Streams — Procedure returns AsyncIterable , set stream: true . Client consumes via client.stream.*

  • Blob Streams — Binary data via ProtocolBlob.from() (client) and createBlob injectable (server). Use c.blob() in contracts

When Typecheck Fails

  • Check the relevant reference for correct usage:

  • RPC, Injectables,

  • Server Setup, Client

  • Check API Quick Reference for correct signatures

  • Search node_modules/nmtjs/src/ for current type definitions

  • Verify you're importing from nmtjs (not internal @nmtjs/* packages)

Project Structure

A typical Neemata project follows this structure:

project/ neemata.config.ts # defineConfig — app entries + server path src/ index.ts # n.server({...}) — server configuration applications/ main/ index.ts # n.app({...}) — application definition router.ts # n.rootRouter([...]) — route tree procedures/ example.ts # n.procedure({...}) — RPC handlers guards/ middleware/ injectables/

References

  • API Quick Reference — Function signatures and options for n.* , t.* , c.* APIs

  • Type System — t.* encode/decode modes, inference, and Standard Schema (JSON Schema) support

  • RPC — Procedures, routers, streaming, blobs, contracts, guards, middleware, filters, error handling

  • Injectables — DI scopes, injectable builders (value/lazy/factory), built-in n.inject.*

  • Server Setup — n.app() , n.server() , defineConfig() , project structure

  • Client Usage — StaticClient setup, RPC calls, streams, blobs, abort

  • Jobs — Background jobs, steps, job manager, retry/backoff, progress, job router

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated
General

asr

Transcribe audio files to text using local speech recognition. Triggers on: "转录", "transcribe", "语音转文字", "ASR", "识别音频", "把这段音频转成文字".

Archived SourceRecently Updated
General

axure-prototype-generator

Axure 原型代码生成器 - 输出 JavaScript 格式 HTML 代码,支持内联框架直接加载可交互原型

Archived SourceRecently Updated