PromptHash is a dynamic, AI-powered marketplace connecting prompt creators with users seeking inspiration, productivity, and cutting-edge solutions. Leveraging the high-throughput, low-latency Hedera Hashgraph network for core marketplace operations and privacy-focused tooling for AI integration, our platform enables users to explore, create, buy, and sell high-quality AI prompts across various categories.
Our vision is to become the go-to resource where creators and users convergeβleveraging advanced AI models, enterprise-grade Hedera Hashgraph infrastructure, and intuitive designβto spark transformative ideas across industries.
- π Browse & Discover: Explore curated collections of AI prompts from top creators.
- π° Buy & Sell Prompts: Monetize your expertise or find the perfect prompt, with all transactions settled via HBAR on Hedera.
- π€ Advanced AI Integration: Powered by cutting-edge AI models (e.g., DeepSeek R1, Llama 3.2 Vision) through our privacy-preserving AI gateway.
- π Hedera Smart Contracts: On-chain prompt registry and payment escrow flows executed on Hedera using Solidity-compatible smart contracts.
- π Blockchain Security: Built on Hederaβs asynchronous Byzantine Fault Tolerance (aBFT) infrastructure for enterprise-grade safety.
- π¬ Conversational AI: Maintain context-aware chat sessions to refine or generate prompts in real time.
- ποΈ Governance: Community-driven platform development and on-chain governance proposals via Hedera governance service.
- β¨ Prompt Engineering Tools: Interactive utilities to analyze, optimize, and refactor AI prompts.
- π¨βπ» Creator Profiles: Dedicated spaces for top prompt creators, with on-chain reputation badges.
- πΌοΈ Multi-Format Support: Generate images, text, and code with ease.
- π Comprehensive Documentation: Detailed API documentation available via Swagger UI and ReDoc.
Browse a curated collection of AI prompts across categories like Coding, Marketing, Creative Writing, and Business.
List and monetize your top AI prompts with instant HBAR settlements. Smart contract escrow ensures prompt delivery before funds release.
Use our AI chatbox to get prompt recommendations and marketplace insights, with seamless on-chain logging of session metadata.
Built with Next.js, React, and Tailwind CSS for a seamless, mobile-first experience.
Easy integration with your applications via our RESTful and GraphQL API endpoints, complete with Hedera transaction whitelisting.
- πΈ Image Prompts: For visual content generation.
- π Text & Writing: Creative writing, copywriting, and content creation.
- π Marketing Copy: Advertising, emails, and conversion-focused content.
- π‘ Creative Ideas: Brainstorming and concept development.
- π Productivity Boosters: Efficiency and workflow optimization.
- π» Code Generation: Programming assistance and development.
- Frontend: Next.js, React, Tailwind CSS
- Backend: FastAPI for AI services; Node.js/Express for blockchain gateway
- AI Integration: Private inference through Secret Network AI API
- Blockchain Integration: Hedera Hashgraph via Hedera JavaScript SDK / hethers.js
- Smart Contracts: Solidity (v0.8.17) deployed on Hedera Testnet/Mainnet
- Authentication: Wallet Connect & Hedera DID for user login
- Server: Uvicorn (ASGI) and Node.js processes managed with PM2
- Icons & UI: Lucide for icon components
To seamlessly integrate Hederaβs enterprise-grade services, PromptHash leverages four core Hedera offeringsβJavaScript SDK client setup, the Smart Contract Service (HSCS), the Token Service (HTS), and the Consensus Service (HCS). Each component is provisioned and configured via environment variables, code snippets, and CLI workflows outlined below.
-
Node.js v18+ and npm
-
Hedera Testnet Operator ID & Private Key
-
.envconfigured in project root:OPERATOR_ACCOUNT_ID=0.0.xxxxx OPERATOR_ACCOUNT_PRIVATE_KEY=302e020100300... HEDERA_NETWORK=testnet
import { Client } from "@hashgraph/sdk";
// Load from .env
const operatorId = process.env.OPERATOR_ACCOUNT_ID;
const operatorKey = process.env.OPERATOR_ACCOUNT_PRIVATE_KEY;
// Configure client for testnet
const client = Client.forName(process.env.HEDERA_NETWORK);
client.setOperator(operatorId, operatorKey);
export default client;# Install Solidity compiler
npm install solc
# Compile contract
solcjs contracts/PromptHash.sol --bin --abi --output-dir buildArtifacts generated:
build/PromptHash.bin(bytecode)build/PromptHash.abi(ABI)
import { JsonRpcProvider } from "@ethersproject/providers";
import { Wallet, ContractFactory } from "@ethersproject/ethers";
import fs from "fs";
const provider = new JsonRpcProvider(process.env.HEDERA_RPC_URL);
const wallet = new Wallet(process.env.OPERATOR_ACCOUNT_PRIVATE_KEY, provider);
const bytecode = fs.readFileSync("build/PromptHash.bin");
const abi = JSON.parse(fs.readFileSync("build/PromptHash.abi"));
const factory = new ContractFactory(abi, bytecode, wallet);
(async () => {
const contract = await factory.deploy();
await contract.deployed();
console.log("Contract Address:", contract.address);
})();import { TokenCreateTransaction } from "@hashgraph/sdk";
const transaction = new TokenCreateTransaction()
.setTokenName("PromptToken")
.setTokenSymbol("PRMPT")
.setDecimals(0)
.setInitialSupply(1000)
.setTreasuryAccountId(operatorId);
const response = await transaction.execute(client);
const receipt = await response.getReceipt(client);
console.log("HTS Token ID:", receipt.tokenId.toString());import { TokenMintTransaction, TransferTransaction } from "@hashgraph/sdk";
await new TokenMintTransaction()
.setTokenId(receipt.tokenId)
.setSupply(500)
.execute(client);
await new TransferTransaction()
.addTokenTransfer(receipt.tokenId, operatorId, "0.0.xxxxx")
.execute(client);import { TopicCreateTransaction, TopicMessageSubmitTransaction } from "@hashgraph/sdk";
// Create HCS topic
const topicResponse = await new TopicCreateTransaction().execute(client);
const topicId = (await topicResponse.getReceipt(client)).topicId;
// Publish a message
await new TopicMessageSubmitTransaction({ topicId })
.setMessage("User 0.0.12345 bought prompt #6789")
.execute(client);import { MirrorClient } from "@hashgraph/sdk";
const mirrorClient = new MirrorClient("https://testnet.mirrornode.hedera.com");
mirrorClient.subscribe(
{ topicId },
(message) => console.log("Received message:", message)
);- Node.js v18+ and npm
- Python 3.12.0
- Hedera Testnet Account (Operator ID & Private Key)
- HBAR in your testnet wallet for gas and escrow
- Secret AI API Key (for AI-powered features)
- Web browser with wallet extension (supporting Hedera DID)
-
Clone the Repository
git clone https://github.com/OkeyAmy/PromptHash.git cd PromptHash -
Backend Setup (Python)
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows pip install -r requirements.txt
-
Blockchain Gateway & Frontend
cd hbara-gateway npm install cd ../frontend npm install
-
Configure Environment Variables Create a
.envfile in project root with:# Hedera OPERATOR_ACCOUNT_ID=0.0.xxxxx OPERATOR_ACCOUNT_PRIVATE_KEY=302e020100300... HEDERA_NETWORK=testnet # AI SECRET_AI_API_KEY=your_secret_ai_key # Frontend NEXT_PUBLIC_API_URL=http://localhost:8000
-
Start Python AI API
uvicorn app.main:app --reload --port 8000
-
Start Blockchain Gateway
cd hbara-gateway npm run dev -
Start Frontend
cd frontend npm run dev
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
GET /api/modelsβ Retrieve available AI models.
-
GET /api/chatβ Chat with AI model.- Parameters:
prompt(string),model(optional)
- Parameters:
-
POST /api/improve-promptβ Analyze and improve a prompt.- Body:
{ "prompt": "..." }
- Body:
GET /api/healthβ Check API health status.
- Hedera testnet account funded with HBAR
OPERATOR_ACCOUNT_ID&OPERATOR_ACCOUNT_PRIVATE_KEYset in.env
cd contracts
solcjs PromptHash.sol --bin --abi --output-dir buildGenerates PromptHash.bin and PromptHash.abi in build/
node deployScript.js- Logs deployment address and transaction fee.
- Visit https://hashscan.io/testnet
- Search contract address.
- Click βVerify Contractβ and upload
PromptHash.sol,build/PromptHash_abi.json,build/PromptHash_metadata.json.
PromptHash/
βββ contracts/ # Solidity smart contracts
βββ hbara-gateway/ # Node.js blockchain gateway
βββ frontend/ # Next.js/React application
βββ app/ # FastAPI AI services
β βββ config.py
β βββ main.py
β βββ models.py
β βββ routers/
βββ requirements.txt # Python dependencies
βββ package.json # Gateway & Frontend dependencies
βββ README.md # Project documentation
- FastAPI, Pydantic, Uvicorn
- Hedera JavaScript SDK, ethers.js
- Secret AI SDK
- Next.js, React, Tailwind CSS, Lucide
π₯ Watch Demo: PromptHash Consensus Service
We welcome contributions! Please read CONTRIBUTING.md for guidelines on setting up your development environment, coding standards, and submitting pull requests.
