How lightning-bounties/lb-next works
Main Architecture Components
The system follows a Feature-Sliced Design (FSD) architecture, as evidenced by the numbered folders in the src directory. Here's how to represent the main components:
a) Layer Structure (Top to Bottom):
• App Layer (0_app)
• Pages Layer (1_pages)
• Widgets Layer (2_widgets)
• Features Layer (3_features)
• Entities Layer (4_entities)
• Shared Layer (5_shared)
Key Components
Frontend (Next.js Application):
• Authentication System (AuthProvider)
• Theme System (ThemeProvider)
• Query Management (QueryProvider)
• API Integration Layer
• Routing Layer (Next.js Pages)
Backend Integration:
• Authentication Service
• Issues Service
• Rewards Service
• Users Service
• Wallets Service
• Lightning Network Integration
Component Relationships
User Interface Layer
↓
Features Layer (3_features)
↓
Entities Layer (4_entities)
↓
Shared Layer (5_shared)
↓
External Services
Specific Implementation Details
Create sections for:
a) Frontend Architecture:
• Next.js Pages Router
• React Components Structure
• State Management
• API Integration Layer
b) Authentication Flow:
• Auth Provider
• JWT Token Management
• Interceptors
c) Bitcoin Integration:
• Lightning Network Connection
• Wallet Management
• Transaction Processing
Important Notes
• Clear separation between client-side and server-side components
• Authentication flow
• Demonstrate the payment processing flow
• Relationship with GitHub integration
• How the bounty system interacts with both users and repositories
Technical Stack Indicators
Technology badges for:
• Next.js
• TypeScript
• Bitcoin Lightning Network
• REST API
• CSS Modules
Data Flow Representation
• Payment flows (thick lines)