Initial commit: Lightning Lottery - Bitcoin Lightning Network powered lottery

Features:
- Lightning Network payments via LNbits integration
- Provably fair draws using CSPRNG
- Random ticket number generation
- Automatic payouts with retry/redraw logic
- Nostr authentication (NIP-07)
- Multiple draw cycles (hourly, daily, weekly, monthly)
- PostgreSQL and SQLite database support
- Real-time countdown and payment animations
- Swagger API documentation
- Docker support

Stack:
- Backend: Node.js, TypeScript, Express
- Frontend: Next.js, React, TailwindCSS, Redux
- Payments: LNbits
This commit is contained in:
Michilis
2025-11-27 22:13:37 +00:00
commit d3bf8080b6
75 changed files with 18184 additions and 0 deletions

40
front_end/env.example Normal file
View File

@@ -0,0 +1,40 @@
# Lightning Lottery Frontend - Environment Configuration
# Copy this file to .env.local and fill in your values
# ======================
# Server Configuration
# ======================
# Port for Next.js development server (default: 3001)
PORT=3001
# ======================
# API Configuration
# ======================
# Backend API base URL
# Development: http://localhost:3000
# Production: https://api.yourdomain.com
NEXT_PUBLIC_API_BASE_URL=http://localhost:3000
# Frontend application base URL
# Development: http://localhost:3001
# Production: https://yourdomain.com
NEXT_PUBLIC_APP_BASE_URL=http://localhost:3001
# Backend API fallback port used when the frontend is accessed via a non-localhost host
# Keep at 3000 if you run the API on the default dev port
NEXT_PUBLIC_BACKEND_PORT=3000
# ======================
# Optional: Admin Configuration
# ======================
# Only needed if you want to use admin features from the frontend
# NEXT_PUBLIC_ADMIN_KEY=your_admin_api_key_here
# ======================
# Notes
# ======================
# - Copy this file to .env.local for local development
# - All variables that need to be accessible in the browser must start with NEXT_PUBLIC_
# - Never expose sensitive keys in production frontend
# - PORT is read by the npm scripts to set the dev server port
# - Restart the dev server after changing .env.local