A decentralized ad marketplace built on the Nostr protocol with Bitcoin and Lightning Network payment integration.
// Import the SDK
const { ProofOfReachSDK } = require('@proofofreach/sdk');
// Initialize with your API key
const sdk = new ProofOfReachSDK({
apiKey: 'your-api-key',
debug: true // Optional
});
// Serve an ad
async function displayAd() {
const ad = await sdk.serveAd({
placement: 'sidebar',
pubkey: 'your-nostr-pubkey',
interests: ['bitcoin', 'technology']
});
if (ad) {
console.log('Ad received:', ad.title);
// Render the ad in your application
}
}
// Track a click
async function trackAdClick(adId) {
await sdk.trackClick({
adId: adId,
pubkey: 'your-nostr-pubkey',
placement: 'sidebar'
});
}- Decentralized advertising platform using Nostr
- Bitcoin and Lightning Network payment integration
- Role-based access control (publishers, advertisers, administrators)
- API for programmatic ad serving and analytics
- JavaScript SDK for easy integration
- Node.js 18+ and npm
- PostgreSQL database
- Clone the repository
git clone https://github.com/SuJubilacion/ProofOfReach.git
cd ProofOfReach- Install dependencies
npm install- Set up environment variables
cp .env.example .env
# Edit .env with your database and API keys- Set up database
npx prisma generate
npx prisma db push- Run development server
npm run dev- Next.js with TypeScript
- Prisma ORM
- Nostr protocol
- Lightning Network
- TailwindCSS
- PostgreSQL
MIT