ESSENTIALS Technical Guide

Active Development

System Overview

PropertyValue
ApplicationVibeCode Builder - Essentials Edition
Location/opt/vibecode-builder/essentials/app/
Port3020
URLhttps://myvcbpro.com
StatusOperational

Server Infrastructure

PM2 Managed Services

All web services are managed by PM2 for auto-restart protection:

ServicePortPM2 NameLocation
VCB Essentials3020vcb-essentials/opt/vibecode-builder/essentials/app/server/
Real Estate App8090realestate-app/opt/vibecode-builder/user-webapps/greg/realestate_greg_001/
Grandview Showcase8095grandview-showcase/opt/vibecode-builder/user-webapps/greg/grandview-myvcbpro/

PM2 Commands

# View status
pm2 status

# Restart a service
pm2 restart vcb-essentials
pm2 restart realestate-app
pm2 restart grandview-showcase

# Save process list (for auto-restart on boot)
pm2 save

# View logs
pm2 logs vcb-essentials
pm2 logs realestate-app
pm2 logs grandview-showcase

Cloudflare Tunnel Configuration

Tunnel ID: 7e26724e-b529-4277-86ff-97c82d973893

Config: ~/.cloudflared/config-myvcbpro.yml

HostnameLocal Service
myvcbpro.comhttp://localhost:3020
www.myvcbpro.comhttp://localhost:3020
app.ownsouthwestflorida.comhttp://localhost:8090
grandview.myvcbpro.comhttp://localhost:8095

Restart Cloudflare Tunnel

# Find and kill existing tunnel
ps aux | grep cloudflared
kill 

# Start tunnel with config
nohup /usr/local/bin/cloudflared tunnel run --config ~/.cloudflared/config-myvcbpro.yml 7e26724e-b529-4277-86ff-97c82d973893 > /dev/null 2>&1 &

Architecture

Application Structure

/opt/vibecode-builder/essentials/ ├── app/ │ ├── public/ # Static frontend files │ │ ├── index.html # Landing page │ │ ├── builder/ # Website builder tools │ │ │ ├── chat/ # AI Chat Builder │ │ │ ├── wysiwyg/ # WYSIWYG Editor │ │ │ ├── forms/ # Forms Maker │ │ │ └── database/ # Database Creator/Viewer │ │ ├── dashboard/ # Dashboard pages │ │ │ ├── index.html # Main dashboard │ │ │ ├── websites.html │ │ │ ├── forms.html │ │ │ └── my-data/ # Database management │ │ ├── design-library/ # Image/PDF management │ │ └── docs/ # Documentation │ ├── server/ # Backend API │ │ ├── index.js # Express server (port 3020) │ │ ├── translator-middleware.js │ │ ├── database-service.js │ │ └── db/ # Database scripts │ └── .env # Environment config (PORT=3020) ├── archive/ # Archived files └── backups/ # Local backups

Technology Stack

ComponentTechnology
FrontendHTML5, CSS3, Vanilla JavaScript
BackendNode.js, Express.js
DatabaseMySQL (shared)
AuthenticationJWT
AI IntegrationRosie / OpenRouter
TunnelCloudflare (port 3020)

Database Schema

Database: vibecode_builder (shared with Enterprise)

Key Tables

Forms System

v1.0 - Complete

Forms Maker

Location: /builder/forms/index.html

Form Responses Viewer

Location: /builder/forms/responses.html

Email Notifications (AgentMail)

Forms API Endpoints

MethodEndpointDescription
GET/api/formsList user forms
GET/api/forms/:idGet form details
POST/api/formsCreate new form
PUT/api/forms/:idUpdate form
DELETE/api/forms/:idDelete form
GET/api/forms/:id/submissionsGet form responses
PUT/api/forms/:id/submissions/:subIdUpdate response
DELETE/api/forms/:id/submissions/:subIdDelete response
POST/api/forms/:id/submitSubmit form (public)

Database System

v2.0 - Complete

Database Creator

Location: /builder/database/index.html

Database Viewer

Location: /database-viewer.html (consolidated version)

Previous location (archived): /builder/database/viewer.html

View Types (8)

Field Types (14)

Features

API Endpoints

EndpointMethodDescription
/api/user/databasesGETList user databases
/api/user/databases/:dbIdGETGet database info
/api/user/databases/:dbId/tables/:tableNameGETGet table data
/api/user/databases/:dbId/queryPOSTExecute SQL query
/api/user/external-databases/:id/downloadGETDownload SQLite file

LocalStorage Keys

Formula Functions

CategoryFunctions
MathROUND, ABS, SUM
TextCONCATENATE, LEFT, RIGHT, UPPER, LOWER
LogicIF, AND, OR, NOT
DateNOW, TODAY, DATEADD, DATEDIFF

SQLite Infrastructure

Builder Chat - Web Page Generation

Overview

The Builder Chat is an AI-powered web page generation system where Rosie (the AI assistant) manages the entire workflow from user request to delivered website.

Workflow Architecture

  1. User Request - User submits natural language description in chat
  2. Rosie Analysis - Rosie analyzes request and spawns appropriate sub-agent
  3. Sub-Agent Coding - AI model (configurable by Admin) generates website code
  4. Quality Review - Rosie reviews output for errors, quality, and UX flow
  5. Quality Score - Auto-generated score (0-100). If < 85, auto-retry initiated
  6. User Feedback - Thumbs up/down. Down = retry (max 3 attempts total)
  7. Preview - Mini-viewport displays generated website

Quality Assurance System

AI Model Configuration

Admins configure the AI model for web coding via Settings:

UI Components

UI Layout (Three-Column Design) - v2.0

Right Sidebar Button Order (by popularity)

  1. 💾 Save - Green button (most frequently used)
  2. 👁️ Preview - Open website preview in new tab
  3. 🚀 Publish - Publish website live
  4. ✏️ Visual Editor - Open WYSIWYG editor
  5. 📁 Load Existing - Load saved website
  6. 📋 Templates - Browse template gallery
  7. 📤 Export - Export website files
  8. ⚙️ Settings - Builder settings

Viewport Simulation

Toolbar Functions

ButtonFunctionLocation
Desktop/Tablet/MobileViewport size switchingCenter toolbar (left)
HomePage navigation dropdownCenter toolbar (right)
Add PageaddNewPage()Center toolbar
RenamerenamePage()Center toolbar
DeletedeletePage()Center toolbar
Undo/RedoChange history (placeholder)Center toolbar
PreviewopenPreview()Right sidebar
Load ExistingloadExistingWebApp()Right sidebar
SavesaveWebsite()Right sidebar
Visual EditoropenVisualEditor()Right sidebar
TemplateopenTemplateGallery()Right sidebar
PublishpublishWebsite()Right sidebar

File Locations

API Endpoints

Authentication

MethodEndpointDescription
POST/api/auth/loginUser login
POST/api/auth/signupUser registration
POST/api/auth/verify-pinPIN verification

Websites

MethodEndpointDescription
GET/api/websitesList user websites
GET/api/websites/:idGet website details
POST/api/websitesCreate new website
PUT/api/websites/:idUpdate website
DELETE/api/websites/:idDelete website

PODS Architecture

Frontend PODS

PODLocationVersionPurpose
Websitesdashboard/websites/v1.2.1Website management
Templatesdashboard/templates/v1.0.0Template management

Backend PODS

PODLocationPurpose
Promptsserver/pods/prompts/Prompt history API

Environment Variables

PORT=3016
DB_HOST=localhost
DB_USER=vibecode
DB_PASSWORD=vcb123secure
DB_NAME=vibecode_builder
JWT_SECRET=vcb_production_secret_key_2026_pro
OPENROUTER_API_KEY=sk-or-v1-...
NODE_ENV=production
AI_PROVIDER=rosie
VCB_BRIDGE_URL=http://127.0.0.1:3016

Deployment

Start Server (via PM2)

cd /opt/vibecode-builder/essentials/app/server
pm2 start index.js --name vcb-essentials
pm2 save

Manual Start (for testing)

cd /opt/vibecode-builder/essentials/app/server
node index.js

Note: .env file in parent directory is symlinked to server/ for proper config loading

Development Notes

Current Status

Known Issues

Builder Tools

ToolLocationStatus
AI Chat Builder/builder/chat/Active
WYSIWYG Editor/builder/wysiwyg/Active
Forms Maker/builder/forms/v1.0
Database Creator/builder/database/v2.0
Idea Factory/builder/idea-factory/Active
Template Gallery/builder/template-gallery/Active

Dashboard Pages

PageLocationDescription
Dashboard Home/dashboard/Main dashboard with sidebar
My Websites/dashboard/websites/Website management
My Templates/dashboard/user-templates/Template management
My Forms/dashboard/forms.htmlForm management
My Data/dashboard/my-data/Database management
Design Library/design-library/Image/PDF management

Current Status


Server Location: /opt/vibecode-builder/essentials/

Server Log: /root/.pm2/logs/vcb-essentials-out.log

Backup Location: /archive/backups/

Zena Backup: /home/winston/backups/essentials/

Last Updated: 2026-05-23 | Version: 4.0 | Maintainer: Rosie (Operations)