PromptHash
AI Prompt Marketplace
Overview
PromptHash is a dynamic, AI-powered marketplace connecting prompt creators with users seeking inspiration, productivity, and cutting-edge solutions. Our platform enables users to explore, create, buy, and sell high-quality AI prompts across various categories.
Vision
To become the go-to resource where creators and users converge β leveraging advanced AI models, privacy-focused blockchain infrastructure, and intuitive design β to spark transformative ideas across industries.
Key Features
- π Browse & Discover β Explore curated collections of AI prompts from top creators
- π° Buy & Sell Prompts β Monetize your expertise or find the perfect prompt
- π Blockchain Security β Built on Avalanche Blockchain
- π¬ Conversational AI β Maintain chat sessions with context awareness
- ποΈ Governance β Community-driven platform development
- β¨ Prompt Engineering β Tools to improve and optimize AI prompts
- π¨βπ» Creator Profiles β Dedicated space for top prompt creators
- πΌοΈ Multi-Format Support β Generate images, text, and code with ease
π How We Use Avalanche Blockchain
For Non-Technical Users
Avalanche is our digital ledger and payment system β a secure, decentralized database recording all prompt transactions and automating payments.
It ensures:
- Secure Ownership β Every prompt becomes a unique NFT on Avalanche
- Automatic Payments β Instant, secure transfers via smart contracts
- Transparent History β All transactions are public and immutable
- No Middlemen β Peer-to-peer transactions without bank fees
- Global Access β Anyone with internet can participate
For Technical Users
Avalanche serves as our decentralized database and payment infrastructure through the following implementation:
π§ Smart Contract Architecture
- ERC-721 NFT Contract:
PromptHash.soldeployed at0x76744225486abccBFAEb0b597bDD676A2e6B90B0 - Upgradeable Contract: Uses OpenZeppelinβs UUPS pattern
- Gas Optimization: Built on Avalanche C-Chain
βοΈ Core Functions
// Create new prompts as NFTs
function createPrompt(string memory _imageUrl, string memory _description) external returns (uint256)
// List prompts for sale
function listPromptForSale(uint256 _tokenId, uint256 _price) external
// Purchase prompts with automatic fee distribution
function buyPrompt(uint256 _tokenId) external payable nonReentrant
// Retrieve all prompts
function getAllPrompts() external view returns (uint256[] memory, Prompt[] memory)
π Network Configuration
- Primary Network: Avalanche C-Chain (Mainnet)
- Test Network: Avalanche Fuji Testnet
- RPC Endpoint:
https://api.avax.network/ext/bc/C/rpc - Block Explorer: snowtrace.io
π§© Technical Stack Integration
- Frontend: Wagmi + RainbowKit
- Smart Contract Interaction: Ethers.js
- Transaction Management: Auto gas estimation & confirmation
- Fee Structure: 1% platform fee (configurable wallet)
ποΈ Data Storage Pattern
- On-Chain: Metadata, ownership, transaction history
- Off-Chain: Image URLs & descriptions (IPFS-ready)
- Hybrid Approach: Blockchain security + scalable storage
π§ Features & Overview
- Discover & Explore: Browse curated AI prompts across categories
- Sell & Share: Monetize your best prompts
- Interactive Chat: AI-driven recommendations & insights
- Responsive UI: Next.js + Tailwind CSS
- API Integration: RESTful API endpoints
π οΈ Categories
| Category | Description |
|---|---|
| πΈ Image Prompts | For visual content generation |
| π Text & Writing | Creative writing, copywriting |
| π Marketing Copy | Advertising, email, and conversion content |
| π‘ Creative Ideas | Brainstorming and ideation |
| π Productivity | Workflow optimization |
| π» Code Generation | Programming and development assistance |
π§° Tech Stack
| Layer | Tools |
|---|---|
| Frontend | Next.js, React, Tailwind CSS |
| Backend | FastAPI |
| AI Integration | Google Gemini AI API |
| Authentication | Wallet Connect |
| Server | Uvicorn |
| Blockchain | Avalanche |
| Smart Contracts | Solidity + OpenZeppelin |
| Web3 Integration | Ethers.js, Wagmi, RainbowKit |
βοΈ Prerequisites
- Python 3.12.0
- Secret AI API Key
- Node.js 18+
- Web browser with wallet extension
- MetaMask or any EVM-compatible wallet
π API Endpoints
Models
GET /api/models β Retrieve available AI models
Chat
GET /api/chat β Chat with an AI model
Parameters:
promptβ Userβs inputmodel(optional) β AI model name
Prompt Improvement
POST /api/improve-prompt β Enhance a prompt
Body:
{
"prompt": "Create an image of a futuristic city"
}
Health Check
GET /api/health β Check API status
π‘ Usage Examples
Chat with AI Model
import requests
API_KEY = "your_api_key_here"
BASE_URL = "http://localhost:8000"
headers = {"X-API-Key": API_KEY}
response = requests.get(
f"{BASE_URL}/api/chat",
params={"prompt": "Explain the benefits of Secret Network for AI applications", "model": "deepseek-r1:70b"},
headers=headers
)
print(response.json())
Improve a Prompt
import requests
API_KEY = "your_api_key_here"
BASE_URL = "http://localhost:8000"
headers = {"X-API-Key": API_KEY, "Content-Type": "application/json"}
data = {"prompt": "Create an image of a futuristic city"}
response = requests.post(f"{BASE_URL}/api/improve-prompt", json=data, headers=headers)
print(response.json())
π Project Structure
PromptHash/
βββ src/
β βββ web3/
β β βββ PromptHash.sol
β β βββ PromptHash.js
β β βββ metadata.json
β βββ components/
β βββ hooks/
β βββ lib/
β βββ app/
βββ app/
β βββ __init__.py
β βββ config.py
β βββ main.py
β βββ models.py
β βββ security.py
β βββ routers/
βββ requirements.txt
βββ package.json
βββ README.md
π¦ Dependencies
- FastAPI β API framework
- Uvicorn β ASGI server
- React / Next.js / Tailwind β Frontend stack
- Lucide β UI icons
- Ethers.js β Smart contract interaction
- Wagmi + RainbowKit β Wallet integration
- OpenZeppelin β Secure Solidity libraries
For the complete list, refer to requirements.txt and package.json.
π§ Why Avalanche?
- β‘ Speed β Sub-second transaction finality
- πΈ Cost β Transactions under $1
- π Scalability β High throughput
- π§ EVM Compatibility β Ethereum-ready
- π± Eco-Friendly β Energy-efficient PoS
- π§βπ» Developer Friendly β Excellent docs & tooling
π Getting Started with Avalanche
- Install MetaMask or another EVM wallet
- Add the Avalanche Network:
Network Name: Avalanche C-Chain
RPC URL: https://api.avax.network/ext/bc/C/rpc
Chain ID: 43114
Symbol: AVAX
Explorer: https://snowtrace.io/
- Get test AVAX from the Avalanche Faucet
- Connect your wallet and start creating prompts
Log in or sign up for Devpost to join the conversation.