From bd670784fa144af94efaa521483cb7fc92e2dc56 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 01:55:12 +0000 Subject: [PATCH] chore: add GitHub Codespaces devcontainer configuration Agent-Logs-Url: https://github.com/bytenomad23/hyperframes/sessions/5e10f88f-a8be-4af1-848c-f18b1fe25963 Co-authored-by: bytenomad23 <209907175+bytenomad23@users.noreply.github.com> --- .devcontainer/Dockerfile | 54 +++++++++++++++++++ .devcontainer/devcontainer.json | 94 +++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..3e5ae72e --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,54 @@ +FROM mcr.microsoft.com/devcontainers/base:debian-12 + +# ── System dependencies ─────────────────────────────────────────────────────── +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + unzip \ + git \ + ffmpeg \ + chromium \ + libgbm1 \ + libnss3 \ + libatk-bridge2.0-0 \ + libdrm2 \ + libxcomposite1 \ + libxdamage1 \ + libxrandr2 \ + libcups2 \ + libasound2 \ + libpangocairo-1.0-0 \ + libxshmfence1 \ + libgtk-3-0 \ + # Font support — matches production rendering environment + fonts-liberation \ + fonts-noto-color-emoji \ + fonts-noto-cjk \ + fonts-noto-core \ + fonts-noto-extra \ + fonts-noto-ui-core \ + fonts-freefont-ttf \ + fonts-dejavu-core \ + fontconfig \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean \ + && fc-cache -fv + +# ── Node.js 22 ──────────────────────────────────────────────────────────────── +RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ + && apt-get install -y --no-install-recommends nodejs \ + && rm -rf /var/lib/apt/lists/* + +# ── Bun ────────────────────────────────────────────────────────────────────── +RUN curl -fsSL https://bun.sh/install | bash +ENV PATH="/root/.bun/bin:/home/vscode/.bun/bin:$PATH" + +# Install bun for the vscode user as well +RUN su vscode -c "curl -fsSL https://bun.sh/install | bash" \ + && su vscode -c "~/.bun/bin/bun --version" \ + && echo "bun installed for vscode user" + +# ── Puppeteer / Chromium config ─────────────────────────────────────────────── +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true +ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium +ENV CONTAINER=true diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..af5b8ac2 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,94 @@ +{ + "name": "Hyperframes", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + + // ── Container settings ─────────────────────────────────────────────────── + "remoteUser": "vscode", + "containerEnv": { + "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD": "true", + "PUPPETEER_EXECUTABLE_PATH": "/usr/bin/chromium", + "CONTAINER": "true" + }, + + // ── VS Code extensions ─────────────────────────────────────────────────── + "customizations": { + "vscode": { + "extensions": [ + // Linting & formatting — oxlint + oxfmt (project standard) + "oxc.oxc-vscode", + + // Editor experience + "EditorConfig.EditorConfig", + "streetsidesoftware.code-spell-checker", + "usernamehw.errorlens", + + // Git + "eamodio.gitlens", + "mhutchie.git-graph", + + // HTML / CSS + "bradlc.vscode-tailwindcss", + "formulahendry.auto-close-tag", + "naumovs.color-highlight", + + // Markdown & docs + "yzhang.markdown-all-in-one", + "davidanson.vscode-markdownlint", + + // Misc tooling + "mikestead.dotenv", + "ms-vscode.live-server" + ], + "settings": { + // Use bun as the npm script runner + "npm.packageManager": "bun", + + // Format on save + "editor.formatOnSave": true, + "editor.defaultFormatter": "oxc.oxc-vscode", + + // TypeScript + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true, + + // Trim trailing whitespace / insert final newline — matches .editorconfig + "files.trimTrailingWhitespace": true, + "files.insertFinalNewline": true, + + // Search exclusions + "search.exclude": { + "**/node_modules": true, + "**/dist": true, + "**/.git": true, + "**/bun.lock": true + } + } + } + }, + + // ── Lifecycle hooks ────────────────────────────────────────────────────── + + // Install dependencies after the container is created + "postCreateCommand": "bun install", + + // Build all packages and start the studio after each start + "postStartCommand": "bun run build", + + // ── Port forwarding ────────────────────────────────────────────────────── + "forwardPorts": [ + // Hyperframes Studio dev server (Vite default) + 5173, + // Alternative Vite ports + 5174, + 5175 + ], + "portsAttributes": { + "5173": { + "label": "Hyperframes Studio", + "onAutoForward": "openBrowser" + } + } +}