ποΈ@hsuite/dao
π§ Work in Progress - This application is currently under active development. Features and APIs may change.
ποΈ Decentralized Autonomous Organization (DAO) Platform - A comprehensive governance solution for the Hedera ecosystem.
A powerful and flexible DAO management platform that enables decentralized governance, proposal management, and community-driven decision-making within the HSuite ecosystem. Built with NestJS, MongoDB, and seamless integration with the Hedera network.
π Table of Contents
π Overview
The @hsuite/dao application provides a complete DAO governance infrastructure that supports:
DAO Creation & Management: Create and configure DAOs with custom governance rules
Proposal Lifecycle: Submit, vote on, and execute governance proposals
Flexible Voting: Support for token-weighted voting and custom voting options
Member Management: Handle DAO membership and permissions
Real-time Updates: WebSocket integration for live governance updates
β¨ Features
ποΈ DAO Management
Create DAOs with custom governance parameters
Configure voting rules including thresholds and voting periods
Manage member permissions and access control
Track DAO status and operational metrics
π Proposal System
Submit proposals with structured data and custom voting options
Lifecycle management from creation to execution
Multiple proposal types supporting various governance actions
Time-bounded voting with configurable periods
π³οΈ Voting Mechanism
Flexible voting options (YES/NO/ABSTAIN or custom choices up to 5 options)
Token-weighted voting based on governance token holdings
Vote validation ensuring member eligibility and preventing duplicates
Voting history and transparency features
π Real-time Features
WebSocket integration for live updates
Event-driven architecture with background job processing
Automated status updates based on voting outcomes
ποΈ Technical Architecture
Core Components
Data Models
DAO Entity
Proposal Entity
Vote Entity
Infrastructure Stack
Framework: NestJS with TypeScript
Database: MongoDB with Mongoose ODM
Queue System: Bull Queue for background processing
WebSockets: Real-time communication
Blockchain: Hedera Hashgraph integration
Validation: class-validator and class-transformer
Documentation: Swagger/OpenAPI
π API Endpoints
DAO Management
Create DAO
Get DAO by ID
Get DAOs by Owner
Add Member to DAO
Proposal Management
Create Proposal
Get Proposal
Get DAO Proposals
Get Active Proposals
Voting
Cast Vote
Get Vote by ID
Get Proposal Votes
Get Voter's Vote
Get Voting Results
π Installation & Setup
Prerequisites
Node.js 18+ and npm/yarn
MongoDB 5.0+
Redis (for Bull Queue)
Hedera account for blockchain interaction
Environment Configuration
Create .smart_app.env file:
Installation Steps
Install dependencies:
Start MongoDB and Redis:
Run database migrations (if any):
Start the application:
Verify installation:
π Usage Examples
Complete DAO Workflow
WebSocket Integration
ποΈ Database Schema
Collections Structure
dao_entities
dao_proposals
dao_votes
π§ Development
Project Structure
Running Tests
Code Quality
Building for Production
π API Documentation
The application provides comprehensive API documentation via Swagger UI:
Development: http://localhost:3001/api/docs
Swagger JSON: http://localhost:3001/api/docs-json
Key API Features:
Comprehensive schemas for all request/response objects
Interactive testing directly from the documentation
Authentication examples for secured endpoints
Error response documentation with status codes
π Security Considerations
Input validation using class-validator decorators
Authentication via Hedera account signatures
Rate limiting on API endpoints
Data sanitization for MongoDB injection prevention
CORS configuration for cross-origin requests
π€ Contributing
We welcome contributions to improve the DAO platform! Please read our Contributing Guide for details on:
Code style and conventions
Testing requirements
Pull request process
Issue reporting guidelines
π License
This package is part of the HSuite ecosystem and is covered by its license terms.
π Support & Documentation
GitHub Issues: Report bugs and request features
Documentation: Comprehensive guides in
/docsCommunity: Join our Discord for real-time support
API Reference: Interactive Swagger documentation
Built with β€οΈ by the HSuite Team Empowering decentralized governance on Hedera Copyright Β© 2025 HSuite. All rights reserved.
Last updated