Free open-source image editor for the browser
Describe OpenLight to search engines and add an About page (#68)
Rodrigo Belfiorec50506533f16
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.mdindex 4d68d40..2f075a6 100644--- a/ARCHITECTURE.md+++ b/ARCHITECTURE.md@@ -7,6 +7,7 @@ Where the code lives and the rules that keep it in place. Keep this file true: w| Path | Owns || --- | --- || `src/main.tsx` | Mounts the GPU provider and the app. |+| `index.html`, `about.html` | The two pages. `index.html` holds the welcome's heading, visually hidden, for crawlers that don't run the script; `about.html` is static, without script. || `app/index.tsx` | The app: workspace, file drop, draft notice. || `app/workspace` | The open document, its replacement, and loading state. A replacement loads beside the open document and takes its place only once it opens; a failure leaves the open document in place. || `app/loaders` | Image, scene file, Camera Raw XMP, and `.cube` LUT loaders. A loader reads one file format and opens a document or edits the open one through the same edits the UI uses. |diff --git a/DESIGN.md b/DESIGN.mdindex 0166471..71eb197 100644--- a/DESIGN.md+++ b/DESIGN.md@@ -50,4 +50,4 @@ OpenLight uses a small set of shared UI primitives so the editor reads as one ap- Use `TextLink` for an underlined link inside running text. It renders an anchor with `href` and a button otherwise; the `muted` variant stays in the sentence's color for secondary actions such as Forget.- Use `ScrubInput` for numbers that read as inline text, drag sideways, and accept typing. It hugs its digits and unit and shows a subtly rounded background only while text editing is active.- Give toolbar slider values an explicit minimum character width (`valueWidth`) when their expected range changes digit count. It counts digits, with the unit after them: percentages reserve three tabular characters, while brush size uses the actual maximum's digit count. Do not guess a global maximum.-- Text uses the global body size. Express hierarchy with weight and color.+- Text uses the global body size. Express hierarchy with weight and color. The About page is the exception: it is read, not operated, so its text is a step larger.diff --git a/about.html b/about.htmlnew file mode 100644index 0000000..cf767a3--- /dev/null+++ b/about.html@@ -0,0 +1,108 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <meta name="color-scheme" content="dark" />+ <meta name="theme-color" content="#171717" />+ <link rel="icon" href="/logo.svg" type="image/svg+xml" />+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />+ <link rel="canonical" href="https://openlight.app/about" />+ <title>About OpenLight | How to edit photos in your browser</title>+ <meta name="description" content="What OpenLight is and how to use it: open a photo or camera RAW file, adjust it, edit parts of it with masks, heal, crop, and export, all in your browser." />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="OpenLight" />+ <meta property="og:title" content="About OpenLight | How to edit photos in your browser" />+ <meta property="og:description" content="What OpenLight is and how to use it: open a photo or camera RAW file, adjust it, edit parts of it with masks, heal, crop, and export, all in your browser." />+ <meta property="og:url" content="https://openlight.app/about" />+ <meta property="og:image" content="https://openlight.app/og.png" />+ <meta name="twitter:card" content="summary_large_image" />+ <link rel="stylesheet" href="/src/index.css" />+ </head>+ <body class="overflow-auto">+ <main class="mx-auto flex max-w-2xl flex-col gap-8 px-6 py-16 text-sm leading-relaxed text-muted">+ <header class="flex flex-col items-start gap-1.5">+ <a href="/" class="mb-1.5 rounded-md focus-ring" aria-label="Open the editor">+ <img alt="" class="w-12" height="48" src="/logo.svg" width="48" />+ </a>+ <h1 class="text-2xl font-bold text-foreground">About OpenLight</h1>+ <p>A free, open-source photo editor that runs in your browser.</p>+ <a href="/" class="mt-3 rounded-xs text-foreground underline decoration-disabled underline-offset-4 transition-colors hover:decoration-foreground focus-ring">Open the editor</a>+ </header>++ <section class="flex flex-col gap-2">+ <h2 class="font-semibold text-foreground">What it is</h2>+ <p>+ OpenLight edits photos on your own graphics card with WebGPU, so they never leave your device: there is no upload,+ no account, and nothing to install. It covers the everyday work of a desktop RAW editor: tone and color+ adjustments, local adjustments with masks, healing, cropping, and export.+ </p>+ </section>++ <section class="flex flex-col gap-2">+ <h2 class="font-semibold text-foreground">How to use it</h2>+ <ol class="flex list-decimal flex-col gap-2 pl-4">+ <li>+ <strong class="font-medium text-foreground">Open a photo.</strong> Drop an image on the editor or choose a+ file. OpenLight opens JPEG, PNG, WebP, AVIF, GIF, BMP, SVG, HEIC, TIFF, and camera RAW and DNG files, and+ imports Camera Raw XMP settings.+ </li>+ <li>+ <strong class="font-medium text-foreground">Adjust it.</strong> Adjust (A) sets exposure, contrast,+ highlights, shadows, whites, blacks, white balance, vibrance, and saturation, then the tone curve and the+ Color Mixer.+ </li>+ <li>+ <strong class="font-medium text-foreground">Edit parts of it.</strong> Brush (B), Linear gradient (L), and+ Radial gradient (R) draw a mask with its own adjustments. Add effect adds Details, Exposure, Color Mixer,+ Vignette, Grain, Color, or LUT layers, which you can drag to reorder.+ </li>+ <li>+ <strong class="font-medium text-foreground">Remove distractions.</strong> Healing (H) paints over a spot and+ fills it from another part of the photo. Each patch stays editable.+ </li>+ <li>+ <strong class="font-medium text-foreground">Crop and straighten.</strong> Crop (C) sets an aspect ratio,+ rotates, straightens, and flips.+ </li>+ <li>+ <strong class="font-medium text-foreground">Compare.</strong> Hold \ to see the original. Undo with ⌘Z or+ Ctrl+Z, and redo with Shift.+ </li>+ <li>+ <strong class="font-medium text-foreground">Export.</strong> Export (E) saves PNG, JPEG, or WebP at the size+ and quality you choose, or saves a scene with the photo and every edit to continue later.+ </li>+ </ol>+ <p>If you close the tab, your latest photo stays in the browser, ready to recover on your next visit.</p>+ </section>++ <section class="flex flex-col gap-2">+ <h2 class="font-semibold text-foreground">Requirements</h2>+ <p>+ OpenLight needs WebGPU, which recent versions of Chrome, Edge, Safari, and Firefox provide. It works on+ computers and phones. HEIC needs a browser that decodes HEVC.+ </p>+ </section>++ <section class="flex flex-col gap-2">+ <h2 class="font-semibold text-foreground">For developers and agents</h2>+ <p>+ Every edit is also available to scripts through <code>window.openlight</code> and, in browsers with WebMCP,+ to AI agents as tools. The+ <a href="https://github.com/roprgm/openlight/blob/main/API.md" class="rounded-xs text-foreground underline decoration-disabled underline-offset-4 transition-colors hover:decoration-foreground focus-ring">API reference</a>+ and <a href="/llms.txt" class="rounded-xs text-foreground underline decoration-disabled underline-offset-4 transition-colors hover:decoration-foreground focus-ring">llms.txt</a>+ describe them.+ </p>+ </section>++ <section class="flex flex-col gap-2">+ <h2 class="font-semibold text-foreground">Open source</h2>+ <p>+ OpenLight is MIT-licensed. Its source code, issues, and contributions are on+ <a href="https://github.com/roprgm/openlight" class="rounded-xs text-foreground underline decoration-disabled underline-offset-4 transition-colors hover:decoration-foreground focus-ring">GitHub</a>.+ </p>+ </section>+ </main>+ </body>+</html>diff --git a/index.html b/index.htmlindex 9d93617..02ca32f 100644--- a/index.html+++ b/index.html@@ -10,25 +10,58 @@<link rel="icon" href="/logo.svg" type="image/svg+xml" /><link rel="apple-touch-icon" href="/apple-touch-icon.png" /><link rel="canonical" href="https://openlight.app/" />- <title>OpenLight</title>- <meta name="description" content="Edit photos in your browser. An open-source photo editor built on WebGPU." />+ <title>OpenLight | Free online photo and RAW editor</title>+ <meta name="description" content="Edit photos and camera RAW files in your browser for free. An open-source photo editor on WebGPU with layers, masks, and healing. Photos never leave your device." /><meta property="og:type" content="website" /><meta property="og:site_name" content="OpenLight" />- <meta property="og:title" content="OpenLight | A free open-source photo editor for the web" />- <meta property="og:description" content="Edit photos in your browser. An open-source photo editor built on WebGPU." />+ <meta property="og:title" content="OpenLight | Free online photo and RAW editor" />+ <meta property="og:description" content="Edit photos and camera RAW files in your browser for free. An open-source photo editor on WebGPU with layers, masks, and healing. Photos never leave your device." /><meta property="og:url" content="https://openlight.app/" /><meta property="og:image" content="https://openlight.app/og.png" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="630" /><meta property="og:image:alt" content="The OpenLight editor repairing a mountain trail photo with the Healing tool." /><meta name="twitter:card" content="summary_large_image" />- <meta name="twitter:title" content="OpenLight | A free open-source photo editor for the web" />- <meta name="twitter:description" content="Edit photos in your browser. An open-source photo editor built on WebGPU." />+ <meta name="twitter:title" content="OpenLight | Free online photo and RAW editor" />+ <meta name="twitter:description" content="Edit photos and camera RAW files in your browser for free. An open-source photo editor on WebGPU with layers, masks, and healing. Photos never leave your device." /><meta name="twitter:image" content="https://openlight.app/og.png" /><meta name="twitter:image:alt" content="The OpenLight editor repairing a mountain trail photo with the Healing tool." />+ <script type="application/ld+json">+ {+ "@context": "https://schema.org",+ "@type": "WebApplication",+ "name": "OpenLight",+ "url": "https://openlight.app/",+ "image": "https://openlight.app/og.png",+ "description": "Edit photos and camera RAW files in your browser for free. An open-source photo editor on WebGPU with layers, masks, and healing. Photos never leave your device.",+ "applicationCategory": "MultimediaApplication",+ "operatingSystem": "Any",+ "browserRequirements": "Requires WebGPU",+ "isAccessibleForFree": true,+ "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },+ "license": "https://opensource.org/licenses/MIT",+ "sameAs": ["https://github.com/roprgm/openlight"],+ "featureList": [+ "Exposure, tone curve, white balance, and color adjustments",+ "Camera RAW, DNG, HEIC, TIFF, and 16-bit image editing",+ "Effect layers with linear, radial, and brush masks",+ "Healing tool",+ "3D LUTs from .cube files",+ "Crop, rotate, and straighten",+ "Export to PNG, JPEG, or WebP"+ ]+ }+ </script></head><body>- <div id="root"></div>+ <div id="root">+ <!-- For crawlers that don't run the script; visually hidden without waiting for the stylesheet. -->+ <main style="position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap">+ <h1>OpenLight</h1>+ <p>Edit photos in your browser.</p>+ <a href="/about">About OpenLight</a>+ </main>+ </div><script type="module" src="/src/main.tsx"></script></body></html>diff --git a/public/llms.txt b/public/llms.txtindex 5dd6b2a..6d65405 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -3,8 +3,21 @@> OpenLight is a free, open-source photo editor that runs entirely in the browser on WebGPU. Photos stay on the device. Every editing action is also exposed as a JavaScript API on `window.openlight`, so an AI agent with browser access can open, edit, and export images programmatically.Site: https://openlight.app+About and how to use it: https://openlight.app/aboutSource (MIT): https://github.com/roprgm/openlight+## Features++OpenLight is free to use with no account or upload, and works as an online alternative to desktop RAW editors for everyday photo editing.++- Adjustments: exposure, contrast, highlights, shadows, whites, blacks, white balance with auto, vibrance, saturation, tone curves, clarity, and sharpening.+- Color Mixer with eight hue, saturation, and luminance ranges, film grain, vignette, and 3D LUTs from `.cube` files.+- Effect layers with linear, radial, and brush masks, including pen pressure.+- Healing tool to remove spots and distractions.+- Crop, rotate, straighten, and flip.+- Opens JPEG, PNG, WebP, AVIF, GIF, BMP, SVG, HEIC, TIFF, and camera RAW/DNG files, and imports Camera Raw XMP settings.+- Exports PNG, JPEG, or WebP, and saves scenes to keep editing later.+## Using the API from a browser agentOpen https://openlight.app in a WebGPU-capable browser (recent Chrome, Edge, Safari, or Firefox). `window.openlight` is available once the page initializes. Load an image before editing or exporting. The UI and the API share the same document edits, so changes made by script appear in the interface and in undo history.diff --git a/public/robots.txt b/public/robots.txtindex c2a49f4..20d5d29 100644--- a/public/robots.txt+++ b/public/robots.txt@@ -1,2 +1,4 @@User-agent: *Allow: /++Sitemap: https://openlight.app/sitemap.xmldiff --git a/public/sitemap.xml b/public/sitemap.xmlnew file mode 100644index 0000000..71b2cdc--- /dev/null+++ b/public/sitemap.xml@@ -0,0 +1,9 @@+<?xml version="1.0" encoding="UTF-8"?>+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">+ <url>+ <loc>https://openlight.app/</loc>+ </url>+ <url>+ <loc>https://openlight.app/about</loc>+ </url>+</urlset>diff --git a/src/app/editor/tool-rail.tsx b/src/app/editor/tool-rail.tsxindex 899c2ea..7039676 100644--- a/src/app/editor/tool-rail.tsx+++ b/src/app/editor/tool-rail.tsx@@ -1,8 +1,40 @@import { Tab, TabList, Tabs } from "@roprgm/ui/tabs";import { Tooltip, TooltipContent, TooltipTrigger } from "@roprgm/ui/tooltip";+import type { ReactNode } from "react";import { GithubIcon } from "@/components/icons/github";+import { InfoIcon } from "@/components/icons/info";import { type Tool, tools, useTool } from "./tools";+/** Opens in a new tab, leaving the photo open. */+function RailLink({+ href,+ label,+ children,+}: {+ href: string;+ label: string;+ children: ReactNode;+}) {+ return (+ <Tooltip>+ <TooltipTrigger+ render={+ <a+ href={href}+ target="_blank"+ rel="noreferrer"+ aria-label={label}+ className="grid place-items-center rounded-md p-1.5 text-muted transition-colors hover:bg-hover hover:text-foreground"+ />+ }+ >+ {children}+ </TooltipTrigger>+ <TooltipContent side="right">{label}</TooltipContent>+ </Tooltip>+ );+}+/** Icon tabs in a column at the window's left edge; tooltips carry the label and shortcut. Without a handler the tabs are inert. */export function ToolTabList({selected,@@ -39,22 +71,17 @@ export function ToolTabList({</Tooltip>))}</TabList>- <Tooltip>- <TooltipTrigger- render={- <a- href="https://github.com/roprgm/openlight"- target="_blank"- rel="noreferrer"- aria-label="OpenLight on GitHub"- className="mt-auto grid place-items-center rounded-md p-1.5 text-muted transition-colors hover:bg-hover hover:text-foreground"- />- }+ <div className="mt-auto flex flex-col gap-1">+ <RailLink href="/about" label="About OpenLight">+ <InfoIcon className="size-5" />+ </RailLink>+ <RailLink+ href="https://github.com/roprgm/openlight"+ label="OpenLight on GitHub"><GithubIcon className="size-5" />- </TooltipTrigger>- <TooltipContent side="right">OpenLight on GitHub</TooltipContent>- </Tooltip>+ </RailLink>+ </div></Tabs>);}diff --git a/src/main.tsx b/src/main.tsxindex bf69b7c..eff02d5 100644--- a/src/main.tsx+++ b/src/main.tsx@@ -25,6 +25,7 @@ class GpuBoundary extends Component<<main className="grid h-dvh place-content-center justify-items-center gap-3 p-6 text-center"><img alt="" className="w-16" height="64" src="/logo.svg" width="64" /><h1 className="text-2xl font-bold">OpenLight</h1>+ <p className="text-muted">Edit photos in your browser.</p><p className="max-w-md text-muted">OpenLight needs WebGPU, which this browser does not provide. Open itin a recent Chrome, Edge, Safari, or Firefox.diff --git a/vercel.json b/vercel.jsonindex ea48146..bcad718 100644--- a/vercel.json+++ b/vercel.json@@ -1,3 +1,4 @@{+ "cleanUrls": true,"rewrites": [{ "source": "/demo", "destination": "/" }]}diff --git a/vite.config.ts b/vite.config.tsindex 680e1ec..9961978 100644--- a/vite.config.ts+++ b/vite.config.ts@@ -5,4 +5,5 @@ import react from "@vitejs/plugin-react";export default {plugins: [react(), tailwindcss(), wgslVitePlugin()],resolve: { alias: { "@": "/src" } },+ build: { rolldownOptions: { input: ["index.html", "about.html"] } },};