krsyer-server-monitor-pro 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/monitor.js +7 -0
- package/package.json +9 -4
- package/DEPLOY_GUIDE.md +0 -68
- package/bin/cli.js +0 -84
- package/guestguru-api/.idea/guestguru-api.iml +0 -9
- package/guestguru-api/.idea/misc.xml +0 -6
- package/guestguru-api/.idea/modules.xml +0 -8
- package/guestguru-api/.idea/vcs.xml +0 -6
- package/guestguru-api/API_DESIGN_GUIDE.md +0 -140
- package/guestguru-api/API_DOCUMENTATION.md +0 -504
- package/guestguru-api/API_REQUIREMENTS_TENANTS.md +0 -110
- package/guestguru-api/AVAILABLE_TENANT_ENDPOINTS.md +0 -137
- package/guestguru-api/BACKEND_INSTRUCTIONS.md +0 -77
- package/guestguru-api/DINING_MODULE_INTEGRATION.md +0 -175
- package/guestguru-api/FRONTEND_FINANCE_MODULE.md +0 -151
- package/guestguru-api/README.md +0 -93
- package/guestguru-api/app.json +0 -12
- package/guestguru-api/database.sqlite +0 -0
- package/guestguru-api/eas.json +0 -21
- package/guestguru-api/ecosystem.config.js +0 -19
- package/guestguru-api/fix_db_schema.js +0 -77
- package/guestguru-api/list_columns.js +0 -27
- package/guestguru-api/package.json +0 -34
- package/guestguru-api/postman_backend_v2.json +0 -1745
- package/guestguru-api/postman_collection.json +0 -477
- package/guestguru-api/postman_environment.json +0 -17
- package/guestguru-api/public/icon.png +0 -0
- package/guestguru-api/public/icon_b64.txt +0 -1
- package/guestguru-api/readd_column.js +0 -27
- package/guestguru-api/server.js +0 -263
- package/guestguru-api/test_cashfree_connection.js +0 -52
- package/lib/controllers/cloudflareController.js +0 -1
- package/lib/controllers/dockerController.js +0 -1
- package/lib/controllers/networkController.js +0 -1
- package/lib/controllers/serverController.js +0 -1
- package/lib/ecosystem.config.js +0 -1
- package/lib/middleware/saasAuth.js +0 -1
- package/lib/public/login.html +0 -99
- package/lib/public/payment.html +0 -152
- package/lib/public/script.js +0 -1180
- package/lib/public/style.css +0 -1045
- package/lib/routes/cloudflareRoutes.js +0 -1
- package/lib/routes/dockerRoutes.js +0 -1
- package/lib/routes/networkRoutes.js +0 -1
- package/lib/routes/serverRoutes.js +0 -1
- package/lib/server.js +0 -1
- package/lib/services/cashfreeService.js +0 -1
- package/lib/views/activate.html +0 -109
- package/lib/views/index.html +0 -552
- package/license-portal/.env.example +0 -15
- package/license-portal/README.md +0 -93
- package/license-portal/ecosystem.config.js +0 -16
- package/license-portal/package.json +0 -22
- package/license-portal/server.js +0 -306
- package/license-portal/services/emailService.js +0 -126
- package/license-portal/views/pricing.html +0 -358
- package/temp_cf_method.js +0 -48
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>Server Monitor Pro - Professional Server Management</title>
|
|
8
|
-
<script src="https://sdk.cashfree.com/js/v3/cashfree.js"></script>
|
|
9
|
-
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap"
|
|
10
|
-
rel="stylesheet">
|
|
11
|
-
<style>
|
|
12
|
-
:root {
|
|
13
|
-
--primary: #8b5cf6;
|
|
14
|
-
--primary-hover: #7c3aed;
|
|
15
|
-
--secondary: #06b6d4;
|
|
16
|
-
--bg-dark: #0f172a;
|
|
17
|
-
--card-bg: #1e293b;
|
|
18
|
-
--text-main: #f8fafc;
|
|
19
|
-
--text-muted: #94a3b8;
|
|
20
|
-
--accent: #f43f5e;
|
|
21
|
-
--success: #10b981;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
body {
|
|
25
|
-
font-family: 'Space Grotesk', sans-serif;
|
|
26
|
-
background-color: var(--bg-dark);
|
|
27
|
-
color: var(--text-main);
|
|
28
|
-
margin: 0;
|
|
29
|
-
padding: 0;
|
|
30
|
-
line-height: 1.6;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.container {
|
|
34
|
-
max-width: 1200px;
|
|
35
|
-
margin: 0 auto;
|
|
36
|
-
padding: 0 20px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* Hero Section */
|
|
40
|
-
.hero {
|
|
41
|
-
padding: 80px 0 40px;
|
|
42
|
-
text-align: center;
|
|
43
|
-
background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
h1 {
|
|
47
|
-
font-size: 3.5rem;
|
|
48
|
-
margin-bottom: 1rem;
|
|
49
|
-
background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
|
|
50
|
-
-webkit-background-clip: text;
|
|
51
|
-
-webkit-text-fill-color: transparent;
|
|
52
|
-
font-weight: 700;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.tagline {
|
|
56
|
-
font-size: 1.25rem;
|
|
57
|
-
color: var(--secondary);
|
|
58
|
-
margin-bottom: 2rem;
|
|
59
|
-
font-weight: 500;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* Installation Section */
|
|
63
|
-
.install-section {
|
|
64
|
-
background: var(--card-bg);
|
|
65
|
-
border-radius: 16px;
|
|
66
|
-
padding: 40px;
|
|
67
|
-
margin: 40px auto;
|
|
68
|
-
max-width: 800px;
|
|
69
|
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
70
|
-
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.section-title {
|
|
74
|
-
text-align: center;
|
|
75
|
-
font-size: 1.8rem;
|
|
76
|
-
margin-bottom: 30px;
|
|
77
|
-
color: #fff;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.code-block {
|
|
81
|
-
background: #000;
|
|
82
|
-
padding: 20px;
|
|
83
|
-
border-radius: 8px;
|
|
84
|
-
font-family: 'Courier New', monospace;
|
|
85
|
-
color: #4ade80;
|
|
86
|
-
margin-bottom: 15px;
|
|
87
|
-
position: relative;
|
|
88
|
-
border-left: 4px solid var(--primary);
|
|
89
|
-
overflow-x: auto;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.code-comment {
|
|
93
|
-
color: #64748b;
|
|
94
|
-
display: block;
|
|
95
|
-
margin-bottom: 5px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/* Checkout Card */
|
|
99
|
-
.card {
|
|
100
|
-
background: white;
|
|
101
|
-
padding: 2.5rem;
|
|
102
|
-
border-radius: 24px;
|
|
103
|
-
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
|
|
104
|
-
text-align: center;
|
|
105
|
-
width: 100%;
|
|
106
|
-
max-width: 420px;
|
|
107
|
-
margin: 0 auto 60px;
|
|
108
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
109
|
-
position: relative;
|
|
110
|
-
background: linear-gradient(145deg, #1e293b, #0f172a);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.price-tag {
|
|
114
|
-
font-size: 3rem;
|
|
115
|
-
font-weight: 700;
|
|
116
|
-
color: var(--text-main);
|
|
117
|
-
margin: 1.5rem 0;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.price-sub {
|
|
121
|
-
font-size: 1rem;
|
|
122
|
-
color: var(--text-muted);
|
|
123
|
-
font-weight: 400;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
input {
|
|
127
|
-
width: 100%;
|
|
128
|
-
padding: 14px;
|
|
129
|
-
margin: 10px 0;
|
|
130
|
-
border: 1px solid #334155;
|
|
131
|
-
border-radius: 12px;
|
|
132
|
-
box-sizing: border-box;
|
|
133
|
-
background: #0f172a;
|
|
134
|
-
color: white;
|
|
135
|
-
font-family: inherit;
|
|
136
|
-
transition: all 0.3s;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
input:focus {
|
|
140
|
-
outline: none;
|
|
141
|
-
border-color: var(--primary);
|
|
142
|
-
box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
button {
|
|
146
|
-
width: 100%;
|
|
147
|
-
padding: 16px;
|
|
148
|
-
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
|
|
149
|
-
color: white;
|
|
150
|
-
border: none;
|
|
151
|
-
border-radius: 12px;
|
|
152
|
-
font-size: 1.1rem;
|
|
153
|
-
font-weight: 600;
|
|
154
|
-
cursor: pointer;
|
|
155
|
-
transition: transform 0.1s, box-shadow 0.3s;
|
|
156
|
-
margin-top: 10px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
button:hover {
|
|
160
|
-
transform: translateY(-2px);
|
|
161
|
-
box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.secure-badge {
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
gap: 8px;
|
|
169
|
-
margin-top: 20px;
|
|
170
|
-
color: var(--text-muted);
|
|
171
|
-
font-size: 0.9rem;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/* Responsive */
|
|
175
|
-
@media (max-width: 768px) {
|
|
176
|
-
h1 {
|
|
177
|
-
font-size: 2.5rem;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.install-section {
|
|
181
|
-
padding: 20px;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
</style>
|
|
185
|
-
</head>
|
|
186
|
-
|
|
187
|
-
<body>
|
|
188
|
-
|
|
189
|
-
<div class="hero">
|
|
190
|
-
<div class="container">
|
|
191
|
-
<h1>Server Monitor Pro</h1>
|
|
192
|
-
<p class="tagline">The ultimate realtime monitoring solution for your infrastructure.</p>
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
195
|
-
|
|
196
|
-
<div class="container">
|
|
197
|
-
<!-- Installation Guide -->
|
|
198
|
-
<div class="install-section">
|
|
199
|
-
<h2 class="section-title">🚀 Installation Guide</h2>
|
|
200
|
-
|
|
201
|
-
<div class="code-block">
|
|
202
|
-
<span class="code-comment"># 1. Install the package globally</span>
|
|
203
|
-
sudo npm install -g krsyer-server-monitor-pro@latest
|
|
204
|
-
</div>
|
|
205
|
-
|
|
206
|
-
<div class="code-block">
|
|
207
|
-
<span class="code-comment"># 2. Setup the system service</span>
|
|
208
|
-
sudo npx server-monitor setup
|
|
209
|
-
</div>
|
|
210
|
-
|
|
211
|
-
<div class="code-block">
|
|
212
|
-
<span class="code-comment"># 3. Start the monitor</span>
|
|
213
|
-
sudo systemctl restart krsyer-monitor
|
|
214
|
-
</div>
|
|
215
|
-
|
|
216
|
-
<div class="code-block">
|
|
217
|
-
<span class="code-comment"># 4. Verify Autostart (Optional)</span>
|
|
218
|
-
systemctl is-enabled krsyer-monitor
|
|
219
|
-
<span class="code-comment"># Output should be: enabled</span>
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
<p style="text-align: center; color: var(--text-muted); margin-top: 20px;">
|
|
223
|
-
Once installed, visit your server IP on port 3014 to activate.
|
|
224
|
-
</p>
|
|
225
|
-
|
|
226
|
-
<!-- Reinstall Guide -->
|
|
227
|
-
<details
|
|
228
|
-
style="margin-top: 2rem; background: rgba(255,255,255,0.05); padding: 1rem; border-radius: 8px; border: 1px solid #334155;">
|
|
229
|
-
<summary style="cursor: pointer; font-weight: bold; color: #cbd5e1;">🔄 Reinstall / Upgrade Instructions
|
|
230
|
-
</summary>
|
|
231
|
-
|
|
232
|
-
<h3 style="margin-top: 1rem; font-size: 0.95rem; color: #f87171;">1. Remove Existing Installation</h3>
|
|
233
|
-
<div class="code-block" style="font-size: 0.85rem; margin-bottom: 1rem;">
|
|
234
|
-
<span class="code-comment"># Stop & Remove Service</span><br>
|
|
235
|
-
sudo systemctl stop krsyer-monitor<br>
|
|
236
|
-
sudo systemctl disable krsyer-monitor<br>
|
|
237
|
-
sudo rm -f /etc/systemd/system/krsyer-monitor.service<br>
|
|
238
|
-
sudo systemctl daemon-reload<br><br>
|
|
239
|
-
<span class="code-comment"># Remove Package & Config</span><br>
|
|
240
|
-
sudo npm uninstall -g krsyer-server-monitor-pro<br>
|
|
241
|
-
rm -f monitor-config.json
|
|
242
|
-
</div>
|
|
243
|
-
|
|
244
|
-
<h3 style="margin-top: 1rem; font-size: 0.95rem; color: #4ade80;">2. Fresh Installation</h3>
|
|
245
|
-
<div class="code-block" style="font-size: 0.85rem;">
|
|
246
|
-
<span class="code-comment"># Install Latest & Setup</span><br>
|
|
247
|
-
sudo npm install -g krsyer-server-monitor-pro@latest<br>
|
|
248
|
-
sudo npx server-monitor setup<br>
|
|
249
|
-
sudo systemctl start krsyer-monitor
|
|
250
|
-
</div>
|
|
251
|
-
</details>
|
|
252
|
-
</div>
|
|
253
|
-
|
|
254
|
-
<!-- Checkout / License Section -->
|
|
255
|
-
<div class="card">
|
|
256
|
-
<h2 style="margin-top: 0; margin-bottom: 10px;">Get Your License</h2>
|
|
257
|
-
<p style="color: var(--text-muted); margin-bottom: 20px;">Unlimited servers, 1 year updates</p>
|
|
258
|
-
|
|
259
|
-
<div class="price-tag">₹99 <span class="price-sub">/ year</span></div>
|
|
260
|
-
|
|
261
|
-
<input type="email" id="email" placeholder="Email Address" required>
|
|
262
|
-
<input type="tel" id="phone" placeholder="Phone Number" required>
|
|
263
|
-
|
|
264
|
-
<button id="buyBtn">Buy License Now</button>
|
|
265
|
-
|
|
266
|
-
<div class="secure-badge">
|
|
267
|
-
<svg width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
|
268
|
-
<path
|
|
269
|
-
d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z" />
|
|
270
|
-
</svg>
|
|
271
|
-
Secured by Cashfree Payments
|
|
272
|
-
</div>
|
|
273
|
-
</div>
|
|
274
|
-
</div>
|
|
275
|
-
|
|
276
|
-
<style>
|
|
277
|
-
.loader-spinner {
|
|
278
|
-
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
279
|
-
border-top: 2px solid #fff;
|
|
280
|
-
border-radius: 50%;
|
|
281
|
-
width: 16px;
|
|
282
|
-
height: 16px;
|
|
283
|
-
animation: spin 1s linear infinite;
|
|
284
|
-
display: inline-block;
|
|
285
|
-
vertical-align: middle;
|
|
286
|
-
margin-right: 8px;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
@keyframes spin {
|
|
290
|
-
0% {
|
|
291
|
-
transform: rotate(0deg);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
100% {
|
|
295
|
-
transform: rotate(360deg);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
</style>
|
|
299
|
-
|
|
300
|
-
<script>
|
|
301
|
-
const cashfree = Cashfree({
|
|
302
|
-
mode: "production"
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
let isSubmitting = false;
|
|
306
|
-
|
|
307
|
-
document.getElementById('buyBtn').addEventListener('click', async () => {
|
|
308
|
-
if (isSubmitting) return;
|
|
309
|
-
|
|
310
|
-
const email = document.getElementById('email').value;
|
|
311
|
-
const phone = document.getElementById('phone').value;
|
|
312
|
-
const btn = document.getElementById('buyBtn');
|
|
313
|
-
|
|
314
|
-
if (!email || !phone) {
|
|
315
|
-
alert('Please fill in all details');
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
isSubmitting = true;
|
|
320
|
-
btn.innerHTML = '<span class="loader-spinner"></span> Processing...';
|
|
321
|
-
btn.disabled = true;
|
|
322
|
-
|
|
323
|
-
const emailVal = document.getElementById('email').value;
|
|
324
|
-
const phoneVal = document.getElementById('phone').value;
|
|
325
|
-
|
|
326
|
-
try {
|
|
327
|
-
// Create Order
|
|
328
|
-
const res = await fetch('/api/buy', {
|
|
329
|
-
method: 'POST',
|
|
330
|
-
headers: { 'Content-Type': 'application/json' },
|
|
331
|
-
body: JSON.stringify({ email: emailVal, phone: phoneVal })
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
if (!res.ok) {
|
|
335
|
-
const errData = await res.json().catch(() => ({}));
|
|
336
|
-
throw new Error(errData.message || errData.error || `Server Error ${res.status}`);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
const data = await res.json();
|
|
340
|
-
|
|
341
|
-
if (data.payment_session_id) {
|
|
342
|
-
const cf = new Cashfree(data.payment_session_id);
|
|
343
|
-
cf.redirect();
|
|
344
|
-
} else {
|
|
345
|
-
throw new Error(data.message || 'No payment session ID returned');
|
|
346
|
-
}
|
|
347
|
-
} catch (e) {
|
|
348
|
-
console.error(e);
|
|
349
|
-
alert('Connection Error: ' + e.message + '. Ensure server is running on port 3011 and you are accessing via http://localhost:3011');
|
|
350
|
-
isSubmitting = false;
|
|
351
|
-
btn.innerHTML = 'Buy License Now';
|
|
352
|
-
btn.disabled = false;
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
</script>
|
|
356
|
-
</body>
|
|
357
|
-
|
|
358
|
-
</html>
|
package/temp_cf_method.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* List active tunnels via CLI
|
|
3
|
-
* GET /api/cloudflare/tunnels
|
|
4
|
-
*/
|
|
5
|
-
exports.listTunnels = async (req, res) => {
|
|
6
|
-
try {
|
|
7
|
-
let output;
|
|
8
|
-
try {
|
|
9
|
-
// Try normal execution first
|
|
10
|
-
output = await runCommand('cloudflared tunnel list');
|
|
11
|
-
} catch (e) {
|
|
12
|
-
// Try sudo if permission denied or other error
|
|
13
|
-
console.warn('Standard list failed, trying sudo...', e.message);
|
|
14
|
-
output = await runSudo('cloudflared tunnel list');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (!output) {
|
|
18
|
-
return res.json({ status: 'success', tunnels: [] });
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Parse Output
|
|
22
|
-
// Format: ID NAME CREATED CONNECTIONS
|
|
23
|
-
const lines = output.trim().split('\n');
|
|
24
|
-
const tunnels = [];
|
|
25
|
-
|
|
26
|
-
// Start from index 1 to skip header, but check header content to be sure
|
|
27
|
-
lines.forEach((line, index) => {
|
|
28
|
-
const parts = line.trim().split(/\s+/);
|
|
29
|
-
// Heuristic: UUID is usually first (36 chars), Name is second
|
|
30
|
-
// Or look for Header "NAME"
|
|
31
|
-
if (parts.length < 2) return;
|
|
32
|
-
|
|
33
|
-
// Skip Header line
|
|
34
|
-
if (parts[0] === 'ID' || parts[1] === 'NAME') return;
|
|
35
|
-
|
|
36
|
-
// Extract Name (2nd column)
|
|
37
|
-
// Example: 8282... test-tunnel 2023...
|
|
38
|
-
const name = parts[1];
|
|
39
|
-
if (name) tunnels.push(name);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
res.json({ status: 'success', tunnels });
|
|
43
|
-
|
|
44
|
-
} catch (error) {
|
|
45
|
-
console.error('Failed to list tunnels:', error);
|
|
46
|
-
res.status(500).json({ status: 'error', message: error.message });
|
|
47
|
-
}
|
|
48
|
-
};
|