# A Network Discovery App for MSP Client Onboarding

> A Node.js tool to automate nmap scans, whois lookups, and DNS queries during MSP onboarding. Built for the Raspberry Pi with Fastify and Solid.js.

- Author: Brian Kimball
- Published: 2022-08-12
- Tags: development, solidjs, fastify
- Canonical: https://brian-kimball.com/blog/network-mapper/
- Markdown: https://brian-kimball.com/blog/network-mapper/index.md

[Github Repo](https://github.com/bskimball/network-mapper)

## Preface

For Managed Service Providers (MSPs), gathering detailed network information during client onboarding is critical. This process is usually time-consuming and non-billable. To solve this, I built a Node.js application to automate routine discovery tasks.

The concept is simple: install the app on a Raspberry Pi, connect it to the prospective client's network, and initiate a scan. The app runs `nmap` to discover local devices and performs `whois` lookups on configured domains. It also queries DNS records (like MX records) to identify email providers. Technicians can then submit the gathered data to a central repository via a form.

## Technical Decisions

**Architecture**

I built this as a monolithic JavaScript application using ESM imports, with no server-side compilation step. It connects to a PostgreSQL database running in Docker.

**Stack**

I prioritized performance and speed.

- **Server:** [Fastify](https://fastify.io/), for its low overhead.
- **UI:** [Solid.js](https://www.solidjs.com/), for its fine-grained reactivity and small bundle size.

This minimal full-stack JavaScript setup is highly efficient. The frontend consumes a REST API from Fastify, while WebSockets push live scan updates to the client.
