app/: production port — Postgres + Prisma + OTM-account auth (v0.2.0)
Prototype stays untouched (Bonna's laptop daily driver until cutover). app/ is the deployable bms-backbone: same routes/frontend, Prisma models replacing node:sqlite, session-cookie login backed by a User table seeded via the platform SEED_OWNER_* convention (bcryptjs), /api/health with APP_VERSION, photos/files under DATA_DIR (/app/data uploads mount), Dockerfile + entrypoint (prisma db push + owner seed + serve), and a one-shot sqlite→postgres migration script for Bonna's existing data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
47
app/public/login.html
Normal file
47
app/public/login.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>🌙 Studio Notebook — sign in</title>
|
||||
<style>
|
||||
:root { --bg: #fdf7f2; --card: #fff; --ink: #4a3b47; --plum: #8d6b94; --plum-deep: #6e4f78;
|
||||
--blush-deep: #c98da8; --line: #eddfe3; }
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: "Avenir Next", "Nunito", "Trebuchet MS", sans-serif; background: var(--bg);
|
||||
color: var(--ink); min-height: 100vh; display: grid; place-items: center; }
|
||||
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 20px;
|
||||
padding: 34px 36px; width: min(92vw, 380px); box-shadow: 0 4px 16px rgba(141,107,148,0.1); }
|
||||
h1 { font-family: Georgia, serif; font-size: 24px; color: var(--plum-deep); margin-bottom: 4px; }
|
||||
.sub { color: #9c8698; font-size: 14px; font-style: italic; font-family: Georgia, serif; margin-bottom: 22px; }
|
||||
label { display: block; font-size: 12px; font-weight: 700; color: var(--blush-deep);
|
||||
text-transform: uppercase; letter-spacing: 0.08em; margin: 14px 0 5px; }
|
||||
input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 15px;
|
||||
font-size: 15px; background: var(--bg); color: var(--ink); font-family: inherit; }
|
||||
button { width: 100%; margin-top: 22px; border: none; border-radius: 12px; padding: 13px;
|
||||
font-size: 15px; font-weight: 700; cursor: pointer; background: var(--plum); color: #fff; font-family: inherit; }
|
||||
.err { color: #b3556b; font-size: 13.5px; margin-top: 12px; min-height: 18px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<h1>🌙 Studio Notebook</h1>
|
||||
<div class="sub">welcome back to the studio</div>
|
||||
<form id="f">
|
||||
<label>Email</label><input type="email" id="email" autocomplete="username" required>
|
||||
<label>Password</label><input type="password" id="password" autocomplete="current-password" required>
|
||||
<button type="submit">Sign in</button>
|
||||
<div class="err" id="err"></div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("f").addEventListener("submit", async (e) => {
|
||||
e.preventDefault();
|
||||
const r = await fetch("/api/login", { method: "POST", headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ email: email.value, password: password.value }) }).then((x) => x.json());
|
||||
if (r.ok) location.href = "/";
|
||||
else document.getElementById("err").textContent = r.error || "sign-in failed";
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user