Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Local Network Manager [LNM]

A full-stack web app to scan your local network, view device details, and connect remotely via SSH (browser terminal) or RDP (launches Windows Remote Desktop).

Stack: Next.js (TypeScript) · FastAPI (Python) · python-nmap · paramiko · xterm.js


Features

  • 🔍 Network Scan — Two-phase scan: ping sweep + port check (SSH, RDP, HTTP)
  • 🖥️ Device Grid — Cards showing IP, hostname, MAC, vendor, and open ports
  • 🔐 Browser SSH Terminal — Full xterm.js terminal over WebSocket (paramiko backend)
  • 🖥️ RDP Launcher — Shows connection info + launches mstsc.exe directly
  • 📊 Live Stats — Device count, SSH/RDP availability at a glance

Prerequisites

Tool Purpose Install
Node.js 18+ Next.js frontend winget install OpenJS.NodeJS
Python 3.10+ FastAPI backend winget install Python.Python.3.12

ℹ️ Note on Scanning: The backend utilizes the python-nmap package. If the system nmap binary isn't available, it gracefully falls back to a fast, built-in native Python socket and ARP-based network scanner.


Installation & Setup

1. Clone the repository

git clone https://github.com/Elmerized/LocalNetworkManager.git
cd LocalNetworkManager

2. Backend setup

cd backend

# Create and activate a virtual environment
python -m venv venv
venv\Scripts\activate       # Windows
# source venv/bin/activate  # macOS/Linux

# Install dependencies
pip install -r requirements.txt

# Copy env file
copy .env.example .env

3. Frontend setup

cd ../frontend
npm install

Running the App

Open two terminals:

Terminal 1 — Backend:

cd backend
venv\Scripts\activate
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Terminal 2 — Frontend:

cd frontend
npm run dev

Then open http://localhost:3000 in your browser.


Usage

  1. Open the app — the backend status indicator (top right) should show API Online
  2. Click 🔍 Scan Network — the scan takes ~15–30 seconds
  3. Devices appear as cards with their IP, hostname, MAC, vendor, and open ports
  4. Click 🔐 SSH on any card → enter credentials → get a full browser terminal
  5. Click 🖥️ RDP → copy the connection string or click Launch RDP to open mstsc.exe

Project Structure

LocalNetworkManager/
├── backend/
│   ├── main.py          # FastAPI app & routes
│   ├── scanner.py       # Two-phase nmap network scanner
│   ├── ssh_handler.py   # paramiko SSH ↔ WebSocket proxy
│   ├── rdp_handler.py   # mstsc.exe launcher
│   ├── requirements.txt
│   └── .env
└── frontend/
    ├── app/
    │   ├── page.tsx     # Main dashboard
    │   ├── layout.tsx
    │   └── globals.css
    └── components/
        ├── DeviceCard.tsx
        ├── SSHTerminal.tsx
        └── RDPModal.tsx

API Endpoints

Method Path Description
GET /api/devices Return cached device list
POST /api/scan/start Start background network scan
GET /api/scan/status Scan progress + current devices
POST /api/rdp/launch Launch mstsc.exe for an IP
GET /api/rdp/info/{ip} RDP connection details
WS /ws/ssh/{ip} WebSocket SSH terminal proxy

Interactive API docs: http://localhost:8000/docs

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages