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

@hgraph.io/nextjs-template

v0.1.1

Published

Next.js 16 production-ready template with Hedera integration, TypeScript

Readme

@hgraph.io/nextjs-template

npm version License: MIT Next.js React TypeScript

A production-ready Next.js 16 template with built-in Hedera blockchain integration, TypeScript support, and modern web development best practices.

Features

  • Next.js 16 - Latest version with App Router, Server Components, and React 19
  • Hedera Integration - Pre-configured @hgraph.io/sdk for blockchain interactions
  • Modern Stack - React 19, Ethers.js 5, and optimized build configuration

📦 Installation

Using npx (Recommended)

Create a new project with a single command:

npx @hgraph.io/nextjs-template my-app

This will create a new directory with all the necessary files and install dependencies automatically.

Using git clone

git clone https://github.com/hgraph-io/nextjs-template.git my-app
cd my-app
npm install

Using degit

Clone without git history:

npx degit hgraph-io/nextjs-template my-app
cd my-app
npm install

Quick Start

  1. Set up environment variables

    Create a .env.local file in the root directory:

    NEXT_PUBLIC_HGRAPH_API_KEY=your_api_key_here
  2. Run the development server

    npm run dev
  3. Open your browser

    Navigate to http://localhost:3000 to see your application.

  4. Explore the test suite

    Visit http://localhost:3000/test-suite to see Hedera integration examples.

Usage

Basic Hedera Client Setup

import Client, { Network, Environment } from '@hgraph.io/sdk'

const client = new Client({
  network: Network.HederaMainnet,
  environment: Environment.Production,
  headers: {
    'x-api-key': process.env.NEXT_PUBLIC_HGRAPH_API_KEY || ''
  }
})

Querying Transactions

const result = await client.query(`
  query LatestTransaction {
    transaction(limit: 1, order_by: {consensus_timestamp: desc}) {
      consensus_timestamp
      transaction_hash
      charged_tx_fee
    }
  }
`)

Querying Account Information

const result = await client.query(`
  query GetAccount {
    entity(where: {id: {_eq: 98}}, limit: 1) {
      id
      balance
      created_timestamp
      memo
    }
  }
`)

Working with Tokens and NFTs

const tokens = await client.query(`
  query GetTokens {
    token(limit: 5, order_by: {created_timestamp: desc}) {
      token_id
      name
      symbol
      decimals
      initial_supply
    }
  }
`)

Project Structure

nextjs-template/
├── src/
│   └── app/
│       ├── globals.css        # Global styles
│       ├── layout.tsx         # Root layout
│       ├── page.tsx           # Home page
│       └── test-suite/        # Hedera API test examples
│           └── page.tsx
├── public/                    # Static assets
├── .eslintrc.json            # ESLint configuration
├── next.config.js            # Next.js configuration
├── tsconfig.json             # TypeScript configuration
└── package.json              # Project dependencies

Available Scripts

npm run dev      # Start development server
npm run build    # Build for production
npm start        # Start production server
npm run lint     # Run ESLint

Configuration

Next.js Config

The template includes optimized Next.js configuration in next.config.js. Customize as needed for your project.

TypeScript Config

TypeScript is pre-configured with strict mode and path aliases. Modify tsconfig.json to adjust settings.

Environment Variables

Required environment variables:

  • NEXT_PUBLIC_HGRAPH_API_KEY - Your Hgraph API key for Hedera integration

API Reference

Hedera SDK

This template uses @hgraph.io/sdk for Hedera blockchain integration. The SDK provides:

  • Transaction queries
  • Account information
  • Token and NFT data
  • Smart contract interactions
  • Network state queries

For complete API documentation, visit the Hgraph SDK documentation.

Deployment

Vercel (Recommended)

Deploy with Vercel

  1. Push your code to GitHub
  2. Import your repository in Vercel
  3. Add your environment variables
  4. Deploy!

Links

Support