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

orisonjs

v0.3.5

Published

Full-stack stateful React SSR framework

Readme

What is Orison?

Orison is a Node.js framework for building server-side rendered, dynamic webapps with React. It is heavily inspired by Next.js but has several key features and differences that make it stand out from the crowd.

Installing

It is highly recommended to use yarn add your package manager. Use npm install --global yarn to get Yarn, and run yarn install orisonjs to install Orison.

What does Orison offer me?

Server-Side Only Initial Props

When getting props for a page, the getServerSideProps function is called only on the server and it is ignored by Webpack and not sent to the client. This means that you can have information like SQL passwords, queries, server-side only NPM modules, and other sensitive and client-unavailable information in your page file and it's only compiled for the server.

// src/pages/PageWithData.tsx

import { OrisonPage } from 'orisonjs';

interface PageWithDataProps {
    elements: {
        x: string;
        y: string;
    }[];
}

const PageWithData: OrisonPage<PageWithDataProps> = ({ elements }) => (
    <div>
        {elements.map(elem => (
            <>
                <span>x = {elem.x}</span>
                <span>y = {elem.y}</span>
            </>
        ))}
    </div>
);
PageWithData.getServerSideProps = async req => {
    const sql = await import('../common/sql');
    return {
        elements: await sql.query('SELECT x, y FROM elements')
    };
};
export default PageWithData;

Session State

Each user session on an Orison server is assigned a cookie to keep track of their session, and each session has an object you can specify key-value pairs for that are only available server-side, very similar to ASP.NET.

// src/pages/AuthenticatedPageWithData.tsx

import { OrisonPage } from 'orisonjs';

interface AuthenticatedPageWithDataProps {
    elements: {
        x: string;
        y: string;
    }[];
}

const AuthenticatedPageWithData: OrisonPage<AuthenticatedPageWithDataProps> = ({ elements }) => (
    <div>
        {elements.map(elem => (
            <>
                <span>x = {elem.x}</span>
                <span>y = {elem.y}</span>
            </>
        ))}
    </div>
);
AuthenticatedPageWithData.getServerSideProps = async (req, res) => {
    // req.session field is added by Orison with the data for each user's session
    // values can be get and set from both pages and REST endpoints
    if(!req.session.isAuthenticated) {
        res.redirect('/login'); // if the user isn't logged in, send them to the log in page, skipping the SSR of this page
    } else {
        const sql = await import('../singletons/sql');
        return {
            elements: await sql.query('SELECT x, y FROM elements')
        };
    }
};
export default AuthenticatedPageWithData;

Built on Top of Express

Instead of using the built-in node http module, Orison uses express to utilize its powerful middleware functionality. Orison servers are required to have an entrypoint at src/orison.ts, where you can get direct access to the Express request handler.

// src/orison.ts

import { OrisonServer } from 'orison';

export default async function main(server: OrisonServer) {
    const express = server.getRequestListener();
    express.use(...); // custom middleware function

    await server.configure({
        // function to generate a session state object for each new session
        sessionStateGenerator: req => ({
            isAuthenticated: false
        })
    });
    server.start(3000);
}