AI Engineering Workspace
PartialChat, files, terminal and preview in one place. Chat sessions run on a durable Postgres-backed queue (chat only: no tools or shell). Live models need an API key; the terminal is unavailable.
Project files
read-onlyapp/scripts/build-brand.mjs
1// Builds the versioned Zloud brand kit (v2) into app/public/brand (served live) and design/brand/v2 (published evidence).2// Source of authority: the owner's Cloud Z Ribbon brand board. The board is a ~300px raster, so the SVG marks here are a VECTOR REDRAW3// (not the original vector); PNG crops come straight from the board. Both are labelled as such in the manifest.4import fs from "node:fs"; import path from "node:path"; import crypto from "node:crypto"; import { createRequire } from "node:module";5const require = createRequire(import.meta.url); const sharp = require("sharp");6const board = process.argv[2]; if (!board || !fs.existsSync(board)) { console.error("usage: build-brand.mjs <board.png>"); process.exit(1); }7const root = path.resolve(import.meta.dirname, "../.."); const pub = path.join(root, "app/public/brand"); const pubd = path.join(root, "design/brand/v2");8for (const d of [pub, pubd]) fs.mkdirSync(d, { recursive: true });9const NAVY = "#0B1220", G = ["#00E6C3", "#00B2FF", "#4F46FF", "#A855F7"];10const grad = (id, x1 = 0, y1 = 0, x2 = 1, y2 = 1) => `<linearGradient id="${id}" x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}">${G.map((c, i) => `<stop offset="${i / 3}" stop-color="${c}"/>`).join("")}</linearGradient>`;11// Mark geometry (512x512 box): cloud ring + Z ribbon.12const CLOUD = "M146 400C86 400 48 358 48 304C48 256 82 222 128 216C134 146 188 96 254 96C314 96 364 134 376 190C428 192 464 236 464 292C464 352 422 400 364 400Z";13const Z = "M178 196H338Q362 196 346 214L240 318H336Q362 318 344 340L330 352H180Q158 352 176 332L284 226H184Q160 226 178 196Z";14const mark = (o = {}) => { const { cloud = "url(#g1)", z = "url(#g2)", sw = 40 } = o; return `<path d="${CLOUD}" fill="none" stroke="${cloud}" stroke-width="${sw}" stroke-linejoin="round" stroke-linecap="round"/><path d="${Z}" fill="${z}"/>`; };15const svg = (w, h, vb, body, extra = "") => `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="${vb}" role="img" aria-label="Zloud">${extra}${body}</svg>\n`;16const defs = `<defs>${grad("g1")}${grad("g2", 0, 1, 1, 0)}</defs>`;17const files = {};18files["zloud-mark.svg"] = svg(512, 512, "0 0 512 512", mark(), defs); // full colour, transparent19files["zloud-mark-mono.svg"] = svg(512, 512, "0 0 512 512", mark({ cloud: NAVY, z: NAVY })); // monochrome navy20files["zloud-mark-white.svg"] = svg(512, 512, "0 0 512 512", mark({ cloud: "#fff", z: "#fff" })); // reversed (for dark backgrounds)21files["zloud-mark-reversed.svg"] = svg(512, 512, "0 0 512 512", `<rect width="512" height="512" rx="112" fill="${NAVY}"/>` + `<g transform="translate(64 64) scale(.75)">${mark({ cloud: "#fff", z: "#fff" })}</g>`);22const appBg = `<defs>${grad("g1")}${grad("g2", 0, 1, 1, 0)}<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#14307d"/><stop offset="1" stop-color="${NAVY}"/></linearGradient></defs>`;23files["zloud-app-icon.svg"] = svg(512, 512, "0 0 512 512", `<rect width="512" height="512" rx="112" fill="url(#bg)"/><g transform="translate(64 64) scale(.75)">${mark()}</g>`, appBg);24files["zloud-maskable.svg"] = svg(512, 512, "0 0 512 512", `<rect width="512" height="512" fill="url(#bg)"/><g transform="translate(102 102) scale(.6)">${mark()}</g>`, appBg); // content inside the 80% safe zone25files["zloud-favicon.svg"] = svg(64, 64, "0 0 512 512", mark({ sw: 52 }), defs);26const wm = (fill, markBody, d) => svg(1100, 400, "0 0 1100 400", `<g transform="translate(20 20) scale(.72)">${markBody}</g><text x="420" y="250" font-family="Inter, 'Segoe UI', system-ui, Arial, sans-serif" font-size="190" font-weight="800" letter-spacing="-4" fill="${fill}">Zloud</text><text x="428" y="318" font-family="Inter, 'Segoe UI', system-ui, Arial, sans-serif" font-size="46" font-weight="500" letter-spacing="14" fill="${fill}" opacity=".7">CLOUD PLATFORM</text>`, d);27files["zloud-wordmark-light.svg"] = wm(NAVY, mark(), defs); // for light backgrounds28files["zloud-wordmark-dark.svg"] = wm("#fff", mark(), defs); // for dark backgrounds29files["zloud-wordmark-mono.svg"] = wm(NAVY, mark({ cloud: NAVY, z: NAVY }), "");30for (const [n, s] of Object.entries(files)) fs.writeFileSync(path.join(pub, n), s);31const png = async (file, size, out, opts = {}) => sharp(Buffer.from(files[file]), { density: 384 }).resize(size, size, { fit: "contain", background: { r: 0, g: 0, b: 0, alpha: 0 } }).png().toFile(path.join(pub, out));32// PNG renders of the redraw (transparent where the SVG is transparent).33await png("zloud-mark.svg", 1024, "zloud-mark-1024.png"); await png("zloud-mark.svg", 512, "zloud-mark-512.png");34await png("zloud-mark-mono.svg", 512, "zloud-mark-mono-512.png"); await png("zloud-mark-white.svg", 512, "zloud-mark-white-512.png");35await png("zloud-app-icon.svg", 1024, "zloud-app-icon-1024.png"); await png("zloud-app-icon.svg", 512, "icon-512.png"); await png("zloud-app-icon.svg", 192, "icon-192.png");36await png("zloud-app-icon.svg", 180, "apple-touch-icon.png"); await png("zloud-maskable.svg", 512, "maskable-512.png"); await png("zloud-maskable.svg", 192, "maskable-192.png");37for (const s of [16, 32, 48]) await png("zloud-favicon.svg", s, `favicon-${s}.png`);38// favicon.ico (PNG-in-ICO: 16/32/48)39{ const imgs = [16, 32, 48].map(s => fs.readFileSync(path.join(pub, `favicon-${s}.png`))); const hdr = Buffer.alloc(6); hdr.writeUInt16LE(1, 2); hdr.writeUInt16LE(imgs.length, 4); let off = 6 + 16 * imgs.length; const ents = imgs.map((b, i) => { const e = Buffer.alloc(16); const s = [16, 32, 48][i]; e[0] = s; e[1] = s; e.writeUInt16LE(1, 4); e.writeUInt16LE(32, 6); e.writeUInt32LE(b.length, 8); e.writeUInt32LE(off, 12); off += b.length; return e; }); fs.writeFileSync(path.join(pub, "favicon.ico"), Buffer.concat([hdr, ...ents, ...imgs])); }40// Raster crops taken verbatim from the owner's board (source-of-truth reference).41const crop = (l, t, w, h, out, scale = 3) => sharp(board).extract({ left: l, top: t, width: w, height: h }).resize(w * scale, h * scale, { kernel: "lanczos3" }).png().toFile(path.join(pub, out));42await crop(60, 30, 300, 215, "source-crop-icon-fullcolor.png"); await crop(365, 55, 390, 160, "source-crop-wordmark-light.png", 2);43await crop(818, 22, 684, 228, "source-crop-lockup-dark.png", 2); await crop(0, 0, 1536, 1024, "source-brand-board.png", 1);44// Tokens + guidelines45const tokens = { brand: "Zloud", version: "2.0.0", status: "approved logo received 2026-11-30 (owner brand board). SVG marks are a vector redraw; PNG crops are verbatim from the board.", tagline: "Build Anywhere. Deploy Everywhere.", poweredBy: "Powered by Zoo Bangladesh",46 color: { gradient: G, navy: NAVY, neutrals: ["#0B1220", "#1E293B", "#475569", "#E2E8F0", "#F8FAFC"], ui: { accent: "#4F46FF", accentDark: "#7C83FF" } }, typography: { family: "Inter", fallback: "system-ui, 'Segoe UI', Roboto, sans-serif", weights: [300, 400, 500, 600, 700] },47 clearSpace: "x = height of the Z; keep x clear on all sides", minSize: { mark: "16px (favicon), 24px (UI)", wordmark: "96px wide" }, tagline2: "Build. Deploy. Scale." };48fs.writeFileSync(path.join(pub, "brand-tokens-v2.json"), JSON.stringify(tokens, null, 2));49fs.writeFileSync(path.join(pub, "brand-guidelines-v2.md"), `# Zloud brand guidelines v2\n\nSource: owner's Cloud Z Ribbon board (2026-11-30). SVG = vector redraw of the mark; PNG crops = verbatim from the board.\n\n- Mark: cloud ring + ribbon Z, gradient #00E6C3 → #00B2FF → #4F46FF → #A855F7.\n- Light backgrounds: full-colour mark or navy mono (#0B1220). Dark backgrounds: full-colour or white mono. Never recolour, stretch, rotate or add effects.\n- Clear space: height of the Z on every side. Minimum size: 16px mark (favicon), 24px in UI, 96px wordmark.\n- Typography: Inter (Light 300 – Bold 700); system sans fallback.\n- Tagline: "Build Anywhere. Deploy Everywhere." · Powered by Zoo Bangladesh.\n- App icon: navy rounded square, full-colour mark. Maskable icon: mark inside the central 80% safe zone.\n- Wordmark SVGs use live text (Inter/system fallback); no outlined font is bundled.\n`);50// Manifest with integrity hashes51const sha = f => crypto.createHash("sha256").update(fs.readFileSync(path.join(pub, f))).digest("hex");52const list = fs.readdirSync(pub).filter(f => !f.endsWith("manifest-v2.json")).sort().map(f => ({ file: f, bytes: fs.statSync(path.join(pub, f)).size, sha256: sha(f), kind: f.endsWith(".svg") ? "vector-redraw" : f.startsWith("source-") ? "board-crop" : f.endsWith(".png") || f.endsWith(".ico") ? "raster" : "doc" }));53const manifest = { brand: "Zloud", version: "2.0.0", generated: new Date().toISOString(), logoApproved: true, logoSource: "owner-supplied Cloud Z Ribbon board, 1536x1024 raster", limitations: ["Original vector source not supplied; SVG marks are a redraw and may differ in curve detail from the approved art.", "Wordmark SVGs use live text; PNG wordmark crops come from the board."], files: list };54fs.writeFileSync(path.join(pub, "brand-manifest-v2.json"), JSON.stringify(manifest, null, 2));55for (const f of fs.readdirSync(pub)) fs.copyFileSync(path.join(pub, f), path.join(pubd, f));56console.log("brand files:", fs.readdirSync(pub).length);57
Conversation
PartialSign in to start AI sessions.
Task checklist
- Application shell deployed
- Persistent projects
- Agent runtime
- Sandboxed terminal
Execution activity
No agent sessions. Git HEAD 692573d on master.
Approval requests
None pending.