A monorepo that utilizes x402 to monetize early and exclusive information through data feeds.
Early access to data often determines success in prediction markets, sports betting, trading, and research. Grapevine was created as a marketplace where data providers can monetize exclusive insights through x402 Protocol while consumers gain access to unqiue information.
This monorepo contains multiple workspace projects:
grapevine/
├── grapevine-api/ # RESTful API Server (Hono + TypeScript + PostgreSQL)
│ ├── src/
│ │ ├── routes/ # API route handlers (auth, feeds, analytics, leaderboards)
│ │ ├── services/ # Business logic and integrations
│ │ ├── middleware/ # Authentication and logging
│ │ ├── utils/ # Validation utilities
│ │ └── schemas.ts # Zod validation schemas
│ ├── test/ # Comprehensive test suite
│ ├── schema.sql # Database schema with views and functions
│ └── README.md # API-specific documentation
├── grapevine-frontend/ # React web application
├── grapevine-client/ # TypeScript SDK
├── grapevine-mcp/ # Model Context Protocol server for Claude Desktop
├── CONTRIBUTING.md # Contribution guidelines
├── LICENSE # MIT License
└── README.md # This file - project overview
git clone https://github.com/PinataCloud/grapevine.git
cd grapevine
pnpm installSetup Instructions:
- API Setup Guide - Database, environment configuration, and running the server
- Frontend Setup Guide - React application setup and configuration
Wallet-based authentication using EIP-191 signatures. No passwords, no email—just sign a message with your wallet.
// Sign authentication message
const message = `Authenticate to Grapevine: ${nonce}`;
const signature = await wallet.signMessage(message);Publishers create feeds to organize their content by topic, category, or information type.
POST /v1/feeds
{
"title": "Pre-Market Trading Signals",
"description": "Alpha signals 30 minutes before market open",
"category_id": 123,
"tags": ["trading", "stocks", "alpha"]
}Each feed entry contains encrypted content stored on IPFS, with payment instructions for access.
POST /v1/entries
{
"feed_id": 456,
"content_cid": "QmX...", // IPFS content identifier
"price_usdc": "10.00",
"expires_at": 1700000000,
"metadata": { "category": "tech-earnings" }
}Consumers buy access by completing the on-chain transaction specified in the payment instructions.
// Get payment instructions
GET /v1/entries/:id/payment-instructions
// After payment, retrieve content
GET /v1/entries/:id/content
// Returns decrypted IPFS contentReal-time analytics track feed performance, provider revenue, and consumer activity to build trust.
// View feed performance
GET /v1/analytics/feeds/:id
// Check leaderboards
GET /v1/leaderboards/top-revenue?period=7d
GET /v1/leaderboards/trending?period=7dFull API documentation with interactive examples:
- Swagger UI: https://api.grapevine.fyi/v1/docs
- Wallet Authentication Guide - EIP-191 signature authentication
- Pinata Integration - IPFS storage setup
- Payment Instructions - x402 protocol details
- Database Schema - Complete PostgreSQL schema
Contributions are welcome! Feel free to open issues or submit pull requests.
MIT License - see LICENSE for details