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

routeflow-api

v1.0.24

Published

RouteFlow — query-aware realtime REST API framework with smart delta push and live include

Downloads

3,290

Readme

routeflow-api

npm version npm downloads CI

RouteFlow — query-aware realtime REST API framework with smart delta push and live include

REST처럼 쓰는데, 쿼리와 관계까지 이해해서 바뀐 것만 실시간으로 푸시됩니다.

  • Query-aware live subscriptions
  • Smart delta push
  • Live include responses

Install

npm install routeflow-api

For PostgreSQL:

npm install routeflow-api pg

Project health

Node.js compatibility

  • Core server/client features work on current Node.js LTS lines.
  • SQLite support via routeflow-api/sqlite requires Node.js 22.13+.
  • As of 2026-04-17, the latest LTS is Node.js 24.15.0 (LTS), which is the recommended runtime for SQLite usage.
  • The SQLite entry now works in both ESM imports and CommonJS require().

Usage

Why it feels different

app.flow('/rooms/:roomId/messages', messages, {
  push: 'smart',
  queryFilter: (ctx) => ({ roomId: Number(ctx.params['roomId']) }),
  query: 'auto',
  relations: {
    author: { store: users, foreignKey: 'authorId' },
  },
  liveInclude: true,
})

이 설정 하나로:

  • room-scoped live fan-out
  • 안전한 경우 delta, 아니면 snapshot fallback
  • ?include=author 응답의 relation 변경 재계산

Server

import 'reflect-metadata'
import { createApp, MemoryAdapter, Route, Reactive } from 'routeflow-api'
import type { Context } from 'routeflow-api'

const adapter = new MemoryAdapter()
const items = [{ id: 1, name: 'Apple' }]

class ItemController {
  @Route('GET', '/items')
  async listItems(_ctx: Context) {
    return items
  }

  @Reactive({ watch: 'items' })
  @Route('GET', '/items/live')
  async listLiveItems(_ctx: Context) {
    return items
  }
}

const app = createApp({ adapter, port: 3000 })
app.register(ItemController)
await app.listen()

Client

import { createClient } from 'routeflow-api/client'

const client = createClient('http://localhost:3000')

const snapshot = await client.get('/items')

const unsubscribe = client.subscribe('/items/live', (items) => {
  console.log('live update', items)
})

Operational defaults

  • GET /_health is auto-registered for liveness probes.
  • Every HTTP request gets an X-Request-ID, exposed in handlers as ctx.requestId.
  • SIGTERM and SIGINT trigger graceful shutdown with a 10-second drain window.

v1.0.22 highlights

  • Reactive fan-out now routes by matching endpoint/path groups instead of scanning every subscriber.
  • SQLite RouteStore keeps a 64-entry per-table LRU statement cache for repeated CRUD queries.
  • Health checks, request tracing, and graceful shutdown are built in by default.

Database Adapters

// PostgreSQL
import { PostgresAdapter } from 'routeflow-api/adapters/postgres'

// MongoDB
import { MongoDbAdapter } from 'routeflow-api/adapters/mongodb'

// MySQL
import { MySqlAdapter } from 'routeflow-api/adapters/mysql'

// Redis
import { RedisAdapter } from 'routeflow-api/adapters/redis'

// DynamoDB
import { DynamoDbAdapter } from 'routeflow-api/adapters/dynamodb'

// Elasticsearch
import { ElasticsearchAdapter } from 'routeflow-api/adapters/elasticsearch'

// OpenSearch
import { OpenSearchAdapter } from 'routeflow-api/adapters/opensearch'

// Snowflake
import { SnowflakeAdapter } from 'routeflow-api/adapters/snowflake'

// Cassandra
import { CassandraAdapter } from 'routeflow-api/adapters/cassandra'

SQLite

import { RouteStore } from 'routeflow-api/sqlite'

const db = new RouteStore('./data/app.db')
const { RouteStore } = require('routeflow-api/sqlite')

License

Apache 2.0