From d9db2a771da05497da6494af086f2c26acba29a1 Mon Sep 17 00:00:00 2001 From: Thomas Nilles Date: Tue, 13 Jan 2026 01:38:15 -0500 Subject: [PATCH] update --- .gitignore | 5 + Dockerfile | 24 +++++ docker-compose.yaml | 11 ++ static/components/AGENT_GUIDE.md | 101 ++++++++++++++++++ .../canvas-display/canvas-display.html | 38 +++++++ .../components/color-picker/color-picker.html | 29 +++++ .../grid-selector/grid-selector.html | 41 +++++++ static/components/side-menu/side-menu.html | 43 ++++++++ static/components/toolbar/toolbar.html | 42 ++++++++ static/index.html | 0 10 files changed, 334 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml create mode 100644 static/components/AGENT_GUIDE.md create mode 100644 static/components/canvas-display/canvas-display.html create mode 100644 static/components/color-picker/color-picker.html create mode 100644 static/components/grid-selector/grid-selector.html create mode 100644 static/components/side-menu/side-menu.html create mode 100644 static/components/toolbar/toolbar.html create mode 100644 static/index.html diff --git a/.gitignore b/.gitignore index 3ef4dc6..0e10d66 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,11 @@ go.work.sum !*.go !go.sum !go.mod +!Dockerfile +!docker-compose.yaml +!air.toml +!*.html +!*.md !README.md !LICENSE diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..34ad7a0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Use the official Golang image as the base. +FROM golang:1.22-alpine AS base + +# Install git (required by go modules) and any other utilities. +RUN apk add --no-cache git + + + + + +# Set the working directory inside the container. +WORKDIR /app + +# Cache go.mod and go.sum to speed up dependency installation. +COPY go.mod go.sum ./ +RUN go mod download + +# Copy the rest of the source code. +COPY . . +# Build the binary after copying the source files. +RUN go build -o /app/tmp/main ./cmd/app + +# The container will start Air, which watches the source files and rebuilds the app on change. +CMD ["./tmp/main"] diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..3253904 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,11 @@ +services: + app: + build: + context: . + dockerfile: Dockerfile + + ports: + - "8080:8080" + environment: + - GO111MODULE=on + command: ["./tmp/main"] diff --git a/static/components/AGENT_GUIDE.md b/static/components/AGENT_GUIDE.md new file mode 100644 index 0000000..45495a4 --- /dev/null +++ b/static/components/AGENT_GUIDE.md @@ -0,0 +1,101 @@ +# Agent Guide – Front‑End Web Components + +## Purpose +This guide defines the conventions we follow for building the front‑end of the **draw‑tools** project using **custom HTML web components**. + +## Rules + +1. **Only custom web components** + - All UI elements must be implemented as native HTML custom elements (``). + - No third‑party UI libraries (e.g., React, Vue) are used. + +2. **Self‑contained components** + - Each component lives in its own folder under `static/components`. + - The folder contains: + - `my-component.html` – the HTML template (including `