Skip to content

Project: Portable Content Editor

DEADCODEXO

So yeah, I made this little Electron app to crank out content for the site without all the usual setup nonsense. Basically, I click it, see a splash screen, and boom - editor’s ready. No waiting around, no server configs, no typing commands, just type content and push it.

Workflow is dead simple:

  1. Open app → splash shows.
  2. Backend spins up in a few secs.
  3. Editor window pops.
  4. Write, preview, commit — done.

Splash screen in action

import { BrowserWindow } from "electron";
import path from "node:path";

function createSplashWindow() {
  const splash = new BrowserWindow({
    width: 400,
    height: 300,
    frame: false,
    alwaysOnTop: true,
    transparent: true,
  });

  splash.loadFile(path.join(__dirname, "splash.html"));
  return splash;
}

This is literally just a tiny window to let me know the app is starting.

Starting the CMS backend

import { spawn } from "node:child_process";

function startCmsServer() {
  const cmsProcess = spawn("node", ["./server.js"], {
    cwd: __dirname,
    stdio: "inherit",
  });

  cmsProcess.on("exit", (code) => {
    console.log(`CMS server exited with code ${code}`);
  });

  return cmsProcess;
}

Spins up the server that actually runs the editor. Electron handles the window, Node handles the server.

Why I like it

Next
Project: Integrated Content Editor