LinkerNet is a local network emergency communication system designed to enable real-time chat between devices connected to the same Wi-Fi or LAN, even when internet connectivity is lost. It is ideal for use during disasters and emergency situations, allowing easy, reliable peer communication using a lightweight backend and a responsive web-based frontend.
- Introduction
- Project Structure
- How It Works
- Tech Stack
- Getting Started
- Using LinkerNet on a Local Network
- Chatting Across Devices
- Screenshots
LinkerNet facilitates offline-first, peer-to-peer chat within a local network environment. When traditional communication channels fail during emergencies, LinkerNet allows users to connect via a local Wi-Fi or LAN, share messages in real time, and coordinate relief efforts or share vital information.
LinkerNet/
├── backend/ # Spring Boot backend service
│ ├── src/main/java/
│ │ └── com/LinkerNet/
│ │ ├── LinkerNetApplication.java # Main Spring Boot app
│ │ ├── config/ # Configuration (CORS, WebSocket)
│ │ ├── controller/ # REST and WebSocket controllers
│ │ ├── model/ # JPA entities (Message)
│ │ ├── repository/ # Data access layer
│ │ └── service/ # Business logic layer
│ └── resources/
│ └── application.properties # Application settings (DB, CORS, ports)
├── frontend/ # React frontend app (Vite + Tailwind CSS)
│ ├── src/
│ │ └── App.jsx # React main component with STOMP + SockJS
│ ├── public/ # Public assets
│ ├── index.html # Root HTML
│ └── vite.config.js # Vite config for dev server and build
└── README.md # This file
-
The backend is a Spring Boot application running as a chat server, exposing:
- REST API to fetch chat history (
/api/messages), - WebSocket endpoint
/chatusing STOMP over SockJS for real-time messaging.
- REST API to fetch chat history (
-
The frontend is a React app that:
- Fetches chat history on load,
- Connects to backend WebSocket via SockJS + STOMP,
- Sends/receives chat messages in real time,
- Displays a modern, responsive chat UI.
-
Messages sent from any device are broadcasted to all connected devices on the same network via the local backend server.
-
Backend:
- Java with Spring Boot
- Spring WebSocket with STOMP messaging
- JPA + Hibernate + MySQL for message persistence
- CORS and WebSocket configuration
-
Frontend:
- React
- Vite development server
- Tailwind CSS for styling
@stomp/stompjsclient for STOMP over SockJS WebSocket support- Axios for REST API calls
- Ensure you have Java 17+ and Maven installed.
- Build the backend jar:
mvn clean package - Run the backend server:
java -jar target/disasternet-backend.jar - Backend listens on port 8080 by default.
- Navigate to the frontend directory.
- Install dependencies:
npm install - Start the development server (accessible in browser):
npm run dev - By default, frontend runs on port 5173.
-
Connect all devices (laptop, phones, tablets) to the same Wi-Fi or LAN.
-
Identify your laptop's local IP address (where backend runs):
- On Windows: open Command Prompt, run
ipconfig, find IPv4 address. - On macOS/Linux: run
ifconfigorip a, find local IP.
- On Windows: open Command Prompt, run
-
Update frontend backend connection in
App.jsx:const backendHost = "192.168.x.y"; // Replace with your laptop's IP -
Rebuild frontend if needed and serve it (or run dev server bound to all interfaces).
-
Open browser on phones or other LAN devices:
http://192.168.x.y:5173 -
Devices will connect to the backend server running on the laptop on port 8080 and chat in real time.
- Open the frontend page on all devices.
- Enter a nickname (optional).
- Type messages and send by pressing Enter or Send button.
- Messages appear instantly on all connected devices.
- Messages are stored persistently in the backend’s MySQL database.
- Supports offline-first experience as long as devices remain connected to the same network.
(Add screenshot images of your app here — replace paths with your actual screenshots)
| Chat on Laptop | Chat on Mobile Browser |
|---|---|
![]() |
![]() |
For issues, feature requests, or contributions, please open an issue or pull request on the GitHub repository.
Thank you for using LinkerNet — your reliable local network emergency chat!

