Multi-tenant SaaS platform that connects to Lightning Network nodes (LND) via a local agent and analyzes channel liquidity, routing performance, and rebalance opportunities.
Fully functional MVP with:
- Multi-tenant authentication (JWT)
- Node registration with agent tokens
- Agent ingestion API for Lightning node data
- Liquidity scoring engine
- Rebalance planner
- Dashboard with overview, channels, opportunities
- Alerts engine
- React frontend with all pages
- Backend: Java 19 (GraalVM), Spring Boot 3.2.2, JPA/Hibernate
- Frontend: React (Vite), react-router-dom
- Database: PostgreSQL (Replit built-in)
- Auth: JWT with BCrypt password hashing
- API Docs: SpringDoc OpenAPI (Swagger UI at /swagger-ui.html)
backend/
src/main/java/com/lli/
config/ - SecurityConfig, DataSeeder, GlobalExceptionHandler
controller/ - REST controllers (Auth, Node, Ingest, Dashboard, Rebalance, Alert)
dto/ - Request/Response data transfer objects (records)
model/ - JPA entities (Account, User, Membership, Node, Channel, snapshots, etc.)
repository/ - Spring Data JPA repositories
scheduler/ - Scoring scheduler (hourly)
security/ - JWT utilities, auth filter, UserPrincipal
service/ - Business logic (Auth, Node, Ingest, Dashboard, Scoring, Alert, Rebalance)
src/main/resources/
application.properties
frontend/
src/
api.js - API client with JWT auth
App.jsx - Main app with routing
App.css - Dark theme styles
pages/ - Login, Nodes, NodeDashboard, Channels, Opportunities, RebalancePlans, Alerts
accounts, users, memberships, nodes, node_snapshots, channels, channel_snapshots, rebalance_plans, rebalance_plan_items, alerts, audit_logs
- Backend:
cd backend && mvn spring-boot:run - Frontend:
cd frontend && npm run dev - Backend runs on port 8080, frontend on port 5000 (proxies API to backend)
- Email: demo@lli.com
- Password: demo123
- Demo agent token: demo-agent-token
- POST /api/auth/register, /api/auth/login
- GET/POST /api/nodes
- POST /api/nodes/{id}/generate-token
- POST /api/ingest/v1/node/{nodeId} (agent token via X-Agent-Token header)
- GET /api/nodes/{id}/overview, /channels, /opportunities, /alerts
- POST/GET /api/nodes/{id}/rebalance-plans
- Dark theme with purple/blue accent colors
- Clean, modern dashboard design
- No heavy UI frameworks needed
- 2026-02-21: Initial build - full MVP implementation