Skip to content

A TypeScript-first NetSuite API client with built-in OAuth 1.0a authentication, automatic retries, performance monitoring, and excellent developer experience. Lightweight and using only 3 dependencies.

Notifications You must be signed in to change notification settings

HeavenlyEntity/neatsuite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NeatSuite - NetSuite Development Tools

Modern software announcement banner for 'neatsuite' HTTP library, featuring a dark gradient background, bold modern font, code snippets, subtle neon developer accents, and a Ko-Fi coffee cup icon_

NPM Downloads NPM Downloads NPM Version NPM Version

A comprehensive TypeScript-first monorepo of tools, utilities, and React components for NetSuite development. Built with performance, developer experience, and type safety in mind.

πŸš€ What's Inside?

NeatSuite provides a complete toolkit for NetSuite integration and development:

Core Packages

  • @neatsuite/http - TypeScript-first NetSuite API client with OAuth 1.0a authentication, automatic retries, and performance monitoring
  • @neatsuite/http-umd - UMD/browser bundle of the HTTP client for client-side applications
  • @neatsuite/core - React components and NetSuite-specific UI elements
  • @neatsuite/utils - Shared React utilities and hooks

Developer Tools

  • @neatsuite/tsconfig - Shared TypeScript configurations for consistent builds
  • @neatsuite/eslint-config - ESLint presets optimized for NetSuite development

Documentation & Examples

  • docs - Next.js-powered documentation site with examples and API references

πŸ“¦ Quick Start

Installation

Choose the package that fits your needs:

# For Node.js/server-side NetSuite API integration
npm install @neatsuite/http

# For browser/client-side usage
npm install @neatsuite/http-umd

Basic Usage

import { NetSuiteClient } from '@neatsuite/http';

// Initialize the NetSuite client
const client = new NetSuiteClient({
  oauth: {
    consumerKey: process.env.NETSUITE_CONSUMER_KEY!,
    consumerSecret: process.env.NETSUITE_CONSUMER_SECRET!,
    tokenKey: process.env.NETSUITE_TOKEN_KEY!,
    tokenSecret: process.env.NETSUITE_TOKEN_SECRET!,
    realm: process.env.NETSUITE_REALM!
  },
  accountId: process.env.NETSUITE_ACCOUNT_ID!
});

// Make a RESTlet call
const response = await client.restlet({
  script: '123',
  deploy: '1',
  params: { action: 'getCustomer', id: '456' }
});

πŸ—οΈ Development Setup

Prerequisites

  • Node.js: Version 20 or higher
  • Package Manager: npm (v10.9.2 recommended)
  • Git: For version control and contributions

Clone and Install

# Clone the repository
git clone https://github.com/neatsuite/netsuite-http.git
cd neatsuite

# Install dependencies
npm install

# Build all packages
npm run build

Available Scripts

  • npm run build - Build all packages and documentation
  • npm run dev - Start development mode with hot reloading
  • npm run lint - Lint all packages using ESLint
  • npm run test - Run tests across all packages
  • npm run clean - Clean up all node_modules and dist folders
  • npm run format - Format code using Prettier

Package-Specific Scripts

# Build specific packages
npm run build:netsuite          # Build @neatsuite/http
npm run build:netsuite-umd      # Build @neatsuite/http-umd
npm run build:all-packages      # Build both HTTP packages

# Publishing (for maintainers)
npm run publish:all-packages    # Publish all packages
npm run changeset              # Generate a changeset
npm run version-packages       # Version packages using changesets

πŸ”§ Architecture

This project uses:

Monorepo Structure

neatsuite/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ netsuite/           # @neatsuite/http - Main API client
β”‚   β”œβ”€β”€ netsuite-umd/       # @neatsuite/http-umd - Browser bundle
β”‚   β”œβ”€β”€ neatsuite-core/     # @neatsuite/core - React components
β”‚   β”œβ”€β”€ neatsuite-utils/    # @neatsuite/utils - Shared utilities
β”‚   β”œβ”€β”€ neatsuite-tsconfig/ # @neatsuite/tsconfig - TS configs
β”‚   └── eslint-config/      # @neatsuite/eslint-config - ESLint presets
β”œβ”€β”€ apps/
β”‚   └── docs/              # Documentation site
└── scripts/               # Build and publish automation

🀝 Contributing

We welcome contributions from the community! Please read our contribution guidelines below.

Ways to Contribute

  • πŸ› Report Bugs: Open an issue with detailed reproduction steps
  • πŸ’‘ Feature Requests: Suggest new features or improvements
  • πŸ“– Documentation: Improve docs, examples, or code comments
  • πŸ”§ Code Contributions: Fix bugs or implement new features

Getting Started

  1. Fork the repository on GitHub
  2. Clone your fork locally:
    git clone https://github.com/your-username/neatsuite.git
    cd neatsuite
  3. Create a feature branch:
    git checkout -b feature/your-feature-name
  4. Install dependencies:
    npm install
  5. Make your changes and ensure they work:
    npm run build
    npm run test
    npm run lint

Contribution Guidelines

  • Code Style: Follow existing code patterns and run npm run format before committing
  • Testing: Add tests for new features and ensure existing tests pass
  • Documentation: Update relevant documentation for any changes
  • Commit Messages: Use clear, descriptive commit messages
  • Pull Requests: Include a detailed description of changes and link any related issues

Development Workflow

  1. Make Changes: Work on your feature or bugfix
  2. Test Locally:
    npm run build    # Ensure builds work
    npm run test     # Run tests
    npm run lint     # Check code quality
  3. Create Changeset (for package changes):
    npm run changeset
  4. Commit and Push:
    git add .
    git commit -m "feat: add new feature"
    git push origin feature/your-feature-name
  5. Open Pull Request: Create a PR with detailed description

Issue Reporting

When reporting issues, please include:

  • Clear Description: What happened vs. what you expected
  • Reproduction Steps: Minimal code example to reproduce the issue
  • Environment: Node.js version, package versions, OS
  • Error Messages: Full error logs if applicable

πŸ“‹ Project Roadmap

Current Focus

  • Enhanced TypeScript support across all packages
  • Performance optimizations for high-volume API usage
  • Additional React components for common NetSuite patterns
  • Improved error handling and debugging tools

Future Plans

  • SuiteQL support for NetSuite SuiteTalk
  • Visual form builders for NetSuite records
  • Real-time data synchronization utilities
  • Enhanced testing and mocking tools

πŸ› Support & Issues

πŸ“„ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments

  • NetSuite for providing the APIs that make this project possible
  • Axios for its beautiful HTTP library
  • The TypeScript and React communities for excellent tooling
  • All contributors who help improve NeatSuite

Ready to get started? Check out the documentation or explore the examples to see NeatSuite in action!

About

A TypeScript-first NetSuite API client with built-in OAuth 1.0a authentication, automatic retries, performance monitoring, and excellent developer experience. Lightweight and using only 3 dependencies.

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •