A modern, powerful web interface for managing MikroTik RouterOS devices.
Built with React + Go, deployable anywhere β including directly on your MikroTik router.
Features β’ Quick Start β’ Docker β’ RouterOS Install β’ API Docs β’ Contributing
|
Live system metrics, CPU/memory usage, traffic monitoring, and interface status at a glance. Complete interface configuration, ARP tables, IP addressing, routing, and DHCP management. Full management of IPsec, L2TP, PPTP, WireGuard, OpenVPN, and SSTP tunnels with client monitoring. WiFi interface control, security profiles, connected clients, and signal monitoring. |
Filter rules, NAT configuration, mangle rules, and connection tracking with visual rule editor. Network scanning to auto-detect MikroTik devices across subnets with service identification. Execute bulk commands with progress tracking, dry-run mode, and automatic rollback on failure. Connect via REST API, RouterOS API (8728/8729), SSH, or Telnet with automatic fallback. |
The fastest way to get started is using the pre-configured DevContainer. It includes all dependencies and tools ready to go.
Requirements: Docker Desktop + VS Code with Dev Containers extension
# Clone the repository
git clone https://github.com/nasnet-community/nasnet-panel.git
cd nasnet-panel
# Open in VS Code
code .
# When prompted, click "Reopen in Container"
# Or: Ctrl+Shift+P β "Dev Containers: Reopen in Container"The DevContainer automatically:
- Installs Node.js 20, Go 1.24+, and all dependencies
- Configures VS Code extensions (ESLint, Prettier, Go, GraphQL)
- Sets up Docker-in-Docker for RouterOS testing
- Starts in under 60 seconds with pre-built image
Once inside the container:
npm run dev:all # Start frontend (5173) + backend (8080)Troubleshooting: See .devcontainer/TROUBLESHOOTING.md for platform-specific issues.
- Node.js 20+ and npm
- Go 1.24+ (for backend development)
- Git
# Clone the repository
git clone https://github.com/nasnet-community/nasnet-panel.git
cd nasnet-panel
# Install dependencies
npm install
# Start development servers
npm run devThe application will start at http://localhost:5173 and automatically open in your browser.
# Start both frontend and backend
npm run dev:allNote: The backend (ROSProxy) runs at
localhost:8080with the frontend automatically proxying API requests.
This is an Nx monorepo with strict library boundaries enforced via ESLint.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β APPLICATIONS β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββββββ β
β β connect β β backend β β star-setup-* β β
β β (React) β β (Go) β β (Setup Wizards) β β
β ββββββββ¬βββββββ βββββββββββββββ βββββββββββββββββββββββββββ β
βββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β LIBRARIES β
β ββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β features/ - Feature modules (dashboard, firewall, logs...) ββ
β ββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ββββββββΌβββββββββ ββββββββββββββ ββββββββββββββββ β
β β ui/ β β api-client/β β state/ β β
β β (primitives, β β (core, β β (stores) β β
β β patterns, β β queries) β β β β
β β layouts) β βββββββ¬βββββββ ββββββββ¬ββββββββ β
β βββββββββ¬ββββββββ β β β
β βββββββββΌββββββββββββββββΌββββββββββββββββΌββββββββ β
β β core/ (types, utils, constants) β β
β βββββββββββββββββββββββββ¬ββββββββββββββββββββββββ β
β βββββββββββββββββββββββββΌββββββββββββββββββββββββ β
β β shared/ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Can Import From |
|---|---|
apps/ |
features, ui, core, api-client, state, shared |
features/ |
ui, core, api-client, state, shared (NOT other features) |
ui/ |
core, shared |
api-client/ |
core, shared |
state/ |
core, api-client, shared |
core/ |
shared only |
shared/ |
nothing (base layer) |
Click to expand full directory structure
nasnet/
βββ apps/
β βββ connect/ # Main React frontend (Vite)
β β βββ src/
β β β βββ app/ # Pages, routes, providers
β β β βββ lib/ # App-specific utilities
β β βββ vite.config.ts
β βββ backend/ # Go backend (REST proxy, scanner)
β β βββ *.go # API handlers, clients
β β βββ Dockerfile # Multi-arch container build
β βββ star-setup-web/ # Setup wizard (web)
β βββ star-setup-docker/ # Setup wizard (container)
β
βββ libs/
β βββ api-client/
β β βββ core/ # Axios HTTP client, interceptors
β β βββ queries/ # TanStack Query hooks per domain
β βββ core/
β β βββ types/ # Shared TypeScript interfaces
β β βββ utils/ # Pure utility functions
β β βββ constants/ # App constants
β βββ features/ # Feature modules
β β βββ dashboard/ # Dashboard widgets
β β βββ firewall/ # Firewall rule management
β β βββ logs/ # System log viewer
β β βββ wireless/ # WiFi interface management
β β βββ router-discovery/ # Network scanner UI
β β βββ configuration-import/ # Config import wizard
β βββ state/
β β βββ stores/ # Zustand stores (theme, connection, router)
β βββ ui/
β βββ primitives/ # shadcn/ui base components (~40)
β βββ patterns/ # Composite reusable components (~56)
β βββ layouts/ # Page layouts and shells
β
βββ shared/ # Cross-cutting shared code
βββ .github/workflows/ # CI/CD pipelines
βββ nx.json # Nx workspace configuration
βββ package.json # Root package with workspaces
| Alias | Maps To |
|---|---|
@nasnet/core/* |
libs/core/*/src |
@nasnet/ui/* |
libs/ui/*/src |
@nasnet/features/* |
libs/features/*/src |
@nasnet/api-client/* |
libs/api-client/*/src |
@nasnet/state/* |
libs/state/*/src |
Custom Nx generators are available for scaffolding code following project conventions:
# Generate a React component with tests and barrel export
nx g @nasnet/tools:component MyComponent --project=connect
# Generate a new library with proper scope tags
nx g @nasnet/tools:library my-lib --directory=libs/features
# Generate a Go GraphQL resolver
nx g @nasnet/tools:resolver InterfaceAll generators support --dry-run for previewing changes. See
tools/generators/README.md for full documentation.
# Pull and run (host network for router access)
docker run -d --name nasnet --network=host stargazer5361/nnc:latest
# Or with Docker Compose
docker compose up -dversion: '3.8'
services:
nasnet:
image: stargazer5361/nnc:latest
container_name: nasnet
network_mode: host
environment:
- PORT=80
restart: unless-stopped# Build multi-arch image
npm run docker:local
# Build and export as tarball (for RouterOS)
npm run docker:exportDeploy NasNetConnect directly on your MikroTik router using RouterOS containers.
Requirements: RouterOS v7.x with Container package, external storage recommended
/system/device-mode/update container=yes
Confirm on device (reset button or cold reboot on x86)
# Create virtual interface
/interface veth add name=veth1 address=192.168.50.2/24 gateway=192.168.50.1
# Create container bridge
/interface bridge add name=containers
/ip address add address=192.168.50.1/24 interface=containers
/interface bridge port add bridge=containers interface=veth1
# Enable NAT
/ip firewall nat add chain=srcnat action=masquerade src-address=192.168.50.0/24
/container/config set registry-url=https://ghcr.io tmpdir=disk1/tmp
# Add container
/container/add remote-image=ghcr.io/nasnet-community/nasnet-panel:latest interface=veth1 \
root-dir=disk1/images/nnc name=nnc start-on-boot=yes logging=yes
# Wait for download, then start
/container/start nnc
Access NasNetConnect at http://192.168.50.2 (or your configured veth address).
Additional RouterOS Tips
# Limit container RAM
/container/config/set memory-high=200M
# Open shell in container
/container/shell nnc
# View container logs
/container/set [find where name=nnc] logging=yes
ROSProxy provides a REST API for all router management operations.
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Server health, memory, uptime |
/api/router/proxy |
POST | Proxy requests to RouterOS |
/api/scan |
POST | Start subnet scan |
/api/scan/auto |
POST | Auto-scan gateway addresses |
/api/scan/status |
GET | Get scan progress/results |
/api/batch/jobs |
POST | Create batch command job |
/api/batch/jobs/{id} |
GET | Get job status |
Example: Proxy Request to Router
curl -X POST http://localhost:8080/api/router/proxy \
-H "Content-Type: application/json" \
-d '{
"router_ip": "192.168.88.1",
"endpoint": "/system/resource",
"method": "GET",
"headers": {
"Authorization": "Basic YWRtaW46cGFzc3dvcmQ="
}
}'Example: Batch Command Execution
curl -X POST http://localhost:8080/api/batch/jobs \
-H "Content-Type: application/json" \
-d '{
"router_ip": "192.168.88.1",
"username": "admin",
"password": "secret",
"protocol": "api",
"commands": [
"/interface bridge add name=bridge1",
"/interface bridge port add bridge=bridge1 interface=ether2"
],
"dry_run": false,
"rollback_enabled": true
}'π Full API Documentation: apps/backend/README.md
| Script | Description |
|---|---|
npm run dev |
Start frontend dev server (Vite) |
npm run dev:with-backend |
Start frontend + backend |
npm run build |
Build production bundle |
npm run ci |
Run all CI checks (lint, test, build, typecheck) |
npm run lint |
Lint all projects |
npm run typecheck |
TypeScript type checking |
npm run docker:local |
Build Docker image locally |
npm run docker:export |
Export Docker image as tarball |
Create apps/connect/.env.development:
VITE_API_URL=http://localhost:8080
VITE_WS_URL=ws://localhost:8080# Run all tests
npx nx run-many -t test
# Run specific project tests
npx nx test connect
npx nx test backend
# E2E tests
npx nx e2e connect-e2eContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style (Prettier + ESLint)
- Write tests for new features
- Update documentation as needed
- Use conventional commit messages
This project is licensed under the MIT License - see the LICENSE file for details.