Signed-off-by: ale <ale@manalejandro.com>
Este commit está contenido en:
ale
2025-06-17 00:29:01 +02:00
padre b5e4b9a8ac
commit d59980046b
Se han modificado 10 ficheros con 1048 adiciones y 7 borrados

Ver fichero

@@ -50,23 +50,29 @@ npm install
### Running the Network
1. **Start the first node (Oracle) as bootstrap:**
1. **Start the Dashboard (Optional):**
```bash
npm run start:oracle -- --port 8080
npm run start:dashboard
```
Dashboard available at: http://localhost:3000
2. **Start the first node (Oracle) as bootstrap:**
```bash
npm run start:oracle -- --port 8080 --dashboard http://localhost:3000
```
2. **Start additional nodes:**
3. **Start additional nodes:**
```bash
# Regular node
npm run start:node -- --port 8081 --bootstrap localhost:8080
npm run start:node -- --port 8081 --bootstrap localhost:8080 --dashboard http://localhost:3000
# Another Oracle node
npm run start:oracle -- --port 8082 --bootstrap localhost:8080
npm run start:oracle -- --port 8082 --bootstrap localhost:8080 --dashboard http://localhost:3000
```
3. **Start more nodes:**
4. **Start more nodes:**
```bash
npm run start:node -- --port 8083 --bootstrap localhost:8080
npm run start:node -- --port 8083 --bootstrap localhost:8080 --dashboard http://localhost:3000
```
## 📖 Usage
@@ -77,6 +83,7 @@ npm run start:node -- --port 8083 --bootstrap localhost:8080
--port <port> # Port to listen on (default: random)
--id <id> # Node ID (default: auto-generated UUID)
--bootstrap <addr> # Bootstrap node address (host:port)
--dashboard <url> # Dashboard server URL (default: http://localhost:3000)
--ice-servers <json> # ICE servers configuration (JSON array)
--config <file> # Load configuration from JSON file
--help # Show help message
@@ -211,6 +218,32 @@ The Ring Network now features **automatic node positioning** that optimizes netw
Use the `topology` command in any node to view the current ring structure and positions.
## 📊 Dashboard & Monitoring
The RingNet includes a web-based dashboard for real-time network monitoring:
### Features
- **Real-time Network Statistics**: Total nodes, connections, Oracle nodes
- **Interactive Ring Topology**: Visual representation of the ring structure
- **Node Status Monitoring**: Active/inactive status, connection health
- **REST API**: Programmatic access to network data
### Quick Start
```bash
# Start the dashboard server
npm run start:dashboard
# Dashboard available at: http://localhost:3000
```
### API Endpoints
- `GET /api/nodes` - List all nodes
- `GET /api/network/stats` - Network statistics
- `GET /api/network/topology` - Ring topology data
- `GET /api/nodes/:nodeId` - Node details
See `server/README.md` for complete API documentation.
## 🧪 Testing
Run the test suite to verify network functionality: