This document provides an overview of the technology stack used in the OpenPleb project. It is designed to help new contributors understand the technologies they should focus on learning to effectively contribute to the project.
OpenPleb is a platform for matching users who want to pay banking QR codes with Bitcoin (makers), and earners who want to earn Bitcoin for paying these offers (takers). The platform facilitates these transactions through a bond system that ensures incentives are aligned for both parties.
The project is structured as a monorepo with multiple packages, each serving a specific purpose in the overall architecture.
- Repository Pattern: Monorepo structure with multiple packages in the
packages/directory - Languages: TypeScript is used throughout the entire project
- Database: PostgreSQL with Drizzle ORM for database operations
- Containerization: Docker and Docker Compose for development and deployment
- Runtime: Bun.js - A fast JavaScript runtime and package manager
- API Framework: Elysia.js - A fast and type-safe HTTP framework for Bun
- API Extensions:
@elysiajs/cors- CORS support@elysiajs/cookie- Cookie management@elysiajs/jwt- JWT authentication@elysiajs/swagger- API documentation@elysiajs/cron- Scheduled tasks
- Database ORM: Drizzle ORM - Lightweight TypeScript ORM
- Bitcoin/Lightning:
@cashu/cashu-ts- Cashu protocol implementation for token management@lightningpolar/lnd-api- Lightning Network Daemon API integrationlight-bolt11-decoder- Lightning invoice decoder
- Security:
@node-rs/argon2- Password hashing- Various cryptographic libraries for security operations
- Notification Services:
@negrel/webpush- Web Push notificationsdiscord.js- Discord bot integration
- Framework: SvelteKit - A framework for building web applications with Svelte
- Adapter:
@sveltejs/adapter-node- For server-side rendering - UI Components:
- TailwindCSS - Utility-first CSS framework
- Bits UI - Accessible component primitives
- Lucide Icons - Consistent icon set
svelte-sonner- Toast notificationstailwindcss-animate- Animations
- State Management:
- Svelte stores - For persistent and local state management
idb- IndexedDB wrapper for client-side storage
- Special Features:
qr-scanner- QR code scanning capabilitysvelte-file-dropzone- File upload functionality@inlang/paraglide-sveltekit- Internationalization
- Bitcoin/Lightning:
@cashu/cashu-ts- Cashu protocol for e-cash tokens@gandlaf21/cashu-wallet-engine- Wallet implementation
Similar to the main frontend but with additional administration-specific components:
@tanstack/table-core- Advanced table functionalitysvelte-range-slider-pips- Range slider components
A separate package for integrating with Umbrel:
- Simplified SvelteKit application
- DaisyUI - Component library for Tailwind CSS
- Tailwind CSS v4
Shared code and utilities used across multiple packages:
- Database schema definitions
- Type definitions
- Shared utilities for:
- Error handling
- Type conversions
- LNURL handling
The application uses a relational database with tables for:
- Offers - Core data structure for payment offers
- Claims - Records of who claimed which offers
- Receipts - Payment receipts uploaded by users
- Proofs - Cryptographic proofs for transactions
- Tokens - Various tokens used in the bond system
- Users - User account information
- Settings - Application settings
- Fiat Providers - Information about supported fiat payment services
To contribute to OpenPleb, you'll need:
- Bun.js
- Docker and Docker Compose
- PostgreSQL knowledge
- Node.js/TypeScript experience
- Understanding of Bitcoin and Lightning Network concepts
- Svelte/SvelteKit: Understanding component-based architecture and SvelteKit's routing system
- Elysia.js: API routing and middleware patterns
- Drizzle ORM: Database schema definition and query building
- Cashu Protocol: E-cash token concepts and operations
- Lightning Network: Understand Lightning network payment flow
- TypeScript: Strong typing and interfaces throughout the codebase
- TailwindCSS: Utility-first CSS approach
- ShadCN: UI component library based on TailwindCSS
- Bun.js: Modern JavaScript runtime features
The application is designed to be deployed using Docker containers with the following services:
- Backend API server
- Frontend web application
- Admin frontend
- PostgreSQL database
- (Optional) Umbrel app integration
Each component has its own Dockerfile for building containers, and the services are orchestrated using Docker Compose.
- Start with TypeScript fundamentals if not already familiar
- Learn Svelte basics and then SvelteKit for routing and layout
- Understand TailwindCSS for styling components
- Familiarize yourself with Drizzle ORM for database operations
- Study Cashu for e-cash tokens
- Explore Elysia.js for API development patterns
- Get comfortable with Bun.js environment and tooling
With this foundation, you'll be well-equipped to contribute to different aspects of the OpenPleb project.