← back to Slack Idea Board
Add basic auth gate for public exposure at ideas.agentabrams.com
372781ed15ff71ddafb7e843443cd1a9ac904013 · 2026-07-13 14:48:03 -0700 · Steve
Files touched
M public/index.htmlM server.js
Diff
commit 372781ed15ff71ddafb7e843443cd1a9ac904013
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Jul 13 14:48:03 2026 -0700
Add basic auth gate for public exposure at ideas.agentabrams.com
---
public/index.html | 17 +++++++++++++++++
server.js | 12 ++++++++++++
2 files changed, 29 insertions(+)
diff --git a/public/index.html b/public/index.html
index f0e6aee..3739a53 100644
--- a/public/index.html
+++ b/public/index.html
@@ -43,6 +43,23 @@
.filters button{background:var(--chip);color:var(--dim);border:1px solid var(--line);border-radius:999px;
padding:3px 11px;font-size:12px;cursor:pointer}
.filters button.on{background:var(--gold);color:#1a1a1a;border-color:var(--gold);font-weight:700}
+ /* per-card action buttons — one row of actions per card, matched to the step colorway */
+ .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
+ .act{appearance:none;cursor:pointer;font:inherit;font-weight:700;font-size:12.5px;line-height:1;
+ border-radius:7px;padding:8px 12px;border:1px solid transparent;color:#0f1117;transition:filter .12s,transform .05s}
+ .act:hover{filter:brightness(1.08)} .act:active{transform:translateY(1px)}
+ .act.build{background:#3b6fd0;color:#fff} .act.skill{background:#8a5cd0;color:#fff}
+ .act.agent{background:var(--gold);color:#1a1a1a}
+ .act.open{background:transparent;color:#7db4ff;border-color:var(--line);font-weight:600}
+ .act.skip{background:var(--chip);color:var(--dim);border-color:var(--line);font-weight:600;cursor:default}
+ .act.copied{background:var(--yes)!important;color:#0f1117!important}
+ /* toast */
+ #toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%) translateY(20px);
+ background:var(--panel);border:1px solid var(--line);border-left:3px solid var(--yes);
+ color:var(--text);padding:11px 16px;border-radius:8px;font-size:13px;max-width:min(560px,90vw);
+ box-shadow:0 8px 30px rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:50}
+ #toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
+ #toast b{color:var(--gold)} #toast code{color:var(--dim);font-size:11.5px;word-break:break-all}
</style>
</head>
<body>
diff --git a/server.js b/server.js
index 90bfcb7..4dc168a 100644
--- a/server.js
+++ b/server.js
@@ -14,6 +14,17 @@ const STEVE = ENV.STEVE_USER_ID;
const PORT = parseInt(process.env.PORT || '9820', 10);
const OLLAMA = process.env.OLLAMA_URL || 'http://localhost:11434';
const MODEL = process.env.OLLAMA_MODEL || 'hermes3:8b';
+// Basic auth — internal Slack-feed board, gated when public at ideas.agentabrams.com.
+// Override with BASIC_AUTH="user:pass"; set BASIC_AUTH="" to disable (localhost-only use).
+const BASIC_AUTH = process.env.BASIC_AUTH === undefined ? 'admin:DW2024!' : process.env.BASIC_AUTH;
+function authed(req) {
+ if (!BASIC_AUTH) return true; // auth disabled
+ const h = req.headers['authorization'] || '';
+ const m = h.match(/^Basic\s+(.+)$/i);
+ if (!m) return false;
+ let dec = ''; try { dec = Buffer.from(m[1], 'base64').toString('utf8'); } catch { return false; }
+ return dec === BASIC_AUTH;
+}
const CACHE_FILE = path.join(DIR, 'data', 'enrich.json');
const CHAN_NAME = { 'C09SW7VQ0RK': 'claude-to-steve', 'C0BGQ2QLR35': 'claude-chat' };
@@ -131,6 +142,7 @@ async function drain() {
const server = http.createServer(async (req, res) => {
try {
+ if (!authed(req)) { res.writeHead(401, { 'WWW-Authenticate': 'Basic realm="Idea Board"' }); return res.end('auth required'); }
if (req.url === '/favicon.ico' || req.url === '/apple-touch-icon.png') { res.writeHead(204); return res.end(); } // no icon → 204 (not a 404 console error)
if (req.url.startsWith('/api/ideas')) {
const ideas = await collectIdeas();
← e4dabd8 5x: report — 2 clean sweeps, favicon-404 fixed (67e25ed)
·
back to Slack Idea Board
·
idea-board: per-card action buttons driven by next_step (Add 433194c →