Full-Stack Website Development Platform for Beginners and Professionals
TechScript WebForge transforms TechScript into an English-like, full-stack website development platform. It allows beginners—including a 10-year-old knowing basic English—to create, run, debug, test, build, and deploy complete websites with interactive UI, real SQLite database persistence, and 3D WebGL scenes, while compiling down to performant native code and optimized web bundles.
- Rust compiler (
rustc&cargo1.80+) - Windows 11, macOS, or Linux
- A modern web browser (Edge, Chrome, Firefox, Safari)
# 1. Create a new full-stack website project
tsc new website MyWebsite
# 2. Enter project directory
cd MyWebsite
# 3. Start local development server with live SQLite and 3D canvas
tsc dev
# 4. View registered routes, REST APIs, and client actions
tsc routes
# 5. Build production bundle into dist/ (HTML, CSS, JS, SQLite schema)
tsc build web --release
# 6. Deploy or inspect deployment targets
tsc deploy -t static
tsc deploy -t docker- Primary Entry File:
src/main.txs(.txsis the official, canonical default). - Optional Modular Extensions:
src/pages/*.wtxs: WebForge interactive pages, components, and templates.src/server/*.stxs: Backend API endpoints, scheduled workers, database daemons.src/scenes/*.3txs: Three.js / WebGL 3D scene viewports.
- Legacy Compatibility: Legacy
.techfiles continue to execute seamlessly. Runtsc migrateto upgrade to modern.txs. - Reference: See TechScript File Extension Standard.
TechScript WebForge extends canonical TechScript with declarative, accessible English constructs:
make a website called MyWebsite
page Home:
show heading "Welcome!"
show text "Built with TechScript WebForge"
show button "Click Me" called GreetingButton
when GreetingButton is clicked:
show message "Hello, World!"
start website
make a website called NotesApp
database Notes:
table notes:
title is text
content is text
page Home:
show heading "My Notes"
show input "Write a note" called NoteInput
show button "Save Note" called SaveButton
when SaveButton is clicked:
send NoteInput to /api/notes
show message "Note saved"
start website
make a website called ThreeDWorld
page Home:
show heading "TechScript 3D WebForge"
show text "Interactive WebGL scene powered by Three.js"
show 3D scene called World:
add cube:
color is "purple"
rotation speed is 3
enable mouse controls
show button "Explore Scene" called ExploreBtn
when ExploreBtn is clicked:
show message "3D Orbit Controls Activated!"
start website
WebForge generates a high-aesthetic responsive dark mode interface:
- Typography: Google Fonts Outfit & JetBrains Mono
- Visuals: Modern radial gradient background (
#1e1b4b->#0f172a->#020617), glassmorphic panels (backdrop-filter: blur(12px)), subtle neon borders (#a855f7). - Micro-Animations: Hover elevations, spring button clicks, animated toast notification manager (
webforgeToast). - Responsive Layout: Fluid grid layout auto-adjusting from mobile screens to desktop ultra-wides.
- Listens on
http://localhost:3000(or user-defined port). - Serves the generated reactive application at
/. - Automatic REST endpoints for declared tables:
GET /api/<table_name>: Returns JSON array of the latest records.POST /api/<table_name>: Accepts JSON payload, validates, inserts into SQLite, and returns{ "status": "ok", "message": "Note saved" }.
- Managed local database file:
webforge.db. - Auto-migrated table schema on startup (
CREATE TABLE IF NOT EXISTS). - Parameterized queries protecting against SQL injection vulnerabilities.
Declarative 3D scene blocks compile into self-contained WebGL canvas elements:
- Lighting: Ambient fill light + directional accent spotlight.
- Mesh: Standard PBR material with metallic sheen and roughness.
- Animation:
requestAnimationFramerender loop with dynamic rotation. - Interaction: Orbit controls via mouse/pointer drag listeners (
pointerdown,pointermove,pointerup). - Responsiveness: Auto-resizes camera aspect ratio and renderer on browser viewport change.
Generates a standalone dist/ directory:
dist/index.html: Fully self-contained or structured production entry point.dist/styles.css: Minified WebForge design system stylesheet.dist/app.js: Extracted client runtime, toast engine, and event bindings.dist/webforge.db: Bundled SQLite database.
- Static Hosting (Vercel / Netlify / Cloudflare Pages):
tsc deploy -t staticcreates pre-configured production files. - Docker Containers:
tsc deploy -t dockeremits multi-stageDockerfileanddocker-compose.yml.
| Crate / Suite | Tests | Status |
|---|---|---|
compiler/parser |
23/23 | ✅ 100% Passed |
compiler/semantic |
16/16 | ✅ 100% Passed |
runtime/interpreter |
12/12 | ✅ 100% Passed |
stdlib |
49/49 | ✅ 100% Passed |
cli (Unit & Snapshots) |
26/26 | ✅ 100% Passed |
webforge_e2e_tests |
4/4 | ✅ 100% Passed |
| Total Test Suite | 130/130 | ✅ 100% Verified |