Thanks to visit codestin.com
Credit goes to github.com

Skip to content

hngprojects/hng-sdk

HNG SDK

A comprehensive collection of packages and UI components for building modern web applications, powered by React, TypeScript, and Tailwind CSS.

License: ISC TypeScript pnpm

πŸ“¦ Packages

This monorepo contains the following packages:

Core Packages

  • hng-sdk - Base package that re-exports all sub-packages
    npm install hng-sdk

Component Packages

  • @hng-sdk/ui - React UI component library with Tailwind CSS and shadcn/ui

    npm install @hng-sdk/ui
  • @hng-sdk/email - React email templates built with @react-email and Tailwind CSS

    npm install @hng-sdk/email

πŸš€ Quick Start

Installation

# Install all packages
npm install hng-sdk

# Or install individual packages
npm install @hng-sdk/ui @hng-sdk/email

Usage

UI Components

import { Button } from '@hng-sdk/ui';
import '@hng-sdk/ui/globals.css';

function App() {
  return (
    <Button variant="default" size="lg">
      Click me
    </Button>
  );
}

Email Templates

import { WelcomeEmail } from '@hng-sdk/email';
import { render } from '@react-email/render';

const emailHtml = render(WelcomeEmail({ username: 'John' }));
// Send email using your preferred service

πŸ—οΈ Development

This project uses pnpm workspaces for managing the monorepo.

Prerequisites

  • Node.js 18+
  • pnpm 10+

Setup

# Clone the repository
git clone https://github.com/hngprojects/hng-sdk.git
cd hng-sdk

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run development mode
pnpm dev

Workspace Commands

# Build all packages
pnpm build

# Run tests (when available)
pnpm test

# Clean build artifacts
pnpm clean

# Run development server for docs
cd src/apps/docs
pnpm dev

πŸ“š Documentation

πŸ› οΈ Tech Stack

  • Language: TypeScript 5.7
  • Framework: React 19
  • Styling: Tailwind CSS v4
  • Build Tool: TypeScript Compiler
  • Package Manager: pnpm
  • Email: React Email
  • UI Components: Radix UI + shadcn/ui
  • Monorepo: pnpm Workspaces

πŸ“ Project Structure

hng-sdk/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ apps/
β”‚   β”‚   └── docs/              # Documentation site (Next.js)
β”‚   └── packages/
β”‚       β”œβ”€β”€ hng-sdk/           # Base package
β”‚       β”œβ”€β”€ ui/                # UI component library
β”‚       └── emails/            # Email templates
β”œβ”€β”€ package.json               # Root package.json
β”œβ”€β”€ pnpm-workspace.yaml        # Workspace configuration
β”œβ”€β”€ tsconfig.base.json         # Shared TypeScript config
└── README.md                  # This file

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Steps

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the ISC License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

πŸ—ΊοΈ Roadmap

  • Add more UI components
  • Create more email templates
  • Add comprehensive testing
  • Improve documentation
  • Add Storybook for component playground
  • Create CLI tool for scaffolding

Made with ❀️ by the HNG Team

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •