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

@foxframework/core

v1.4.5

Published

A modern, production-ready web framework for TypeScript/Node.js with modular routing, integrated template engine, CLI tools, and enterprise features

Readme

🦊 Fox Framework

NPM Version License: MIT Build Status TypeScript

Fox Framework is a TypeScript-first, production-ready web framework for Node.js that combines classic backend patterns (routing, middleware, caching, security) with AI-native capabilities: LLM agents, tool libraries, SSE streaming, and OpenTelemetry tracing — all in one package.

Node.js ≥ 18 · TypeScript 5.x · Express under the hood · Modular by design

🚀 Quick Start

npm install @foxframework/core

Scaffold a new project

npx @foxframework/cli new my-app
cd my-app
npm install
npm run dev

Minimal server

import { FoxFactory, RequestMethod } from '@foxframework/core';

const app = FoxFactory.create({
  port: 3000,
  env: 'development',
  requests: [
    {
      path: '/',
      method: RequestMethod.GET,
      handler: (_req, res) => res.json({ message: 'Hello Fox!' })
    }
  ]
});

app.listen(3000, () => console.log('Ready on http://localhost:3000'));

✨ Features

🧠 AI Agents (v1.4+)

  • ReAct agent loop with tool-use, memory, and step iteration
  • 6 built-in tools: HTTP, Filesystem, Calculator, JSONPath, SQL Query, Vector Search
  • SSE streaming — server-sent events for real-time agent output (text/event-stream)
  • OpenTelemetry tracing — spans per agent run and per tool call, with @foxframework/otel-agents bridge
  • Model provider packages: OpenAI, Anthropic, Ollama (bring your own API key)

🏗️ Core Framework

  • TypeScript-first — full type safety, auto-completion, and .d.ts declarations
  • Factory-pattern routing — declarative route definitions with FoxFactory.create()
  • Template engine — Handlebars integration with layout support
  • Middleware pipeline — async middleware with built-in logging, auth, CSRF, rate limiting

🔒 Security

  • JWT, Basic Auth, API Key, and session-based authentication
  • Role-based authorization (RBAC)
  • CSRF protection, security headers, and rate limiting

📊 Observability

  • Structured logging with console, file, and HTTP transports
  • Prometheus-format metrics collection
  • Health check endpoints and request tracing

🗄️ Data & Caching

  • Database abstraction layer with 8 providers (Postgres, MySQL, SQLite, Mongo, Redis, DynamoDB, RDS, DocumentDB)
  • Multi-provider caching (Memory, Redis, File) with eviction policies

🚀 DevOps

  • Docker multi-stage builds and Docker Compose
  • GitHub Actions CI/CD workflows
  • Kubernetes deployment manifests

📖 Usage Examples

REST API

import { FoxFactory, RequestMethod } from '@foxframework/core';

const app = FoxFactory.create({
  port: 3000,
  env: 'development',
  requests: [
    { path: '/users',     method: RequestMethod.GET,    handler: getAllUsers },
    { path: '/users',     method: RequestMethod.POST,   handler: createUser },
    { path: '/users/:id', method: RequestMethod.GET,    handler: getUser },
    { path: '/users/:id', method: RequestMethod.PUT,    handler: updateUser },
    { path: '/users/:id', method: RequestMethod.DELETE, handler: deleteUser }
  ]
});

app.listen(3000);

With Middleware

import { FoxFactory, RequestMethod, RequestLoggingMiddleware, AuthMiddleware } from '@foxframework/core';

const app = FoxFactory.create({
  port: 3000,
  env: 'development',
  middlewares: [
    RequestLoggingMiddleware.create(),
    AuthMiddleware.jwt({ secret: process.env.JWT_SECRET || 'dev-secret' })
  ],
  requests: [
    { path: '/protected', method: RequestMethod.GET, handler: protectedRoute }
  ]
});

app.listen(3000);

🧠 AI Agents

import { FoxFactory } from '@foxframework/core';
// Use any model provider package
// import { OpenAiProvider } from '@foxframework/model-openai';

const app = FoxFactory.create({
  port: 3000,
  agents: {
    default: {
      provider: /* your LLM provider instance */,
      tools: [/* HttpTool, FilesystemTool, CalculatorTool, ... */],
      memory: { type: 'buffer', maxTokens: 4096 }
    }
  }
});

app.listen(3000);

🛠️ CLI

The CLI has been extracted to its own package @foxframework/cli:

# Scaffold a project
npx @foxframework/cli new <project-name>

# Generate components
npx @foxframework/cli generate controller users
npx @foxframework/cli generate service auth
npx @foxframework/cli generate middleware validation

🧪 Testing

Fox Framework works with any test runner. Use supertest for HTTP-level integration tests:

import request from 'supertest';
import { FoxFactory, RequestMethod } from '@foxframework/core';

const app = FoxFactory.create({
  port: 0,
  env: 'test',
  requests: [
    { path: '/health', method: RequestMethod.GET, handler: (_, res) => res.json({ ok: true }) }
  ]
});

const server = app.listen(0);

describe('API', () => {
  it('returns health', async () => {
    const res = await request(server).get('/health');
    expect(res.status).toBe(200);
    expect(res.body).toEqual({ ok: true });
  });
});

📦 Ecosystem

Core

| Package | Description | |---|---| | @foxframework/core | Framework core: routing, middleware, logging, caching, security, agents | | @foxframework/cli | Project scaffolding and code generation |

AI & Agents

| Package | Description | |---|---| | @foxframework/model-openai | OpenAI / Azure OpenAI provider | | @foxframework/model-anthropic | Anthropic Claude provider | | @foxframework/model-ollama | Ollama local model provider | | @foxframework/otel-agents | OpenTelemetry tracing bridge for agents |

Vector Stores

| Package | Description | |---|---| | @foxframework/vector-pinecone | Pinecone vector DB provider | | @foxframework/vector-weaviate | Weaviate vector DB provider | | @foxframework/vector-chroma | ChromaDB vector store provider |

Database Providers

| Package | Database | Driver | |---|---|---| | @foxframework/db-postgres | PostgreSQL | pg | | @foxframework/db-mysql | MySQL / MariaDB | mysql2 | | @foxframework/db-sqlite | SQLite | better-sqlite3 | | @foxframework/db-mongo | MongoDB | mongodb | | @foxframework/db-redis | Redis | ioredis | | @foxframework/db-dynamodb | AWS DynamoDB | @aws-sdk/client-dynamodb | | @foxframework/db-rds | AWS RDS / Aurora | pg | | @foxframework/db-documentdb | AWS DocumentDB | mongodb |

Auth

| Package | Description | |---|---| | @foxframework/auth-jwt | JSON Web Token authentication | | @foxframework/auth-oauth | OAuth 2.0 / OpenID Connect | | @foxframework/auth-2fa | Two-factor authentication (TOTP) | | @foxframework/auth-firebase | Firebase Authentication | | @foxframework/auth-cognito | AWS Cognito | | @foxframework/auth-ldap | LDAP / Active Directory |

Serverless

| Package | Description | |---|---| | @foxframework/serverless | AWS Lambda / API Gateway adapter |

All providers implement shared interfaces (IDbProvider, IRepository, IVectorSearchProvider, etc.) exported from @foxframework/core.

🤝 Contributing

See CONTRIBUTING.md.

git clone https://github.com/lnavarrocarter/fox-framework.git
cd fox-framework
npm install
npm run dev
npm test               # All tests
npm run test:unit      # Unit tests
npm run test:integration  # Integration tests
npm run test:coverage  # With coverage

📄 License

MIT © Luis Navarro Carter

🔗 Links