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.0

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

A modern, production-ready web framework for TypeScript/Node.js with enterprise features, modular architecture, and integrated DevOps tooling.

🚀 Quick Start

Installation

npm install @foxframework/core

Create a New Project

npx -p @foxframework/core tsfox new my-app
cd my-app
npm install
npm run dev

If developing from source:

git clone https://github.com/lnavarrocarter/fox-framework.git
cd fox-framework
npm install
npm run build   # generates dist/
npx -p @foxframework/core tsfox new demo-app

Basic Usage

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

// Option A: create() + listen() — Express-like style
const app = FoxFactory.create({
  port: 3000,
  env: 'development',
  jsonSpaces: 2,
  staticFolder: 'public',
  requests: [
    {
      path: '/',
      method: RequestMethod.GET,
      handler: (req, res) => res.json({ message: 'Hello Fox!' })
    }
  ]
});

app.listen(3000, () => {
  console.log('Fox Framework running on port 3000');
});

// Option B: createInstance() + FoxFactory.listen() — explicit style
FoxFactory.createInstance({ port: 3000, env: 'development', jsonSpaces: 2, staticFolder: 'public' });
FoxFactory.listen();

Features

🏗️ Core Framework

  • TypeScript-first with full type safety
  • Modular routing with factory patterns
  • Integrated template engine (Fox + Handlebars)
  • Middleware pipeline with async support
  • Error handling with custom error types

🛠️ Developer Experience

  • CLI tools for project generation
  • Hot reload in development
  • Testing utilities with Jest integration
  • TypeScript decorators support

🏢 Enterprise Features

  • Microservices architecture support
  • Circuit breaker patterns
  • Load balancing algorithms
  • Service discovery and registry
  • Health checks and monitoring

🔒 Security

  • Authentication middleware
  • Authorization with role-based access
  • CSRF protection
  • Security headers middleware
  • Rate limiting

📊 Observability

  • Structured logging with multiple transports
  • Metrics collection (Prometheus format)
  • Performance monitoring
  • Health check endpoints
  • Request tracing

🗄️ Data & Caching

  • Database abstraction layer with provider ecosystem (SQL, NoSQL, Redis, AWS)
  • Multi-provider caching (Memory, Redis, File)
  • Response caching middleware
  • Cache invalidation strategies

🚀 DevOps Ready

  • Docker multi-stage builds
  • Docker Compose for local development
  • CI/CD GitHub Actions workflows
  • Kubernetes deployment manifests
  • Monitoring stack (Prometheus + Grafana)

📖 Documentation

Visit our complete documentation for detailed guides and API reference.

Quick Examples

REST API

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

const app = FoxFactory.create({
  port: 3000,
  env: 'development',
  jsonSpaces: 2,
  staticFolder: 'public',
  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, RequestLoggingMiddleware, AuthMiddleware } from '@foxframework/core';
import { RequestMethod } from '@foxframework/core';

const app = FoxFactory.create({
  port: 3000,
  env: 'development',
  jsonSpaces: 2,
  staticFolder: 'public',
  middlewares: [
    RequestLoggingMiddleware.create(),
    AuthMiddleware.jwt({ secret: 'your-jwt-secret' })
  ],
  requests: [
    { path: '/protected', method: RequestMethod.GET, handler: protectedRoute }
  ]
});

app.listen(3000);

🛠️ CLI Commands

# Create new project
npx -p @foxframework/core tsfox new <project-name>

# Generate components
npx -p @foxframework/core tsfox generate controller users
npx -p @foxframework/core tsfox generate service auth
npx -p @foxframework/core tsfox generate middleware validation

# Docker operations
npx -p @foxframework/core tsfox docker init
npx -p @foxframework/core tsfox docker build
npx -p @foxframework/core tsfox deploy --interactive

🧪 Testing

Fox Framework includes comprehensive testing utilities:

import { FoxTestUtils } from '@foxframework/core';

describe('API Tests', () => {
  const { request } = FoxTestUtils.createTestApp(app);
  
  it('should return users', async () => {
    const response = await request.get('/users');
    expect(response.status).toBe(200);
    expect(response.body).toHaveProperty('users');
  });
});

📈 Performance

  • Lightweight: < 50KB gzipped
  • Fast startup: < 100ms cold start
  • High throughput: > 10k req/s
  • Memory efficient: < 50MB baseline
  • Scalable: Horizontal and vertical scaling

🤝 Contributing

We welcome contributions! Please see our Contributing Guide.

Development Setup

git clone https://github.com/lnavarrocarter/fox-framework.git
cd fox-framework
npm install
npm run dev

Running Tests

npm test                    # All tests
npm run test:unit          # Unit tests only  
npm run test:integration   # Integration tests
npm run test:coverage      # With coverage

📦 Ecosystem

Core

  • @foxframework/core — Core framework (routing, middleware, logging, caching, security, validation)

Database Providers

Install only the driver(s) you need — all are peer-dependency based.

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

All providers share the same interfaces (IDbProvider, IRepository, IQueryBuilder, IMongoProvider, IRedisProvider, IDynamoProvider) exported from @foxframework/core.

📄 License

MIT © Luis Navarro Carter

🔗 Links