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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@itrocks/home

v0.2.3

Published

Default responsive it.rocks app container with navigation, user session, breadcrumb and notifications

Readme

npm version npm downloads GitHub issues discord

home

Default responsive it.rocks app container with navigation, user session, breadcrumb and notifications.

This documentation was written by an artificial intelligence and may contain errors or approximations. It has not yet been fully reviewed by a human. If anything seems unclear or incomplete, please feel free to contact the author of this package.

Installation

npm i @itrocks/home

Usage

@itrocks/home provides a default "home" action for your it.rocks application: a responsive layout that renders the main application container, navigation, user session area, breadcrumb and notifications.

In most projects you do not instantiate Output yourself. Instead, it is automatically discovered and wired by the @itrocks/framework / routing stack. The only thing you usually have to do is include the module in your application build and, optionally, provide an output.html template.

Minimal example with the framework

// index.ts
import { bootstrap } from '@itrocks/framework'

// Importing '@itrocks/home' is enough for the `Output` action to be
// registered on the root route `/`.
import '@itrocks/home'

bootstrap()

When a user hits the / route, the Output action from @itrocks/home is executed and returns an HTML page based on the output.html template bundled with the module.

If you need to customise the layout, you can copy the default output.html from the GitHub repository and adapt it in your own project (keeping the same structure so that the action can still render navigation, breadcrumb and notifications correctly).

API

The public API of @itrocks/home is intentionally small. It exposes a single Output action class.

class Output extends Action

Output is an @itrocks/action action decorated as the root route of your application.

From the generated JavaScript you can see that it is decorated with:

  • @Need(NOTHING) – declares that the action does not require any particular domain object or dependency.
  • @Route('/') – binds the action to the root path /.

Methods

html(request: Request): Promise<HtmlResponse>

Builds the HTML response for the home page.

import { Output } from '@itrocks/home/cjs/output.js'
import type { Request } from '@itrocks/action-request'

const output = new Output()

async function home (request: Request) {
	const response = await output.html(request)
	// response is an HtmlResponse from @itrocks/core-responses
	return response
}

Internally, html delegates to htmlTemplateResponse from the Action base class with the bundled output.html template, which handles:

  • injecting the main container markup,
  • inserting the navigation and breadcrumb built from your @itrocks/route configuration,
  • rendering user session information and notifications.

There is no JSON variant for this action: it is meant to serve the main HTML shell of your application.

Typical use cases

  • Provide a ready‑to‑use default home page for a fresh it.rocks application.
  • Quickly bootstrap a back‑office or admin interface with a consistent layout (navigation, breadcrumb, notifications) without writing the container HTML yourself.
  • Share the same home layout across multiple projects by reusing the @itrocks/home module and, if needed, slightly overriding the template.