NOTE: this is still a draft, so it's subject to changes. This alert will be removed as soon as final version will be available

πŸ“±HSuite Smart App - Enterprise Hedera Application Framework

License: PROPRIETARY Version Node.js NestJS Hedera

A comprehensive, enterprise-grade NestJS boilerplate for building scalable applications on the Hedera Hashgraph network. Part of the HSuite ecosystem of decentralized applications and smart contract engines.

🌟 Overview

The HSuite Smart App is a production-ready, feature-rich boilerplate designed for developers building sophisticated applications on the Hedera network. It provides a solid foundation with pre-configured modules, services, and examples for common blockchain operations, authentication, monitoring, and much more.

Key Highlights

  • πŸ—οΈ Enterprise Architecture: Built on NestJS with modular, scalable design patterns

  • πŸ”— Hedera Native: Deep integration with Hedera Hashgraph SDK and services

  • πŸ›‘οΈ Security First: Multi-layer security with rate limiting, authentication, and protection

  • πŸ“Š Production Ready: Comprehensive monitoring, logging, and observability

  • πŸ”„ Event-Driven: Robust event handling and real-time capabilities

  • 🌐 Multi-Network: Support for testnet, mainnet, and private networks

  • πŸ“¦ Modular Design: Conditional loading of features based on configuration

✨ Features

Core Framework

  • πŸ—οΈ NestJS Framework: Scalable server-side applications with TypeScript

  • πŸ”— Hedera Integration: Complete Hedera Hashgraph SDK integration

  • πŸ—„οΈ MongoDB & Mongoose: Robust database layer with schema validation

  • πŸ”„ Redis Caching: High-performance caching and session management

  • πŸ“‘ WebSocket Support: Real-time communication capabilities

  • πŸ”„ Event Emitter: Application-wide event handling system

Security & Authentication

  • πŸ” Multi-Auth Support: JWT, API keys, and custom authentication strategies

  • πŸ›‘οΈ Rate Limiting: DDOS protection with configurable throttling

  • πŸ”’ Security Headers: Helmet integration for HTTP security

  • πŸͺ Session Management: Secure cookie-based sessions with Redis

  • 🚨 CSRF Protection: Cross-site request forgery protection

  • πŸ”‘ 2FA Support: Two-factor authentication via Twilio

Monitoring & Observability

  • πŸ“Š OpenTelemetry: Complete observability with traces and metrics

  • πŸ“ˆ Prometheus Metrics: Application and custom metrics collection

  • πŸ” Jaeger Tracing: Distributed tracing for performance monitoring

  • πŸ“ Structured Logging: Comprehensive logging with context

  • πŸ₯ Health Checks: Application health monitoring endpoints

External Integrations

  • πŸ“¨ Email Services: Nodemailer integration for transactional emails

  • πŸ“± SMS Notifications: Twilio integration for SMS alerts

  • πŸ€– Discord Webhooks: Discord integration for notifications

  • 🐦 Twitter API: Social media integration capabilities

  • πŸ“¦ IPFS Storage: Decentralized file storage and retrieval

  • πŸ”„ Background Jobs: Bull queue system for async processing

Development & Testing

  • πŸ“ API Documentation: Auto-generated Swagger/OpenAPI docs

  • πŸ§ͺ Testing Framework: Jest with unit and e2e testing support

  • πŸ“š Code Documentation: Compodoc integration for code docs

  • πŸ”§ Development Tools: Hot reload, debugging, and linting

  • πŸš€ Docker Support: Containerization for easy deployment

πŸ› οΈ Prerequisites

Before getting started, ensure you have the following installed:

  • Node.js: Version 22.x or higher

  • Yarn: Version 1.22.x (package manager)

  • MongoDB: Database server (local or cloud)

  • Redis: Caching and session store

  • IPFS Node: Optional, for decentralized storage

  • Git: Version control system

Optional Services

  • Discord Bot: For notification integrations

  • Twilio Account: For SMS and 2FA services

  • Twitter API: For social media features

  • Jaeger: For distributed tracing (can use SaaS)

πŸš€ Quick Start

1. Clone and Install

2. Environment Configuration

3. Start Development Services

4. Launch Application

5. Access Services

  • API Documentation: http://localhost:8888/api

  • Health Check: http://localhost:8888/health

  • Metrics: http://localhost:8888/metrics

πŸ—οΈ Project Architecture

Core Modules Architecture

βš™οΈ Configuration

The application uses a hierarchical configuration system with environment variables and configuration modules.

Environment Variables

Configuration Modules

The application uses modular configuration with TypeScript configuration files:

πŸ”§ Available Scripts

Development Scripts

Testing Scripts

Build Scripts

Docker Scripts

Utility Scripts

πŸ’» Development Guide

Creating a New Feature Module

  1. Generate Module Structure:

  1. Create the Module:

  1. Create the Service:

  1. Create the Controller:

  1. Register in Main Module:

Working with SmartNode SDK

The Smart App leverages the @hsuite/smartnode-sdk for all Hedera network operations. Here are real-world examples from the codebase:

Service Setup Pattern

Token Operations with SmartNode SDK

Topic Operations with SmartNode SDK

Account Operations with SmartNode SDK

SmartNode SDK Key Features

The SmartNode SDK provides several advantages over direct Hedera SDK usage:

  • πŸ”’ Validator Integration: All transactions include validator consensus timestamps

  • πŸ“¦ Pre-built Transaction Bytes: SDK generates optimized transaction bytes

  • πŸ”§ Type Safety: Full TypeScript interfaces for all operations

  • ⚑ Performance: Optimized for Smart Node network operations

  • πŸ›‘οΈ Security: Built-in transaction validation and signing patterns

Configuration Integration

πŸ§ͺ Testing

Unit Testing

E2E Testing

πŸš€ Deployment

Docker Deployment

Docker Compose Example:

Environment-Specific Configurations

Production Configuration:

Staging Configuration:

πŸ“Š Monitoring & Observability

Metrics Collection

The application automatically collects metrics using Prometheus:

Health Checks

Access health information at /health:

Logging

The application uses structured logging with contextual information:

πŸ”§ Troubleshooting

Common Issues

MongoDB Connection Issues

Redis Connection Issues

Hedera Network Issues

Transaction Issues

Network Configuration Issues

Debug Mode

Enable comprehensive debugging:

Log Analysis

🀝 Contributing

We welcome contributions to the HSuite Smart App! Please follow our contribution guidelines:

Development Workflow

  1. Fork the Repository

  2. Create Feature Branch: git checkout -b feature/amazing-feature

  3. Make Changes: Follow coding standards and add tests

  4. Run Tests: yarn test && yarn test:e2e

  5. Update Documentation: Include relevant documentation updates

  6. Commit Changes: git commit -m 'feat: add amazing feature'

  7. Push Branch: git push origin feature/amazing-feature

  8. Open Pull Request: Provide detailed description of changes

Coding Standards

  • Follow TypeScript best practices

  • Add comprehensive JSDoc comments for all public methods

  • Include unit tests for new functionality

  • Follow NestJS conventions and patterns

  • Use meaningful variable and function names

  • Keep functions small and focused

Commit Message Format

Types: feat, fix, docs, style, refactor, test, chore

Example:

πŸ“„ License

This project is licensed under the PROPRIETARY License. See the LICENSE file for details.

Copyright Β© 2025 HSuite Team. All rights reserved.

πŸ†˜ Support

Community Support

Enterprise Support

For enterprise customers, we offer:

  • Priority support with SLA guarantees

  • Custom development and integration services

  • Professional training and onboarding

  • Dedicated support channels

Contact: [email protected]

πŸ™ Acknowledgments

Special thanks to the amazing open-source community and the technologies that make this possible:

  • NestJS - A progressive Node.js framework

  • Hedera Hashgraph - The enterprise-grade public network

  • MongoDB - The database for modern applications

  • Redis - The in-memory data structure store

  • IPFS - A peer-to-peer hypermedia protocol

πŸ—ΊοΈ Roadmap

Upcoming Features

  • Q4 2024

    • GraphQL API support

    • Enhanced monitoring dashboard

    • Advanced caching strategies

    • Multi-tenant architecture

  • Q1 2025

    • Kubernetes deployment support

    • Advanced security features

    • Real-time analytics

    • Mobile SDK integration

  • Q2 2025

    • Machine learning integration

    • Advanced smart contract tools

    • Enhanced developer experience

    • Performance optimizations


Built with ❀️ by the HSuite Team

Website β€’ Documentation β€’ Discord β€’ Twitter

Last updated