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

@hugomrdias/foxer

v0.1.9

Published

Foxer is a all-in-one application server for Filecoin.

Readme

foxer

foxer is the core package for building a Filecoin indexing service with a typed config, a Hono API, and a built-in development runtime.

What it includes

  • End-to-end type safety & autocomplete with no codegen
  • Contract events indexing
  • Hono middleware with support for SQL over HTTP and Live queries
  • Database schema and relations powered by Drizzle
  • Local development server and database with PGlite
  • A foxer CLI for project scaffolding and local development

Install

npm install @hugomrdias/foxer hono viem

Package entrypoints

  • Package: @hugomrdias/foxer
  • Subpath exports: @hugomrdias/foxer/api, @hugomrdias/foxer/schema
  • CLI binary: foxer

Quick start

Scaffold a new project

Use the CLI to create a new workspace with starter app templates:

npx @hugomrdias/foxer create my-foxer-app

You can also choose the template explicitly:

npx @hugomrdias/foxer create my-foxer-app --template app

Create a config

Create a foxer.config.ts file in your project root:

import { createConfig } from '@hugomrdias/foxer'
import { http } from 'viem'

export const config = createConfig({
  client: {
    transport: http(process.env.RPC_URL),
    realtimeTransport: http(process.env.RPC_LIVE_URL),
    chain: /* your viem chain */,
  },
  contracts: {
    // contract definitions keyed by name
  },
  hooks: ({ registry }) => {
    // register event handlers
  },
  hono: ({ db, logger }) => {
    // return your Hono app
  },
  schema: {},
})

createConfig() accepts a few optional runtime settings in addition to the required client, contracts, hooks, hono, and schema fields:

  • batchSize for backfill block batch size
  • finality for chain finality
  • drizzleFolder for migration output location
  • database for choosing postgres or pglite
  • relations for Drizzle relations

Run locally

The dev command loads foxer.config.ts, runs migrations, starts the API server, and boots the indexer.

foxer dev

Useful flags:

foxer dev --port 4200
foxer dev --root .
foxer dev --config ./foxer.config.ts

The dev server also looks for .env.local in the project root.

Example

import { createConfig } from '@hugomrdias/foxer'
import { http } from 'viem'

export const config = createConfig({
  batchSize: 500,
  client: {
    transport: http(process.env.RPC_URL),
    realtimeTransport: http(process.env.RPC_LIVE_URL),
    chain: /* calibration, mainnet, etc */,
  },
  contracts: {
    myContract: {
      address: '0x...',
      abi: [],
      events: ['Transfer'],
      startBlock: 0n,
    },
  },
  hooks: ({ registry }) => {
    // registry.on(...)
  },
  hono: ({ db, logger }) => {
    // build and return your Hono app
  },
  schema: {},
})

Related packages

  • @hugomrdias/foxer-client for consuming the SQL/API layer from clients
  • @hugomrdias/foxer-react for React integration helpers