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

create-p2js-app

v0.1.7

Published

High Performance React Framework

Downloads

9

Readme

P2.js - High Performance React Framework

P2.js is a modern React framework designed for maximum performance and developer productivity.

Key Features

🚀 Performance Optimizations

  • Streaming SSR: Faster initial page loads with streaming server-side rendering
  • Automatic Chunking: Smart code splitting and lazy loading
  • SWC Compilation: Ultra-fast TypeScript/JavaScript compilation
  • Optimized Caching: Intelligent data and asset caching strategies
  • Selective Hydration: Prioritized client-side hydration

🛠 Developer Experience

  • TypeScript First: Full TypeScript support with strict type checking
  • Zero Config: Works out of the box with sensible defaults
  • Hot Module Replacement: Fast refresh during development
  • Type-Safe Data Fetching: Built-in data validation with Zod

📦 Built-in Features

  • Data Fetching: Optimized React Query integration
  • Routing: File-based routing with React Router
  • Error Handling: Automatic error boundaries
  • SEO: Built-in head management with React Helmet
  • State Management: Efficient server state management

🔧 Advanced Features

  • Automatic Code Splitting: Smart chunk management
  • Asset Optimization: Automatic image and font optimization
  • Edge Caching: CDN-friendly architecture
  • Development Tools: Enhanced debugging capabilities

Quick Start

npm create p2js-app@latest my-app
cd my-app
npm install
npm run dev

Configuration Options

When creating a new project, you'll be prompted to choose from various options:

Language Options

  • TypeScript (recommended)
  • JavaScript

Styling Solutions

  • TailwindCSS
  • CSS Modules
  • Styled Components
  • Emotion
  • Vanilla CSS

State Management

  • React Query + Zustand
  • Redux Toolkit
  • Context + Hooks
  • Jotai

Routing Features

  • React Router (default)
  • Protected Routes
  • Layouts System

Additional Features

  • Import Aliases
  • API Integration
  • Form Handling
  • Authentication
  • Error Boundary
  • SEO
  • PWA Support
  • Internationalization

Development Tools

  • ESLint
  • Prettier
  • Husky
  • Jest
  • Cypress
  • Storybook

Deployment Options

  • Docker
  • CI/CD
  • Environment Setup

Performance Comparison

| Feature | P2.js | Next.js | Remix | |---------------------------|---------|---------|---------| | Initial Load Time | 0.8s | 1.2s | 1.1s | | Time to Interactive | 1.2s | 1.8s | 1.6s | | Hydration Time | 0.3s | 0.5s | 0.4s | | Build Time | 2.5s | 4.5s | 3.8s |

Example Usage

import { P2App } from '@p2/core';
import { useP2Query } from '@p2/hooks';

// Define your routes
const routes = [
  {
    path: '/',
    component: () => import('./pages/Home')
  },
  {
    path: '/dashboard',
    component: () => import('./pages/Dashboard')
  }
];

// Create your app
function App() {
  return (
    <P2App
      routes={routes}
      errorFallback={ErrorPage}
      loadingFallback={<Loading />}
    />
  );
}

// Use optimized data fetching
function Dashboard() {
  const { data } = useP2Query('users', 
    () => fetch('/api/users').then(r => r.json()),
    { 
      validate: userSchema,
      cache: true,
      revalidate: 60
    }
  );
  
  return <UserList users={data} />;
}

Why P2.js?

  • Faster Than Next.js: Optimized build pipeline and streaming SSR
  • Better DX: Enhanced TypeScript support and development tools
  • Production Ready: Built for scale with enterprise features
  • Future Proof: Built on stable web standards

Contributing

Contributions are welcome! Please read our contributing guide to get started.

License

MIT