npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mostajs/ornetadmin

v1.0.2

Published

Administration interface for @mostajs/orm (13 SGBD) and @mostajs/net (11+ protocols) — standalone or embedded in mosta-setup-studio

Readme

MostaOrNetAdmin

Administration interface for @mostajs/orm + @mostajs/net — manage 13 databases, 11+ protocols, and API keys from a single UI.

npm version license


What is OrNetAdmin?

OrNetAdmin is the configuration writer for the @mostajs ecosystem. It writes .env.local and .mosta/apikeys.json files that @mostajs/orm and @mostajs/net read at runtime.

@mostajs/ornetadmin (WRITES config)
    │
    ├─ .env.local                    ← SGBD connections, transport toggles, admin credentials
    ├─ .mosta/apikeys.json           ← API key subscriptions with 3D permissions
    │
    ├─► @mostajs/orm (READS .env.local)     → connects to databases
    └─► @mostajs/net (READS .env.local + apikeys.json) → exposes transports

ornetadmin has ZERO peer dependencies on orm or net.

Features

  • Dual mode — standalone server (npx @mostajs/ornetadmin) or embedded in mosta-setup-studio
  • 13 SGBD connections — configure, test, remove database URIs
  • 11+ transport toggles — enable/disable REST, GraphQL, WebSocket, SSE, etc.
  • API key management — generate, revoke, manage 3D permission matrix (key x SGBD x protocol)
  • Login with JWT — bcrypt authentication, 8h token expiration
  • Import/Export — download/upload configuration as JSON
  • Web UI — inline HTML admin dashboard (no React dependency for standalone mode)

Quick Start

Standalone mode

npx @mostajs/ornetadmin
# Opens http://localhost:4489/

Embedded in your app (Fastify plugin)

import { ornetadminPlugin } from '@mostajs/ornetadmin'
import Fastify from 'fastify'

const app = Fastify()
await app.register(ornetadminPlugin, { prefix: '/admin' })
await app.listen({ port: 3000 })
// Admin UI at http://localhost:3000/admin/

Configuration Files

.env.local (shared contract)

# ── SGBD connections (read by @mostajs/orm) ──
DB_DIALECT=postgres
SGBD_URI=postgresql://user:pass@localhost:5432/mydb

# ── Hibernate-style properties ──
DB_SHOW_SQL=true
DB_FORMAT_SQL=true
DB_HIGHLIGHT_SQL=true
DB_SCHEMA_STRATEGY=update
DB_POOL_SIZE=20

# ── Transport toggles (read by @mostajs/net) ──
MOSTA_NET_REST_ENABLED=true
MOSTA_NET_GRAPHQL_ENABLED=true
MOSTA_NET_WS_ENABLED=true
MOSTA_NET_SSE_ENABLED=true
MOSTA_NET_MCP_ENABLED=true

# ── Admin credentials ──
MOSTA_ADMIN_PASSWORD_HASH=$2b$12$...    # bcrypt hash
MOSTA_ADMIN_JWT_SECRET=your-secret

.mosta/apikeys.json

{
  "subscriptions": [
    {
      "name": "My App",
      "keyHash": "$2b$12$...",
      "mode": "live",
      "status": "active",
      "permissions": {
        "postgres": { "rest": ["read", "crud"], "graphql": ["read"] },
        "mongodb": { "rest": ["read"] }
      }
    }
  ]
}

Admin Pages

| Page | Description | |------|-------------| | Login | bcrypt + JWT authentication | | Dashboard | Summary: configured SGBD, active transports, API keys | | Connections | Manage 13 SGBD URIs — configure, test ping, remove | | Transports | Toggle 11+ protocols — enable/disable, configure ports | | API Keys | CRUD subscriptions — generate/revoke keys, 3D permission matrix | | Import/Export | Download/upload .env.local + apikeys.json as JSON |


Architecture

┌─────────────────────┐
│  @mostajs/ornetadmin │ ← Standalone admin server (port 4489)
│  (WRITES config)     │    or embedded Fastify plugin
└──────┬──────────────┘
       │ writes
       ▼
┌──────────────┐     ┌──────────────────┐
│  .env.local  │     │ .mosta/apikeys   │
└──────┬───────┘     └──────┬───────────┘
       │ reads              │ reads
       ▼                    ▼
┌──────────────┐     ┌──────────────────┐
│ @mostajs/orm │     │  @mostajs/net    │
│ (13 SGBD)    │     │ (11+ protocols)  │
└──────────────┘     └──────────────────┘

Zero dependency — ornetadmin doesn't import orm or net. It only writes configuration files.


CLI Commands

| Command | Description | |---------|-------------| | npx @mostajs/ornetadmin | Start standalone admin server | | npx @mostajs/ornetadmin init | Initialize .env.local with defaults | | npx @mostajs/ornetadmin hash-password <pw> | Generate bcrypt hash for admin password |


Ecosystem

| Package | Role | Verb | |---------|------|------| | @mostajs/orm | Store data | 13 SGBD dialects | | @mostajs/net | Expose data | 11+ protocol transports | | @mostajs/ornetadmin | Manage config | Admin UI + config writer | | @mostajs/setup | Install apps | Setup wizard + seeds | | @mostajs/auth | Secure access | NextAuth integration | | @mostajs/audit | Trace actions | Audit logging | | @mostajs/init | Generate code | Scaffolding CLI | | @mostajs/ui | Display UI | 80+ React components |


License

MIT — © 2025-2026 Dr Hamid MADANI [email protected]

Contributing

Issues and PRs welcome at github.com/apolocine/mosta-ornetadmin.