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

graphwork-tools

v2.0.1

Published

Development tools for GraphWork Framework 2.0

Readme

Tools

Development tools for GraphWork Framework 2.0

Overview

The Tools module provides a collection of utilities and development tools that enhance the GraphWork Framework experience. These tools help with project setup, code generation, validation, and other development tasks.

Installation

npm install graphwork-tools

Features

  • Project Setup Utilities: Tools for initializing and configuring GraphWork projects
  • Code Generation Helpers: Utilities for generating boilerplate code
  • Validation Tools: Tools for validating project structure and code quality
  • File System Operations: Enhanced file system operations for development workflows
  • Logging Utilities: Structured logging for development tools
  • Configuration Management: Tools for managing project configuration

Usage

Project Setup

import { ProjectSetup } from 'graphwork-tools';

// Initialize a new project
const setup = new ProjectSetup('./my-project');
await setup.initialize({
  template: 'fullstack',
  technologies: ['react', 'nodejs', 'postgresql'],
  domain: 'ecommerce'
});

File Operations

import { FileUtils } from 'graphwork-tools';

// Create directory structure
await FileUtils.createDirectoryStructure('./my-project', {
  src: {
    controllers: {},
    services: {},
    models: {}
  },
  tests: {},
  docs: {}
});

// Copy template files
await FileUtils.copyTemplateFiles('./templates', './my-project/src');

Validation

import { Validator } from 'graphwork-tools';

const validator = new Validator();

// Validate project structure
const structureIssues = await validator.validateProjectStructure('./my-project');

// Validate code quality
const qualityIssues = await validator.validateCodeQuality('./my-project/src');

Logging

import { Logger } from 'graphwork-tools';

const logger = new Logger('MyTool');

logger.info('Starting tool execution');
logger.warn('This is a warning message');
logger.error('An error occurred', new Error('Something went wrong'));

API

ProjectSetup

Constructor

new ProjectSetup(projectPath: string)

Methods

  • initialize(config: ProjectConfig): Promise<void> - Initialize a new project
  • setupDirectories(): Promise<void> - Set up directory structure
  • copyTemplates(): Promise<void> - Copy template files
  • installDependencies(): Promise<void> - Install project dependencies

FileUtils

Static Methods

  • createDirectoryStructure(basePath: string, structure: DirectoryStructure): Promise<void> - Create directory structure
  • copyTemplateFiles(source: string, destination: string): Promise<void> - Copy template files
  • readContextFile(filePath: string): Promise<any> - Read and parse context file
  • writeContextFile(filePath: string, data: any): Promise<void> - Write context file

Validator

Constructor

new Validator()

Methods

  • validateProjectStructure(path: string): Promise<ValidationIssue[]> - Validate project structure
  • validateCodeQuality(path: string): Promise<ValidationIssue[]> - Validate code quality
  • validateDependencies(path: string): Promise<ValidationIssue[]> - Validate dependencies

Logger

Constructor

new Logger(component: string)

Methods

  • info(message: string, ...args: any[]) - Log info message
  • warn(message: string, ...args: any[]) - Log warning message
  • error(message: string, error?: Error, ...args: any[]) - Log error message
  • debug(message: string, ...args: any[]) - Log debug message

ValidationIssue

interface ValidationIssue {
  type: 'error' | 'warning' | 'info';
  message: string;
  file?: string;
  line?: number;
  column?: number;
  suggestion?: string;
}

Project Configuration

ProjectConfig

interface ProjectConfig {
  template: string;
  technologies: string[];
  domain: string;
  name?: string;
  description?: string;
}

DirectoryStructure

interface DirectoryStructure {
  [key: string]: DirectoryStructure | {};
}

Available Templates

Fullstack

A complete full-stack application template with:

  • Frontend (React/Vue/Angular)
  • Backend (Node.js/Python/Java)
  • Database (PostgreSQL/MySQL/MongoDB)

Backend

Backend-only template with:

  • API framework
  • Database integration
  • Authentication

Frontend

Frontend-only template with:

  • Component library
  • State management
  • Routing

Microservice

Microservice template with:

  • Lightweight framework
  • API gateway integration
  • Container configuration

Contributing

See our Contributing Guide for information on how to contribute to this package.

License

This package is licensed under the MIT License. See the LICENSE file for details.