Dockerised FastAPI web app that sizes a VM for a selection of Federated Computer apps (Base/Good/Better/Best tiers or custom) and prices it across 14 cloud providers and ~250 regions, grouped by continent. - Sizing model per app with shared databases, headroom and disk growth - Live pricing from Vultr, Akamai/Linode and Azure (DigitalOcean and Hetzner with tokens); dated catalog for the rest - Hand-maintained Contabo price sheet with editor and table paste, including the one-time setup fee - HIPAA/SOC2/PCI DSS/GDPR status, SMTP port 25, IPv4 and egress notes - Estimated latency to 40 cities, real RTT via Globalping probes - Versioned REST API (/api/v1) with OpenAPI docs and CSV export - Accounts with admin/user roles, first admin from ADMIN_USERNAME / ADMIN_PASSWORD, per-account API keys, SQLite storage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.8 KiB
HTML
46 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Sign in: Coremarket</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body class="login-page">
|
|
<form id="loginForm" class="card login-card">
|
|
<h1>Coremarket</h1>
|
|
<p class="muted small">Sign in to size and price Federated Core VMs.</p>
|
|
<label>Username <input id="username" name="username" autocomplete="username" required autofocus></label>
|
|
<label>Password <input id="password" name="password" type="password" autocomplete="current-password" required></label>
|
|
<p id="loginErr" class="err small" role="alert"></p>
|
|
<button type="submit" id="loginBtn">Sign in</button>
|
|
<p class="muted small">No account? Ask your Coremarket administrator.</p>
|
|
</form>
|
|
<script>
|
|
"use strict";
|
|
const form = document.getElementById("loginForm");
|
|
form.onsubmit = async (e) => {
|
|
e.preventDefault();
|
|
const btn = document.getElementById("loginBtn"), err = document.getElementById("loginErr");
|
|
btn.disabled = true; err.textContent = "";
|
|
try {
|
|
const r = await fetch("/api/v1/auth/login", {
|
|
method: "POST", headers: { "Content-Type": "application/json" },
|
|
body: JSON.stringify({ username: form.username.value.trim(), password: form.password.value }),
|
|
});
|
|
if (!r.ok) {
|
|
let msg = "Sign-in failed.";
|
|
try { msg = (await r.json()).detail || msg; } catch (_) {}
|
|
throw new Error(typeof msg === "string" ? msg : "Sign-in failed.");
|
|
}
|
|
const next = new URLSearchParams(location.search).get("next") || "/";
|
|
location.href = next.startsWith("/") && !next.startsWith("//") ? next : "/";
|
|
} catch (ex) {
|
|
err.textContent = ex.message.charAt(0).toUpperCase() + ex.message.slice(1);
|
|
form.password.value = ""; form.password.focus();
|
|
} finally { btn.disabled = false; }
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>
|