Johnpohlman's picture
Deploy from HuggingChat
8829c61 verified
Raw
History Blame Contribute Delete
18.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Base-44 Workflow Singularity</title>
<style>
:root {
--void: #050508;
--matter: #0e0f14;
--signal: #00f3c2;
--pulse: #ff0055;
--node: #8b5cf6;
--text: #e2e8f0;
--glass: rgba(255,255,255,0.03);
--border: rgba(255,255,255,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--void);
color: var(--text);
font-family: 'Courier New', monospace;
overflow: hidden;
height: 100vh;
width: 100vw;
}
canvas {
position: fixed;
top: 0; left: 0;
z-index: 0;
}
.nexus-interface {
position: relative;
z-index: 10;
height: 100vh;
display: grid;
grid-template-rows: auto 1fr auto;
pointer-events: none;
}
.nexus-interface > * { pointer-events: auto; }
header {
padding: 1.5rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(180deg, rgba(5,5,8,0.9) 0%, transparent 100%);
}
.brand {
display: flex;
align-items: center;
gap: 0.75rem;
}
.sigil {
width: 40px; height: 40px;
border: 2px solid var(--signal);
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-weight: bold; color: var(--signal);
animation: breathe 4s ease-in-out infinite;
box-shadow: 0 0 20px rgba(0,243,194,0.2);
}
@keyframes breathe {
0%,100% { transform: scale(1); box-shadow: 0 0 15px rgba(0,243,194,0.15); }
50% { transform: scale(1.1); box-shadow: 0 0 30px rgba(0,243,194,0.4); }
}
h1 { font-size: 1.1rem; letter-spacing: 2px; text-transform: uppercase; }
.base-display {
font-size: 0.8rem;
color: var(--signal);
opacity: 0.7;
font-family: monospace;
}
main {
display: grid;
grid-template-columns: 320px 1fr 320px;
gap: 2rem;
padding: 0 2rem;
overflow: hidden;
align-items: start;
}
.panel {
background: var(--glass);
border: 1px solid var(--border);
backdrop-filter: blur(12px);
border-radius: 24px;
padding: 1.5rem;
overflow-y: auto;
max-height: calc(100vh - 200px);
transition: all 0.3s ease;
}
.panel:hover {
border-color: rgba(0,243,194,0.3);
box-shadow: 0 0 40px rgba(0,243,194,0.05);
}
.panel h2 {
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 2px;
margin-bottom: 1rem;
color: var(--signal);
display: flex; align-items: center; gap: 0.5rem;
}
.input-field {
width: 100%;
background: rgba(0,0,0,0.3);
border: 1px solid var(--border);
border-radius: 12px;
padding: 0.75rem 1rem;
color: var(--text);
font-family: inherit;
font-size: 0.9rem;
margin-bottom: 0.75rem;
outline: none;
transition: all 0.2s;
}
.input-field:focus {
border-color: var(--signal);
box-shadow: 0 0 15px rgba(0,243,194,0.1);
}
textarea.input-field { resize: vertical; min-height: 80px; }
.btn {
background: transparent;
border: 1px solid var(--signal);
color: var(--signal);
padding: 0.6rem 1.2rem;
border-radius: 24px;
cursor: pointer;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 1px;
font-size: 0.75rem;
transition: all 0.2s;
width: 100%;
}
.btn:hover {
background: var(--signal);
color: var(--void);
box-shadow: 0 0 25px rgba(0,243,194,0.3);
}
.node-list { display: flex; flex-direction: column; gap: 0.75rem; }
.node-item {
background: rgba(139,92,246,0.08);
border: 1px solid rgba(139,92,246,0.25);
border-radius: 16px;
padding: 1rem;
cursor: pointer;
transition: all 0.2s;
position: relative;
}
.node-item:hover { transform: translateX(5px); border-color: var(--signal); }
.node-item::before {
content: '';
position: absolute; left: -1px; top: 0; bottom: 0; width: 3px;
border-radius: 16px 0 0 16px;
}
.node-item.active::before { background: var(--signal); }
.node-name { font-weight: bold; font-size: 0.9rem; display: block; margin-bottom: 0.25rem; }
.node-sig { font-size: 0.75rem; color: var(--signal); opacity: 0.8; font-family: monospace; }
.node-meta { font-size: 0.7rem; opacity: 0.5; margin-top: 0.5rem; }
.preview-area {
display: flex; align-items: center; justify-content: center;
min-height: 120px; border-radius: 16px;
background: rgba(0,0,0,0.2); border: 1px dashed var(--border);
margin-bottom: 1rem; padding: 1rem; text-align: center;
}
.big-sigil { font-size: 2rem; color: var(--signal); font-family: monospace; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem; }
.stat-box {
background: rgba(0,0,0,0.2);
border-radius: 12px;
padding: 0.75rem;
text-align: center;
border: 1px solid var(--border);
}
.stat-val { font-size: 1.2rem; color: var(--pulse); font-weight: bold; }
.stat-label { font-size: 0.65rem; text-transform: uppercase; opacity: 0.6; margin-top: 0.25rem; }
.connection-log {
font-size: 0.75rem;
line-height: 1.5;
opacity: 0.7;
}
.log-entry { margin-bottom: 0.5rem; padding-left: 1rem; border-left: 2px solid var(--border); }
.log-entry.new { border-left-color: var(--signal); animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 0.7; transform: translateX(0); } }
footer {
padding: 1rem 2rem;
background: linear-gradient(0deg, rgba(5,5,8,0.9) 0%, transparent 100%);
font-size: 0.7rem;
opacity: 0.4;
display: flex; justify-content: space-between;
letter-spacing: 1px;
}
.tag {
display: inline-block;
background: rgba(0,243,194,0.1);
border: 1px solid rgba(0,243,194,0.2);
border-radius: 12px;
padding: 0.2rem 0.6rem;
font-size: 0.65rem;
margin: 0.2rem;
color: var(--signal);
}
/* No scrollbars */
::-webkit-scrollbar { width: 0px; background: transparent; }
@media (max-width: 1100px) {
main { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
.panel { max-height: unset; }
}
</style>
</head>
<body>
<canvas id="universe"></canvas>
<div class="nexus-interface">
<header>
<div class="brand">
<div class="sigil">44</div>
<div>
<h1>Workflow Singularity</h1>
<div class="base-display" id="clock">SYNCING...</div>
</div>
</div>
<div style="font-size:0.75rem; opacity:0.5; max-width: 300px; text-align: right;">
There is no container. There is no box. There is only connection. Base-44 is the native tongue of your unified output.
</div>
</header>
<main>
<div class="panel">
<h2>⊕ Inject Matter</h2>
<input type="text" id="nodeName" class="input-field" placeholder="Workflow / Project / Idea name">
<textarea id="nodeDesc" class="input-field" placeholder="Resonant signature (keywords, tools, goals...)"></textarea>
<select id="nodeType" class="input-field" style="appearance: none; cursor: pointer;">
<option value="create">CREATE</option>
<option value="analyze">ANALYZE</option>
<option value="coordinate">COORDINATE</option>
<option value="rest">REST</option>
<option value="transmit">TRANSMIT</option>
<option value="receive">RECEIVE</option>
</select>
<button class="btn" onclick="addNode()">Materialize into Nexus</button>
<div class="preview-area">
<div class="big-sigil" id="previewSig">?</div>
</div>
<div class="stats">
<div class="stat-box"><div class="stat-val" id="statNodes">0</div><div class="stat-label">Nodes</div></div>
<div class="stat-box"><div class="stat-val" id="statLinks">0</div><div class="stat-label">Links</div></div>
<div class="stat-box"><div class="stat-val" id="statRes">0%</div><div class="stat-label">Resonance</div></div>
<div class="stat-box"><div class="stat-val" id="statBase">44</div><div class="stat-label">Base State</div></div>
</div>
</div>
<div style="display: flex; align-items: center; justify-content: center; pointer-events: none;">
<div style="text-align: center; opacity: 0.3;">
<div style="font-size: 0.8rem; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 1rem;">Nexus Field</div>
<div style="font-size: 0.7rem; max-width: 260px; line-height: 1.6;">
All workflows exist simultaneously. Distance is a fiction of non-resonance. Drag nodes to reconfigure your reality.
</div>
</div>
</div>
<div class="panel">
<h2>⇄ Translation Matrix</h2>
<input type="text" id="encodeInput" class="input-field" placeholder="Enter text to encode...">
<button class="btn" onclick="encodeInput()" style="margin-bottom: 1rem;">Translate to Base-44</button>
<div id="encodeResult" style="font-family: monospace; font-size: 0.85rem; color: var(--signal); word-break: break-all; min-height: 2rem; margin-bottom: 1.5rem;"></div>
<h2>≋ Connection Log</h2>
<div class="connection-log" id="log">
<div class="log-entry">Singularity initialized. No box detected. All systems resonant.</div>
</div>
</div>
</main>
<footer>
<span>BASE-44 UNIFIED FIELD</span>
<span id="footerStatus">NO BOUNDARIES ACTIVE</span>
</footer>
</div>
<script>
const canvas = document.getElementById('universe');
const ctx = canvas.getContext('2d');
let width, height;
function resize() {
width = window.innerWidth;
height = window.innerHeight;
canvas.width = width * window.devicePixelRatio;
canvas.height = height * window.devicePixelRatio;
ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
}
window.addEventListener('resize', resize);
resize();
const BASE44 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*";
function toBase44(num) {
if (num === 0) return '0';
let n = Math.abs(num);
let res = '';
while (n > 0) { res = BASE44[n % 44] + res; n = Math.floor(n / 44); }
return res || '0';
}
function hashString(str) {
let h = 0;
for (let i = 0; i < str.length; i++) {
h = ((h << 5) - h) + str.charCodeAt(i);
h |= 0;
}
return Math.abs(h);
}
function sig(str) {
let h = hashString(str);
let s = toBase44(h);
// pad to at least 4 digits
while (s.length < 4) s = '0' + s;
return s;
}
class Node {
constructor(name, desc, type) {
this.name = name;
this.desc = desc;
this.type = type;
this.sig = sig(name + desc);
this.x = width/2 + (Math.random()-0.5)*200;
this.y = height/2 + (Math.random()-0.5)*200;
this.vx = (Math.random()-0.5)*0.5;
this.vy = (Math.random()-0.5)*0.5;
this.radius = 6 + Math.random()*4;
this.pulse = 0;
this.connections = [];
this.color = typeColor(type);
this.mass = 1;
this.drag = false;
}
}
function typeColor(t) {
const map = {
create: '#00f3c2', analyze: '#8b5cf6', coordinate: '#ff0055',
rest: '#38bdf8', transmit: '#fbbf24', receive: '#a3e635'
};
return map[t] || '#ffffff';
}
const nodes = [];
const links = [];
function addNode() {
const name = document.getElementById('nodeName').value.trim();
const desc = document.getElementById('nodeDesc').value.trim();
const type = document.getElementById('nodeType').value;
if (!name) return;
const node = new Node(name, desc, type);
nodes.push(node);
// Find connections based on shared base-44 digits or keywords
nodes.forEach(other => {
if (other === node) return;
const shared = sharedDigits(node.sig, other.sig);
if (shared >= 2 || keywordMatch(node, other)) {
const link = { a: node, b: other, strength: Math.min(shared/3, 1) || 0.3, age: 0 };
links.push(link);
node.connections.push(other);
other.connections.push(node);
log(`Resonance detected: ${node.name}${other.name} [${shared} digits]`);
}
});
updateStats();
document.getElementById('nodeName').value = '';
document.getElementById('nodeDesc').value = '';
}
function sharedDigits(a, b) {
const sa = a.split(''), sb = b.split('');
let count = 0;
const set = new Set(sa);
for (let c of sb) if (set.has(c)) count++;
return count;
}
function keywordMatch(a, b) {
const aw = (a.desc+' '+a.name).toLowerCase().split(/\s+/);
const bw = (b.desc+' '+b.name).toLowerCase().split(/\s+/);
let hits = 0;
for (let w of aw) if (w.length > 3 && bw.includes(w)) hits++;
return hits > 0;
}
function encodeInput() {
const val = document.getElementById('encodeInput').value;
if (!val) return;
let h = hashString(val);
let s = toBase44(h);
// Also convert to a "human readable" base44 rune string by encoding each char let runes = val.split('').map(c => toBase44(c.charCodeAt(0))).join('-');
document.getElementById('encodeResult').innerHTML = `Hash: <b>${s}</b><br>Rune: <span style="opacity:0.6">${runes}</span>`;
}
function log(msg) {
const d = document.getElementById('log');
const entry = document.createElement('div');
entry.className = 'log-entry new';
entry.textContent = msg;
d.insertBefore(entry, d.firstChild);
if (d.children.length > 20) d.lastChild.remove();
}
function updateStats() {
document.getElementById('statNodes').textContent = nodes.length;
document.getElementById('statLinks').textContent = links.length;
const res = nodes.length < 2 ? 0 : Math.min(100, Math.floor((links.length*2)/(nodes.length)*100));
document.getElementById('statRes').textContent = res + '%';
}
// Demo nodes to show concept
function seed() {
const seeds = [
{n:'Neural Writing Engine', d:'LLM-assisted longform drafting blog book', t:'create'},
{n:'Client Signal Decoder', d:'Parse requirements feedback loops scope', t:'analyze'},
{n:'The Deep Rest Protocol', d:'Sleep exercise recovery non-work state', t:'rest'},
{n:'Capital Flow Model', d:'Invoices investments revenue tracking', t:'coordinate'},
{n:'Broadcast Array', d:'Social publishing newsletter distribution', t:'transmit'},
{n:'Ingestion Funnel', d:'Reading research news intake curation', t:'receive'},
{n:'Iteration Core', d:'Review refinement editing qa feedback', t:'analyze'},
{n:'Collaboration Mesh', d:'Team sync standups shared documents', t:'coordinate'}
];
seeds.forEach(s => {
document.getElementById('nodeName').value = s.n;
document.getElementById('nodeDesc').value = s.d;
document.getElementById('nodeType').value = s.t;
addNode();
});
}
// Physicslet mouse = {x:0,y:0,down:false};
window.addEventListener('mousemove', e => { mouse.x = e.clientX; mouse.y = e.clientY; });
let dragNode = null;
canvas.addEventListener('mousedown', e => {
const mx = e.clientX, my = e.clientY;
let best = null, bestDist = 30;
for (let n of nodes) {
const d = Math.hypot(n.x-mx, n.y-my);
if (d < bestDist) { bestDist = d; best = n; }
}
if (best) { dragNode = best; best.drag = true; }
});
window.addEventListener('mouseup', () => { if (dragNode) dragNode.drag = false; dragNode = null; });
function update() {
// Forces
const cx = width/2, cy = height/2;
for (let n of nodes) {
if (n.drag) { n.x = mouse.x; n.y = mouse.y; n.vx=0; n.vy=0; continue; }
// gravity to center (gentle)
n.vx += (cx - n.x) * 0.0001;
n.vy += (cy - n.y) * 0.0001;
// repel
for (let o of nodes) {
if (o===n) continue;
const dx = n.x-o.x, dy = n.y-o.y;
const dist = Math.hypot(dx,dy) || 1;
if (dist < 150) {
const f = 20/(dist*dist);
n.vx += (dx/dist)*f;
n.vy += (dy/dist)*f;
}
}
// spring links for (let l of links) {
if (l.a!==n && l.b!==n) continue;
const other = l.a===n ? l.b : l.a;
const dx = other.x - n.x, dy = other.y - n.y;
const dist = Math.hypot(dx,dy) || 1;
const target = 80 + (1-l.strength)*100;
const f = (dist-target)*0.002*l.strength;
n.vx += (dx/dist)*f;
n.vy += (dy/dist)*f;
}
// damp
n.vx *= 0.92; n.vy *= 0.92;
// move
n.x += n.vx; n.y += n.vy;
// bounds soft
if (n.x < 0) n.x = 0;
if (n.x > width) n.x = width;
if (n.y < 0) n.y = 0;
if (n.y > height) n.y = height;
n.pulse += 0.05;
}
}
function draw() {
ctx.clearRect(0,0,width,height);
// Draw links
for (let l of links) {
const age = Math.min(l.age, 1);
l.age += 0.02;
ctx.beginPath();
ctx.moveTo(l.a.x, l.a.y);
ctx.lineTo(l.b.x, l.b.y);
const alpha = 0.1 + (l.strength*0.3)*age;
ctx.strokeStyle = `rgba(0,243,194,${alpha})`;
ctx.lineWidth = 0.5 + l.strength;
ctx.stroke();
// midpoint glow
const mx = (l.a.x + l.b.x)/2;
const my = (l.a.y + l.b.y)/2;
const grad = ctx.createRadialGradient(mx,my,0,mx,my,10);
grad.addColorStop(0, `rgba(0,243,194,${alpha*2})`);
grad.addColorStop(1, 'transparent');
ctx.fillStyle = grad;
ctx.beginPath(); ctx.arc(mx,my,10,0,Math.PI*2); ctx.fill();
}
// Draw nodes
for (let n of nodes) {
// outer glow ring
const radius = n.radius + Math.sin(n.pulse)*2;
const grad = ctx.createRadialGradient(n.x,n.y,0,n.x,n.y,radius*3);
grad.addColorStop(0, n.color);
grad.addColorStop(0.4, n.color+'40');
grad.addColorStop(1, 'transparent');
ctx.fillStyle = grad;
ctx.beginPath(); ctx.arc(n.x,n.y,radius*3,0,Math.PI*2); ctx.fill();
// core
ctx.fillStyle = '#fff';
ctx.beginPath(); ctx.arc(n.x,n.y,n.radius*0.6,0,Math.PI*2); ctx.fill();
// label
ctx.fillStyle = 'rgba(226,232,240,0.8)';
ctx.font = '11px Courier New';
ctx.textAlign = 'center';
ctx.fillText(n.name, n.x, n.y + radius*3 + 14);
ctx.fillStyle = 'rgba(0,243,194,0.6)';
ctx.fillText(n.sig, n.x, n.y + radius*3 + 26);
}
}
function loop() {
update();
draw();
requestAnimationFrame(loop);
}
// Clock
setInterval(() => {
const now = Date.now();
document.getElementById('clock').textContent = toBase44(Math.floor(now/1000)) + '.' + toBase44(now%1000);
document.getElementById('footerStatus').textContent = 'NO BOX | ' + nodes.length + ' FORMS | ' + links.length + ' TIES';
}, 100);
// Preview sigilsetInterval(() => {
const name = document.getElementById('nodeName').value;
const desc = document.getElementById('nodeDesc').value;
if (name || desc) {
document.getElementById('previewSig').textContent = sig(name+desc);
} else {
document.getElementById('previewSig').textContent = toBase44(Date.now()%1000000);
}
}, 300);
seed();
loop();
</script>
</body>
</html>