An adult media collection manager.
  • TypeScript 70.4%
  • JavaScript 20.1%
  • CSS 6.8%
  • HTML 2.7%
Find a file
amayakase 9678598dbc Scaffold Electron desktop app and backend queue
Initialize a TypeScript npm workspace monorepo with desktop, backend, and shared contracts packages. Add an Electron + React + Fluent UI shell with preload API wiring, a utility-process backend with validated IPC request handling, and an in-memory serial task queue supporting list/create/cancel with queue tests. Include build/typecheck/test/smoke/package scripts, Electron smoke coverage for renderer/preload/backend integration, baseline repo config files, and expanded README setup/architecture/security guidance.
2026-10-01 19:59:29 +02:00
apps Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00
packages/contracts Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00
scripts Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00
.gitattributes Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00
.gitignore Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00
LICENSE Initial commit 2026-10-01 19:24:20 +02:00
package-lock.json Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00
package.json Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00
README.md Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00
tsconfig.base.json Scaffold Electron desktop app and backend queue 2026-10-01 19:59:29 +02:00

Adult Studio

A Windows-first desktop media collection manager scaffold, built with TypeScript, Electron, React, and Fluent UI v9.

Development

Install Node.js 22.16 or newer (Node 22 LTS recommended) and npm. From PowerShell at the repository root:

npm ci
npm run dev

The renderer supports hot reload. Backend edits currently require restarting npm run dev; the backend is compiled before the desktop starts. No global Electron, shell-specific environment assignments, or FFmpeg installation is required.

npm run typecheck
npm test
npm run smoke
npm run build
npm start
npm run package:win

package:win builds a Windows NSIS installer under apps/desktop/release. Installer signing is not configured.

Structure

Workspace Purpose
apps/desktop Electron main process, sandboxed preload, React renderer, Fluent UI shell
apps/backend Separate Node utility process with a serial background task queue
packages/contracts Shared typed task models and desktop API

The shell uses main navigation on the left, page-specific navigation in the middle, and the content view on the right. Home combines the second and third columns into one view. Settings sits at the bottom of main navigation and contains an empty General section. Pages use hash navigation so browser history works within Electron. The native Windows title bar preserves standard window controls and snapping.

Backend and future media work

The preload provides three explicit methods for future task features: list tasks, queue a demo, and cancel a task. Electron validates the sending frame and forwards requests to its Node utility process. The backend does not open a network port. Renderer Node integration is disabled, context isolation and sandboxing are enabled, and unsolicited navigation, popups, and permission requests are blocked.

The demo queue exposes queued/running/completed/cancelled/failed states, progress, and cancellation. It runs one task at a time to provide a future FFmpeg execution lane. The queue is in memory and resets on exit; persistence, real media processing, and restart recovery are future work. No media files are read or modified by this scaffold.

When adding FFmpeg, add a typed backend handler and run an app-managed executable with argument arrays and shell: false. Keep executable paths and task handlers in the backend, route cancellation to the child process, and publish validated generated files separately from originals. A durable queue and process-tree cleanup on Windows should be implemented before introducing long-running media tasks.

Validation

npm test verifies serial task execution and cancellation. npm run typecheck checks all workspaces; npm run build builds the complete desktop application. npm run smoke opens a hidden Electron window and verifies the built renderer, preload bridge, real utility-process backend, cancellation, and hash navigation. Visual appearance, Back/Forward interaction, installer behavior, and real FFmpeg processing still need manual runtime checks as those capabilities are developed.