Skip to content
ManuelPeh76Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creator2

Creator2 is a local Electron application for managing, editing, previewing, archiving, and exporting web projects.

The app combines an Ace-based code editor with a JSON-based project model, import functions for files, folders, ZIP/JSON projects, and websites, as well as an integrated preview runtime environment. The goal is to make custom or imported web tools locally editable, permanently storable, and capable of running offline whenever possible.


Brief Overview

Creator2 manages web projects not primarily as loose file trees, but as structured JSON projects located at:

projects/*.json

A project consists of metadata and a list of logical files:

{
	meta: {
		name: "Project Name",
		saved: true,
		ctime: 0,
		mtime: 0
	},
	files: [
		{
			path: "index.html",
			type: "entry",
			contains: "text",
			content: "<html>...</html>",
			size: 0,
			edit: 0,
			mode: "ace/mode/html"
		}
	]
}

The JSON project file serves as the central source of truth. Previews and exports are generated from it. ---

Key Features

  • Local project management
  • Ace-based editor for HTML, CSS, JavaScript, JSON, and other file types
  • File management within a project
  • Import of files and folders
  • Import of existing Creator/JSON projects
  • ZIP import and export
  • Website import via a local downloader
  • Live/auto-preview in a separate Electron window
  • Export as JSON, ZIP, or standalone HTML file
  • Settings, language files, and themes
  • Formatting, minification, and comment removal for supported file types

Architecture

At its core, Creator2 consists of the following components:

app/main.js                Electron main process, IPC, windows, file system
app/preload.js             Secure bridge between renderer and main process
app/index.html             Main interface
app/renderer.js            Central UI and project orchestration
app/app/import.js          Import pipeline
app/app/export.js          Export pipeline
app/app/preview.html       Preview window
app/app/preview-engine.js  Virtual preview runtime
app/app/export-engine.js   Runtime for exported single HTML files
projects/                  Local Creator2 projects
backup/                    Backups
out/                       Export output

The preview runtime is a key component of the project. Imported web projects do not simply run as standard files; instead, they execute within a virtual runtime featuring an in-memory asset index. This allows resources, requests, iframes, scripts, styles, and other browser mechanisms to be intercepted within the app and redirected to the stored project files. ---

Installation

Prerequisites

  • Node.js
  • npm
  • Windows as the current build target

Installing Dependencies

After cloning the repository, first install the npm dependencies:

npm install

Starting Development Mode

For local development, Creator2 can be started using Electron/Electronmon:

npm run dev

This command uses the script:

"dev": "electronmon ."

Alternatively, there is also:

npm start

This starts Electron with the development environment set and trace warnings enabled.

Building the Application

A Windows build is generated using the following command:

npm run build

The script uses electron-packager and writes the built application to:

dist/creator-win32-x64

Creating an Installer

After a successful build, a Windows installer can be created:

npm run setup

The script uses electron-installer-windows and expects the previous build to be located at:

dist/creator-win32-x64/

The installer is written to:

dist/installers/

Project Model

Creator2 saves projects as JSON files. Each project file contains:

  • Metadata such as name, save status, and timestamps
  • A list of logical files
  • Paths, file types, and content formats
  • Editor mode information

Supported content formats include, among others:

text
object
datauri
bytearray

Supported file types include, among others:

entry
site
script
module
stylesheet
json
shader
image
font
application
video
audio
folder
other

Import and Export

Creator2 can import external content into the project model, including:

  • individual files
  • entire folders
  • ZIP files
  • existing JSON projects
  • websites

Upon export, projects can be output as:

  • a JSON project file
  • a ZIP archive
  • a standalone HTML file

The HTML export also includes a runtime layer, ensuring projects function similarly to the internal preview without requiring conversion back into a standard file system structure.


Preview Runtime

The Preview Runtime is responsible for making saved project files executable within the browser context. It manages, among other things:

  • asset resolution
  • internal resource paths
  • script and module processing
  • fetch/XHR redirects
  • media and image resources
  • iframes and srcdoc
  • workers
  • dynamic DOM changes

This allows imported web tools to be used within Creator2, even if they were not originally built for this environment.


Development Status

Creator2 is an active evolution of the original Creator concept. Current development focuses on:

  • further decoupling renderer logic
  • stabilizing the preview/export runtime
  • improved modularization
  • more robust import and export
  • regression testing using real-world example projects

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages