feat(web): Nightjar web app - Plaud-style record/transcribe/summarise UI
A runnable, self-hosted web interface so the whole workflow can be tested end to end: record or upload audio in the browser, watch it transcribe and summarise, browse a library, play back, and export. What changed: - server/app/store.py: SQLite + on-disk audio storage for recordings (stdlib only). - server/app/pipeline.py: background task audio -> transcribe -> summarise via the existing provider layer, updating status (queued/transcribing/summarising/done/error). - server/app/main.py: web API - POST upload, list, detail, audio (Range), delete, and export (txt/md/srt/vtt/json) - and serves the SPA at /. - server/app/web/: Plaud-style single-page UI (index.html, styles.css, app.js). Sidebar library, in-browser recording (MediaRecorder) + file upload, live status polling, audio player, summary (overview/key points/actions), timestamped transcript, exports. - server/Dockerfile + README: two-minute run instructions (default provider: Groq free tier for both Whisper + LLM), and a Docker option. - config: env prefix switched OPENSCRIBE_ -> NIGHTJAR_ to match the brand and the site tutorials; .env.example rewritten with a ready Groq quick-start. - state/TODO: web app recorded as done. Why: - User asked for a Plaud-like web interface to test how it all works. Nothing testable existed before (marketing site is a brochure; pipeline was unwired). This delivers a real, runnable product demo and effectively lands M5/M6 for the HTTP providers. Notes: - Slim by design: AI is offloaded to the configured provider, so no local ML deps needed for the demo. Byte-compiles clean; JS passes node --check. Local faster-whisper still needs its model (M5) for the fully-offline path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b9e56d0825
commit
19c3e156a0
10 changed files with 501 additions and 76 deletions
54
server/app/web/styles.css
Normal file
54
server/app/web/styles.css
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/* SPDX-License-Identifier: GPL-3.0-only - Nightjar web UI */
|
||||
:root{
|
||||
--ink:#0e1116; --panel:#161b22; --panel2:#1c2230; --line:#2a3140; --text:#e8edf4;
|
||||
--muted:#93a0b4; --accent:#e0894e; --accent2:#5fc7bf; --ok:#3fb950; --bad:#f85149;
|
||||
--sans:ui-sans-serif,system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
|
||||
--mono:ui-monospace,"Cascadia Code",Consolas,monospace;
|
||||
}
|
||||
*{box-sizing:border-box} html,body{height:100%}
|
||||
body{margin:0;font-family:var(--sans);color:var(--text);background:var(--ink);}
|
||||
.topbar{display:flex;align-items:center;justify-content:space-between;height:56px;padding:0 18px;border-bottom:1px solid var(--line);background:rgba(14,17,22,.8);backdrop-filter:blur(8px);position:sticky;top:0;z-index:5}
|
||||
.brand{font-weight:800;letter-spacing:.3px;display:flex;align-items:center;gap:10px}
|
||||
.brand .dot{width:12px;height:12px;border-radius:50%;background:radial-gradient(circle at 40% 40%,var(--accent2),transparent 70%),var(--accent);box-shadow:0 0 12px rgba(95,199,191,.6)}
|
||||
.providers{font-family:var(--mono);font-size:.72rem;color:var(--muted)}
|
||||
.layout{display:grid;grid-template-columns:320px 1fr;height:calc(100vh - 56px)}
|
||||
.sidebar{border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;background:var(--panel)}
|
||||
.actions{display:flex;gap:8px;padding:14px}
|
||||
.btn{cursor:pointer;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:10px;padding:9px 14px;font-weight:600;font-size:.92rem;text-align:center;flex:1;transition:.14s}
|
||||
.btn:hover{border-color:var(--accent)}
|
||||
.btn.primary{background:linear-gradient(135deg,var(--accent),#d1783c);border:none;color:#14100a}
|
||||
.btn.recording{background:var(--bad);color:#fff;animation:pulse 1.4s infinite}
|
||||
@keyframes pulse{50%{opacity:.6}}
|
||||
.rec-timer{padding:0 14px 8px;color:var(--bad);font-family:var(--mono);font-size:.8rem}
|
||||
.list{list-style:none;margin:0;padding:6px;overflow-y:auto;flex:1}
|
||||
.item{padding:11px 12px;border-radius:10px;cursor:pointer;border:1px solid transparent}
|
||||
.item:hover{background:var(--panel2)}
|
||||
.item.sel{background:var(--panel2);border-color:var(--accent)}
|
||||
.item .t{font-weight:600;font-size:.94rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||
.item .m{display:flex;gap:8px;align-items:center;margin-top:3px;color:var(--muted);font-size:.76rem}
|
||||
.badge{font-size:.68rem;padding:1px 7px;border-radius:999px;border:1px solid var(--line);font-family:var(--mono)}
|
||||
.badge.done{color:var(--ok);border-color:#2ea04355}
|
||||
.badge.error{color:var(--bad);border-color:#f8514955}
|
||||
.badge.proc{color:var(--accent2);border-color:#5fc7bf55}
|
||||
.detail{overflow-y:auto;padding:26px 30px}
|
||||
.empty{max-width:460px;margin:12vh auto 0;text-align:center;color:var(--muted)}
|
||||
.empty h2{color:var(--text)}
|
||||
.head h1{margin:0 0 4px;font-size:1.5rem}
|
||||
.head .sub{color:var(--muted);font-size:.85rem;display:flex;gap:10px;align-items:center;margin-bottom:16px}
|
||||
audio{width:100%;margin:6px 0 20px}
|
||||
.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin-bottom:18px}
|
||||
.card h3{margin:0 0 10px;font-size:1.05rem}
|
||||
.card ul{margin:6px 0 0;padding-left:18px;color:#d7deea}
|
||||
.card li{margin:4px 0}
|
||||
.overview{color:#d7deea;line-height:1.6}
|
||||
.seg{display:flex;gap:12px;padding:6px 0;border-bottom:1px solid #1f2733}
|
||||
.seg .ts{font-family:var(--mono);color:var(--accent2);font-size:.78rem;min-width:64px;padding-top:2px}
|
||||
.seg .tx{color:#cdd6e2;line-height:1.5}
|
||||
.exports{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
|
||||
.exports a{font-size:.82rem;text-decoration:none;color:var(--text);border:1px solid var(--line);border-radius:8px;padding:6px 11px}
|
||||
.exports a:hover{border-color:var(--accent)}
|
||||
.spinner{display:inline-block;width:14px;height:14px;border:2px solid var(--line);border-top-color:var(--accent2);border-radius:50%;animation:spin .8s linear infinite;vertical-align:-2px}
|
||||
@keyframes spin{to{transform:rotate(360deg)}}
|
||||
.right{margin-left:auto}
|
||||
.link-danger{color:var(--bad);cursor:pointer;font-size:.82rem;background:none;border:none}
|
||||
@media(max-width:720px){.layout{grid-template-columns:1fr}.sidebar{display:none}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue