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

stoix

v0.1.7

Published

Stoix - A Node + Express + React framework with Vite, fully written in TypeScript

Readme

Stoix

Stoix is a TypeScript-first framework starter that scaffolds a Node + Express + React app with Vite.

Quick Start

npx stoix create my-app
cd my-app
npm run dev

App URL: http://localhost:3000

CLI

Create a project

npx stoix create <project-name> [options]

Options

  • --pm <manager> - Specify package manager (npm, yarn, pnpm, bun)
  • --no-install - Skip dependency installation
  • --git - Initialize git repository with initial commit
  • --yes, -y - Skip all prompts and use defaults

Interactive prompts

By default, stoix create runs an interactive setup and asks:

  • Package manager (auto-detected default)
  • Install dependencies now?
  • Initialize git?
  • Include Docker/deploy files?

Use --yes to skip prompts and accept defaults.

Examples

# Basic usage
npx stoix create my-app

# Use specific package manager and initialize git
npx stoix create blog-api --pm pnpm --git

# Skip dependency installation
npx stoix create my-project --no-install --yes

Help and version

npx stoix --help
npx stoix --version

Project names must start with a letter and may contain letters, numbers, ., _, and -.

What Stoix Generates

  • Express server with auto-loaded API route modules
  • React 18 client with Vite HMR in development
  • Shared TypeScript setup across server, client, and config
  • Production build pipeline for client and server output

Generated Project Structure

my-app/
├── package.json                  # Dependencies and scripts
├── stoix.config.ts               # Stoix framework configuration
├── tsconfig.json                 # TypeScript config (shared)
├── tsconfig.server.json          # TypeScript config (server)
├── vite.config.ts                # Vite build configuration
├── vite-env.d.ts                 # Vite environment types
├── index.html                    # HTML entry point
├── .env.example                  # Example environment variables
├── server/                       # Express server
│   ├── server.ts                 # Server entry point
│   └── routes/                   # Auto-loaded API routes
│       └── example.ts            # Example API route
├── src/                          # React client source
│   ├── App.tsx                   # Root React component
│   ├── main.tsx                  # Client entry point
│   └── styles.css                # Global styles
└── public/                       # Static assets
    └── favicon.svg               # Favicon

Generated Scripts

| Script | Description | | --- | --- | | npm run dev | Runs the Express server with Vite middleware in development (tsx server/server.ts). | | npm run build | Runs TS checks, builds client assets with Vite, then compiles server output. | | npm start | Starts the production server from compiled files. | | npm run typecheck | Runs TypeScript checks without emit. |

Configuration

Edit stoix.config.ts:

export interface StoixConfig {
  port: number;
  framework: 'react';
  server: {
    apiPrefix: string;
    cors: string | string[] | false;
  };
}

Default values:

  • port: 3000
  • server.apiPrefix: "/api"
  • server.cors: false

API Routes

Route files in server/routes/ are auto-mounted at <apiPrefix>/<path-to-file>.

Named method exports

Export functions named after HTTP methods. Each handles the root path of the file:

// server/routes/users.ts -> GET /api/users
import type { Request, Response } from 'express';

export function GET(_req: Request, res: Response) {
  res.json({ users: [] });
}

export function POST(req: Request, res: Response) {
  res.json({ created: req.body });
}

Default router export

For sub-paths or advanced middleware, export a Router:

// server/routes/auth.ts -> /api/auth/*
import { Router } from 'express';
const router = Router();
router.get('/me', handler);
router.post('/login', handler);
export default router;

Route metadata

Export a route object to attach metadata (available via res.locals.route in middleware):

export const route = {
  auth: true,
  rateLimit: 60,
  tags: ['users'],
};

Path mapping

  • server/routes/users.ts -> /api/users
  • server/routes/auth/me.ts -> /api/auth/me
  • server/routes/auth/index.ts -> /api/auth

Environment Variables

template/.env.example includes:

PORT=3000
NODE_ENV=development

Copy .env.example to .env if you want to override defaults locally. PORT overrides the port in stoix.config.ts.

Development and Production Flow

  • Development: Express runs first, then mounts Vite as middleware for client HMR.
  • Production: Express serves static files from dist/client and handles SPA fallback to index.html.

Deployment

A Dockerfile, and docker-compose.yml are included in every scaffolded project.

# Docker
docker build -t my-app .
docker run -p 3000:3000 my-app

# Docker Compose
docker compose up --build

License

MIT