feat(board): Lightning-paid message board with LNbits and admin moderation
Add public /board flow: create invoice, webhook + confirm reconciliation, list active messages, likes (Nostr), zap fallbacks. Admin table for hide/delete. Include LNbits webhook body normalization (double-encoded JSON), POST /api/messages/confirm/:hash, and root npm db:push script. Prisma models for pending invoices and board messages. Made-with: Cursor
This commit is contained in:
@@ -147,3 +147,27 @@ model Faq {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
/// Pending Lightning invoice metadata (message is created only after payment via webhook).
|
||||
model BoardInvoicePending {
|
||||
paymentHash String @id
|
||||
content String
|
||||
guestName String?
|
||||
pubkey String?
|
||||
profilePic String?
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
/// Paid board message (LNbits payment confirmed).
|
||||
model BoardMessage {
|
||||
id String @id @default(uuid())
|
||||
paymentHash String @unique
|
||||
content String
|
||||
authorName String
|
||||
pubkey String?
|
||||
profilePic String?
|
||||
satsPaid Int
|
||||
status String @default("active") // active, hidden, deleted
|
||||
likeCount Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user