Compare commits
2 Commits
f028168106
...
4af91c1603
| Author | SHA1 | Date | |
|---|---|---|---|
| 4af91c1603 | |||
| 8dbf7b02e7 |
123
README.md
123
README.md
@@ -1,108 +1,95 @@
|
|||||||
# vps/fleet
|
# vps/fleet
|
||||||
|
|
||||||
> A self-hosted VPS fleet tracker with a dark GitHub-style UI, interactive map, and zero-config local storage.
|
> A self-hosted VPS fleet manager — track every server you own in one dark, minimal dashboard.
|
||||||
|
|
||||||

|
[](https://nodejs.org)
|
||||||

|
[](https://expressjs.com)
|
||||||

|
[](LICENSE)
|
||||||

|
[](https://github.com/your-username/vps-manager)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Fleet overview** — live stats for total servers, online / offline / maintenance counts, and total monthly spend
|
- 📊 **Fleet stats** — live totals for online / offline / maintenance counts and monthly spend
|
||||||
- **Server cards** — glanceable cards showing name, IP, status dot, CPU / RAM / disk chips, and price
|
- 🃏 **Server cards** — status dot, IP, CPU · RAM · Disk chips, and price at a glance
|
||||||
- **Add · Edit · Delete** — modal form with full field set: provider, plan, specs, IPv4/IPv6, location, region, sites, notes
|
- ✏️ **Full CRUD** — add, edit, and delete servers via a clean modal form
|
||||||
- **Interactive map** — Leaflet.js world map; server locations are geocoded automatically via OpenStreetMap
|
- 🗺️ **Interactive map** — Leaflet.js world map; locations geocoded automatically via OpenStreetMap
|
||||||
- **Persistent storage** — flat-file JSON, no database required
|
- 💾 **Zero-config storage** — flat-file JSON, no database, no migrations
|
||||||
- **Dark theme** — GitHub-flavored dark palette (`#0d1117`) with IBM Plex Mono / Sans typography
|
- 🌑 **Dark theme** — GitHub-style `#0d1117` palette with IBM Plex Mono / Sans
|
||||||
- **Single HTML file** — no bundler, no framework, no build step
|
- 📄 **Single HTML file** — no bundler, no framework, no build step
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
| Dependency | Version |
|
| Dependency | Version |
|
||||||
| ---------- | -------------------- |
|
| ---------- | ------------------ |
|
||||||
| Node.js | 18 or higher |
|
| Node.js | 18 or higher |
|
||||||
| npm | included with Node |
|
| npm | included with Node |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Installation
|
## Quick Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Clone the repo
|
|
||||||
git clone https://github.com/your-username/vps-manager.git
|
git clone https://github.com/your-username/vps-manager.git
|
||||||
cd vps-manager
|
cd vps-manager
|
||||||
|
|
||||||
# 2. Install dependencies
|
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# 3. Start the server
|
|
||||||
npm start
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
Then open `http://localhost:8095` in your browser.
|
Open `http://localhost:8095` in your browser.
|
||||||
|
|
||||||
> **Windows:** double-click `start.bat` instead of step 3.
|
> **Windows** — double-click `start.bat`
|
||||||
>
|
>
|
||||||
> **Linux / macOS:** run `chmod +x start.sh && ./start.sh` instead of step 3.
|
> **Linux / macOS** — `chmod +x start.sh && ./start.sh`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Adding a server
|
**Add a server** — click **+ Add Server** in the top-right corner. Only the hostname is required; all other fields are optional. Enter a location and a map pin is placed automatically.
|
||||||
|
|
||||||
Click **+ Add Server** in the top-right corner. Fill in any combination of fields — only the name is required. If you enter a location, coordinates are resolved automatically and a pin is placed on the map.
|
**Edit** — click the pencil icon on any card to reopen the form pre-filled with its data.
|
||||||
|
|
||||||
### Editing a server
|
**Delete** — click the trash icon on any card. The change is saved immediately.
|
||||||
|
|
||||||
Click the **pencil icon** on any server card to reopen the form pre-filled with its data.
|
**Map view** — switch to the map tab to see all geocoded servers plotted on a world map. Click a pin for a quick summary.
|
||||||
|
|
||||||
### Deleting a server
|
|
||||||
|
|
||||||
Click the **trash icon** on a server card. The change is saved immediately.
|
|
||||||
|
|
||||||
### Map view
|
|
||||||
|
|
||||||
The map tab shows all servers that have a resolvable location. Click any pin to see a summary popup.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
The Express server exposes a simple REST API on port `8095`.
|
All data is served over a local REST API on port `8095`.
|
||||||
|
|
||||||
| Method | Endpoint | Description |
|
| Method | Endpoint | Description |
|
||||||
| -------- | ------------------ | -------------------------------------------------- |
|
| ---------- | ------------------ | -------------------------------------------------- |
|
||||||
| `GET` | `/api/servers` | Return all servers |
|
| `GET` | `/api/servers` | Return all servers |
|
||||||
| `POST` | `/api/servers` | Create or update a server (include `id` to update) |
|
| `POST` | `/api/servers` | Create or update a server (`id` present = update) |
|
||||||
| `DELETE` | `/api/servers/:id` | Delete a server by ID |
|
| `DELETE` | `/api/servers/:id` | Delete a server by ID |
|
||||||
|
|
||||||
### Server object
|
### Server object
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"id": "srv_1700000000000",
|
"id": "srv_1700000000000",
|
||||||
"name": "prod-app-01",
|
"name": "prod-app-01",
|
||||||
"status": "online",
|
"status": "online",
|
||||||
"ipv4": "203.0.113.42",
|
"ipv4": "203.0.113.42",
|
||||||
"ipv6": "2001:db8::1",
|
"ipv6": "2001:db8::1",
|
||||||
"provider": "DigitalOcean",
|
"provider": "DigitalOcean",
|
||||||
"plan": "s-2vcpu-4gb",
|
"plan": "s-2vcpu-4gb",
|
||||||
"cpu": "2",
|
"cpu": "2",
|
||||||
"ram": "4",
|
"ram": "4",
|
||||||
"disk": "80",
|
"disk": "80",
|
||||||
"price": "24.00",
|
"price": "24.00",
|
||||||
"billing": "monthly",
|
"billing": "monthly",
|
||||||
"renewal": "2026-07-01",
|
"renewal": "2026-07-01",
|
||||||
"location": "Toronto, Canada",
|
"location": "Toronto, Canada",
|
||||||
"region": "ca-central",
|
"region": "ca-central",
|
||||||
"sites": "myapp.example.com",
|
"sites": "myapp.example.com",
|
||||||
"notes": "Primary application node"
|
"notes": "Primary application node"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -110,9 +97,9 @@ The Express server exposes a simple REST API on port `8095`.
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
| Variable | Default | Description |
|
| Variable | Default | Description |
|
||||||
| -------- | ------- | ---------------------------- |
|
| -------- | ------- | -------------------------- |
|
||||||
| `PORT` | `8095` | Port the server listens on |
|
| `PORT` | `8095` | Port the server listens on |
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
PORT=3000 npm start
|
PORT=3000 npm start
|
||||||
@@ -120,21 +107,21 @@ PORT=3000 npm start
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Project structure
|
## Project Structure
|
||||||
|
|
||||||
```text
|
```text
|
||||||
vps-manager/
|
vps-manager/
|
||||||
├── server.js # Express server + REST API + geocoding
|
├── server.js # Express server · REST API · geocoding
|
||||||
├── vps_manager.html # Complete UI (HTML + CSS + JS, single file)
|
├── vps_manager.html # Full UI — HTML + CSS + JS in one file
|
||||||
├── package.json # Dependencies
|
├── package.json # Dependencies
|
||||||
├── start.bat # Windows one-click launcher
|
├── start.bat # Windows launcher
|
||||||
├── start.sh # Linux / macOS one-click launcher
|
├── start.sh # Linux / macOS launcher
|
||||||
└── data/
|
└── data/
|
||||||
└── servers.json # Auto-created on first run
|
└── servers.json # Auto-created on first run (gitignored)
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
Released under the [MIT License](LICENSE).
|
||||||
|
|||||||
Reference in New Issue
Block a user