The SharkNet Manager (SNM) Web Application is a web-based management layer built on top of the SharkNet peer-to-peer communication framework. Its primary goal is to expose core SharkNet functionality, traditionally accessed via a command-line interface, through a structured, persistent, and user-friendly web interface and REST API.
The application enables users to create, manage, and switch between SharkNet peers, interact with ASAP hubs, inspect messaging channels, and control runtime behavior without directly invoking CLI commands. It bridges the gap between SharkNet’s low-level runtime model and modern web-based system interaction.
Make sure the following are installed on your machine:
- Java JDK 17+
- Maven 3.8+
- Apache Tomcat 9 or 10
- Git
- Unix-based OS (Linux / macOS) or WSL on Windows
git clone https://github.com/beingbiplov/SNM-Webapp
cd snm-webappMake sure Tomcat is installed and accessible.
By default, the project expects Tomcat at:
/opt/tomcat
If your Tomcat is installed elsewhere, update the path in:
build.sh
start.sh
stop.sh
logs.sh
./scripts/build.shUse the provided script:
./scripts/start.shWhat this does:
- Builds the project
- Stops Tomcat if already running
- Deploys the WAR file
- Starts Tomcat
Once started, the app is available at:
http://localhost:8080/snm-webapp/
./scripts/stop.shThis shuts down Tomcat gracefully.
./scripts/logs.shThis tails the Tomcat logs so you can see runtime output, peer lifecycle events, and shutdown hooks.
- Peers are restored from disk on server startup
- No peer is active by default
- A user selects a peer via API → peer becomes active
- Only one peer is active at a time
- Switching peers automatically:
- Stops the currently active peer
- Closes all TCP ports
- Activates the selected peer
- On server shutdown:
- All peers are stopped
- All TCP ports are closed gracefully
Peer-related data is stored under:
./data/<peerName>/
Peer IDs remain stable across restarts.