Preserve Heritage, Empower Communities
A decentralized platform built on Nostr protocol to permanently preserve cultural practices, languages, and traditions. Empowering indigenous and minority communities to self-document their heritage without relying on centralized institutions.
π Live: https://culturebridge.vercel.app
For too long, cultural preservation has been controlled by institutions and corporations. Culture Bridge returns this power to communities themselves, using decentralized technology to ensure traditions survive and thrive.
- Censorship Resistant - No single entity can delete or control cultural content
- Permanent Storage - Content lives on multiple relays across the world
- User Sovereignty - Communities own their data and keys
- No Middlemen - Direct peer-to-peer publishing and discovery
- Share cultural practices, languages, and traditions
- Multi-media support (images, videos, audio)
- Markdown-based long-form content (NIP-23)
- Permanent preservation on Nostr relays
- List cultural items and artifacts
- Parameterized replaceable events (NIP-33)
- Product discovery with tags
- Shopping cart synced to Nostr (NIP-78)
- End-to-end encrypted messages (NIP-17)
- Gift-wrapped encryption (double encryption)
- Message attachments (images, videos, audio)
- Conversation context with product/heritage references
- Own your identity with Nostr keys
- Profile management (Kind 0)
- NIP-05 verification
- Lightning address support
- Event publishing tracking
- Redis-powered analytics
- User event history
- Relay health monitoring
Culture Bridge implements a strict 6-layer Service-Oriented Architecture (SOA):
βββββββββββββββββββββββββββββββββββββββββββ
β UI Layer (Pages/Components) β β Display only
βββββββββββββββββββββββββββββββββββββββββββ€
β Hook Layer (Custom Hooks) β β State management
βββββββββββββββββββββββββββββββββββββββββββ€
β Business Service Layer β β Orchestration
βββββββββββββββββββββββββββββββββββββββββββ€
β Event Service Layer (Nostr) β β Event creation
βββββββββββββββββββββββββββββββββββββββββββ€
β Generic Service Layer β β Infrastructure
βββββββββββββββββββββββββββββββββββββββββββ€
β Core Service Layer β β Logging, caching
βββββββββββββββββββββββββββββββββββββββββββ
- Frontend: Next.js 15.4 (App Router), React 18, TypeScript 5.5
- Styling: Tailwind CSS with custom design tokens
- State Management: Zustand (with persistence)
- Nostr Integration: nostr-tools 2.17, custom service layer
- File Storage: Blossom (decentralized CDN)
- Database: Redis (Upstash KV for analytics)
- Rich Text: TipTap with Markdown support
- Animations: Framer Motion
- Deployment: Vercel
- Node.js 20+ and npm
- Nostr browser extension (Alby, nos2x, Nostore) or use built-in key management
# Clone the repository
git clone https://github.com/psam21/cb.git
cd cb
# Install dependencies
npm install
# Run development server
npm run devOpen http://localhost:3000 to see the app.
# Build optimized production bundle
npm run build
# Start production server
npm startnpm run dev- Start development servernpm run build- Build production bundlenpm run start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Fix ESLint errorsnpm run typecheck- TypeScript type checkingnpm run format- Format code with Prettier
- NIP-01 - Basic protocol flow
- NIP-05 - DNS-based verification
- NIP-07 - Browser extension signer
- NIP-09 - Event deletion
- NIP-17 - Private direct messages
- NIP-23 - Long-form content
- NIP-33 - Parameterized replaceable events
- NIP-44 - Encrypted payloads (v2)
- NIP-78 - Application-specific data
- NIP-94 - File metadata
- Kind 0 - User profiles
- Kind 1 - Text notes (welcome messages)
- Kind 5 - Event deletion
- Kind 14 - Rumor (NIP-17 inner message)
- Kind 1059 - Gift wrap (NIP-17 encryption)
- Kind 10063 - Blossom server list
- Kind 24242 - Blossom authorization
- Kind 30023 - Products & heritage contributions
- Kind 30078 - Cart & app data storage
Connected to 8 high-reliability relays:
- relay.damus.io
- relay.snort.social
- relay.nostr.band
- relay.primal.net
- offchain.pub
- shu01.shugur.net (35+ NIPs)
- relay.0xchat.com (messaging-focused)
- relay.nostr.wirednet.jp (APAC)
cb/
βββ src/
β βββ app/ # Next.js app router pages
β β βββ shop/ # Marketplace pages
β β βββ heritage/ # Heritage contribution pages
β β βββ messages/ # Private messaging
β β βββ profile/ # User profile
β β βββ api/ # API routes
β βββ components/ # React components
β β βββ primitives/ # Reusable UI components
β β βββ shop/ # Shop-specific components
β β βββ heritage/ # Heritage components
β β βββ auth/ # Authentication forms
β βββ services/ # Service layer (SOA)
β β βββ core/ # Core services (logging, KV)
β β βββ generic/ # Generic infrastructure
β β βββ nostr/ # Nostr event facade
β β βββ business/ # Business logic orchestration
β βββ hooks/ # Custom React hooks
β βββ stores/ # Zustand state stores
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions
β βββ config/ # Configuration files
β βββ errors/ # Error handling
β βββ styles/ # Global styles
βββ docs/ # Documentation
β βββ cb-critical-guidelines.md
β βββ nip-kind-implementation-matrix.md
βββ public/ # Static assets
βββ package.json
- Dual Authentication: Browser extension (NIP-07) or nsec storage
- Keys never leave the user's device
- All event signing requires user approval
- NIP-44 v2 - Modern ChaCha20-Poly1305 encryption
- NIP-17 - Double gift-wrap for messages
- IndexedDB - Encrypted cache storage with AES-256-GCM
- PBKDF2 - 100k iterations for key derivation
- Users control their private keys
- Content published to multiple relays
- No centralized database for user data
- Logout clears all browser storage
- Critical Guidelines - Development rules and patterns
- NIP Implementation Matrix - Detailed protocol implementation
We welcome contributions! Please follow these guidelines:
- Read the guidelines: Check
docs/cb-critical-guidelines.md - Follow SOA: Respect the 6-layer architecture
- Build before commit:
npm run buildmust pass - Write tests: Manual end-to-end verification required
- Document changes: Update relevant docs
# 1. Build (must pass with 0 errors)
npm run build
# 2. Fix any errors/warnings iteratively
npm run lint:fix
# 3. Stage changes
git add .
# 4. Commit with detailed message
git commit -m "feat: Description of WHAT and WHY"
# 5. Push
git push origin main
# 6. Verify on production
# Visit https://culturebridge.vercel.app- 10 NIPs implemented
- 9 Event Kinds supported
- 8 Relays connected
- 21 Services in SOA architecture
- 6 Layers of separation of concerns
- β Heritage contributions
- β Decentralized marketplace
- β Private messaging (NIP-17)
- β Shopping cart with relay sync
- β Analytics dashboard
- β Profile management
- π NIP-46 (Remote signer protocol)
- π NIP-65 (Relay list metadata)
- π WebSocket profile updates
- π Video/audio streaming optimization
- π IPFS fallback for media
This project is licensed under the MIT License - see the LICENSE file for details.
- Nostr Protocol - For building censorship-resistant infrastructure
- Blossom - For decentralized file hosting
- Community - For preserving and sharing cultural heritage
- Website: https://culturebridge.vercel.app
- Issues: GitHub Issues
- Nostr: Follow us on Nostr for updates
Built with β€οΈ for cultural preservation and community empowerment