Skip to content

georgebenedict77/benito-code-generator

Repository files navigation

Benito Code Generator

CI Release License: MIT

Benito Code Generator is a workspace-based prompt-to-website studio built for fast frontend concepting. A user describes what they want, the app generates editable index.html, style.css, and script.js files, and the project can be reviewed, repaired, polished, or previewed live without leaving the workspace.

Product Positioning

Problem

Early website ideas usually break in one of two ways: either they stay stuck as plain chat output, or they become generic templates that are hard to refine and even harder to present professionally.

Solution

Benito Code Generator turns prompting into an editable working session. Instead of stopping at generated text, it keeps the result inside a small coding workspace with diagnostics, direct file editing, and a live preview that opens only when the user wants it.

Who it is for

  • Students building portfolio-grade web concepts quickly
  • Freelancers shaping ideas into frontend drafts for clients
  • Founders who need fast visual prototypes before full engineering
  • Developers who want a lightweight prompt-to-code playground

Live Links

The full AI workspace runs locally because it depends on a Node server and optional OpenAI credentials. The GitHub Pages site is the public showcase and sample-output companion.

What The App Does

  • Accepts natural-language prompts for any website style or business category
  • Generates browser-ready index.html, style.css, and script.js
  • Lets users edit generated files directly in a code workspace
  • Shows diagnostics and review notes for the current project
  • Runs repair, responsive, polish, and review actions
  • Opens a live preview on demand instead of permanently taking screen space
  • Supports a local studio mode and an optional OpenAI-backed mode

Architecture

flowchart LR
  User["User prompt or file edit"] --> UI["Browser workspace UI"]
  UI --> Server["Node HTTP server"]
  Server --> WM["Workspace manager"]
  WM --> Files["Workspace files on disk"]
  WM --> Local["Local generation engine"]
  WM --> OpenAI["OpenAI Responses API (optional)"]
  Files --> Preview["Live preview document"]
  Preview --> UI
Loading

Screenshots

Workspace view

Benito workspace editor

Public showcase page

Benito public showcase page

Sample generated site

Generated sample website

Local Setup

npm install
npm run start

Then open:

http://localhost:3000

If 3000 is busy, the server will keep trying the next available local port.

OpenAI mode

Create a local .env or set environment variables before starting the server:

$env:OPENAI_API_KEY="your_api_key_here"
$env:OPENAI_MODEL="gpt-5.1"
npm run start

Without an API key, the app stays fully usable in local studio mode.

Validation And CI

This repository now includes a lightweight smoke-check pipeline:

  • JavaScript syntax validation for the server and browser files
  • Server boot validation through the /health endpoint
  • Workspace API validation through /api/workspace
  • Preview document validation through /preview/project-001

Run locally:

npm run check

GitHub Actions runs the same validation on pushes and pull requests.

Repository Structure

BENJOJI_BUILD AI/
|-- .github/workflows/ci.yml
|-- docs/
|   |-- index.html
|   |-- styles.css
|   |-- demo/
|   |-- positioning.md
|   `-- release-notes/
|-- public/
|   |-- index.html
|   |-- app.css
|   `-- app.js
|-- scripts/check.js
|-- server/
|   |-- ai.js
|   |-- fileWriter.js
|   |-- openaiClient.js
|   |-- previewServer.js
|   `-- workspaceManager.js
|-- workspaces/project-001/
|-- CHANGELOG.md
|-- LICENSE
|-- package.json
`-- server.js

Talking Points For Lecturers Or Clients

  • The app separates prompting, editable files, diagnostics, and preview into a real workspace flow
  • It avoids vendor lock-in by generating plain frontend files instead of a framework-specific sandbox
  • It already supports an optional OpenAI runtime while preserving a local offline fallback
  • The repo includes CI, release notes, licensing, and public showcase material for professional presentation

Documentation

License

Released under the MIT License.

About

Mini AI coding studio with workspace generation and live preview

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors