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

@qnton/miqro

v0.2.3

Published

Minimal, high-performance microservice engine.

Readme

Miqro

A minimal, high-performance microservice engine built on Bun and Hono. Designed to process webhooks and run scheduled cron jobs utilizing file-based workflow configurations with first-class TypeScript support and Zod validation.

Key Features

  • High Performance: Powered by Bun and Hono.
  • Developer Friendly: Built-in CLI for scaffolding and development.
  • Zod Validation: Automatic request validation for your webhooks.
  • Security First: Simple API Key and Bearer Token authentication.
  • Scheduled Jobs: Native support for cron-based workflows.
  • Middleware Support: Easily extend the engine with Hono middleware.
  • Single File Builds: Bundle your entire project into a single executable artifact.

Quick Start

Create a new project automatically in your current directory:

bunx @qnton/miqro init
bun add @qnton/miqro

This creates a miqro.config.ts, a workflows/ directory, and configures your environment.

Start the development server with hot-reloading:

bun run dev

Commands

  • miqro init: Scaffolds a new project.
  • miqro dev: Starts the engine in development mode with hot-reloading.
  • miqro start: Starts the engine for production.
  • miqro build: Compiles your project into a single standalone file at ./dist/index.js.

Configuration

The engine is configured via miqro.config.ts:

import type { MiqroConfig } from '@qnton/miqro';

export default {
  port: 3000,
  workflowsDir: './workflows',
  middleware: [
    async (c, next) => {
      console.log(`[${c.req.method}] ${c.req.url}`);
      await next();
    }
  ]
} satisfies MiqroConfig;

Workflows

Webhook Workflow with Validation

Webhooks respond to POST /{id}. Use Zod to validate your payloads and get full type safety in your execution logic.

import { z } from "zod";
import type { Workflow } from "@qnton/miqro";

export default {
  config: {
    id: 'process-payment',
    name: 'Payment Webhook',
    auth: { type: 'apiKey', key: process.env.API_KEY || 'secret' },
    schema: z.object({
      amount: z.number().positive(),
      currency: z.string().length(3),
      customerEmail: z.string().email(),
    })
  },
  execute: async (payload, context) => {
    // payload is automatically typed based on the schema!
    console.log(`Processing ${payload.amount} ${payload.currency} for ${payload.customerEmail}`);
    
    // access request metadata via context
    console.log(`User Agent: ${context.headers['user-agent']}`);
  }
} satisfies Workflow;

Scheduled Cron Workflow

If a workflow config provides a schedule property (a valid Cron string), it will be executed automatically.

import type { Workflow } from '@qnton/miqro';

export default {
  config: {
    id: 'daily-cleanup',
    name: 'Database Cleanup',
    auth: { type: 'none' }, 
    schedule: '0 0 * * *' // Runs every night at midnight
  },
  execute: async (payload, context) => {
    console.log(`Running scheduled cleanup for ${context.name}...`);
  }
} satisfies Workflow;

Execution Context

The execute function receives a MiqroContext object providing access to:

  • workflowId: The ID of the current workflow.
  • name: The display name of the workflow.
  • params: Route parameters.
  • query: URL query parameters.
  • headers: HTTP Request headers.