logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·03.11.26
← Back to news

Show HN: WebBase-III – dBASE III rebuilt in the browser with its own interpreter

Original article
github.com|55 points|13 comments|by ddecoene|Jun 24, 2026

WebBase-III: A Modern Browser-Based Reimagining of dBASE III

Before the era of SQL dominance, ORMs, and the concept of "full-stack" development, there was dBASE III. It was a world where a simple USE customers followed by a LIST command gave you immediate access to your data.

WebBase-III resurrects this experience. It is a comprehensive reconstruction of the dBASE III ecosystem—including the terminal, the specialized language, the BROWSE utility, @ SAY GET form layouts, .prg scripting, indexing, and reporting. This is not a mere emulation but a modern web application featuring a custom interpreter written in TypeScript, powered by Node.js, WebSockets, and SQLite.

Open in GitHub Codespaces


🛠️ System Architecture

The application operates through a client-server model where the interpreter manages the state for each user session.


🌟 Key Capabilities

🖥️ The Terminal & REPL

The heart of the app is the command interface. By typing W3Script, users get instantaneous feedback.

  • LIST: Displays records in a tabular format based on the current active index.
  • Indexing: Using INDEX ON name TO BYNAME generates a SQLite index. This ensures that subsequent LIST calls are sorted alphabetically.
  • SEEK: Allows the user to jump to a specific record (e.g., SEEK "Delta NV") with a time complexity of O(log⁡n)\mathcal{O}(\log n)O(logn).

📊 Data Interaction

  • BROWSE: Launches an interactive, spreadsheet-like grid.
    • Navigation: Use Tab or Enter to modify cells.
    • Management: Ctrl+N adds a row; Delete removes one.
    • Exit: Press Esc to return to the command line.
  • Program Editor: The EDIT name command opens a built-in editor for .prg files. These scripts support full logic: DO CASE/ENDCASE, DO WHILE/ENDDO, IF/ENDIF, and complex data operations.

📝 Form Engine

WebBase-III implements the classic character-cell layout system:

  • Layout: @ row,col SAY "label" GET variable defines the field positions.
  • Execution: The READ command transforms these definitions into a live, interactive form for user input.

🤖 The Assistant

A persistent sidebar provides a GUI layer to the system. It allows users to manage databases, filter data, and design reports without typing.

  • Educational Loop: Every GUI action triggers a corresponding W3Script command in the terminal, teaching the user the language in real-time.
  • Wizards: Tools for creating tables or modifying structures appear in the main window with a live preview of the generated code.

📋 Feature Summary

FeatureTechnical Detail
W3Script InterpreterSupports dBASE III dialect: loops, conditionals, and navigation.
BROWSE GridInline editing with keyboard navigation and index-based sorting.
Form Engine@ ROW,COL layout system triggered by the READ command.
IndexingINDEX ON, SEEK, and FIND for record pointer control.
LogicDO CASE with OTHERWISE fallbacks for multi-branching.
Built-in FunctionsEOF(), BOF(), FOUND(), RECNO(), SUBSTR(), STR(), AT(), CTOD(), DTOC(), etc.
Scripting.prg files managed via DO and EDIT.
The AssistantSidebar for GUI-driven DB management and report design.
ConcurrencyMulti-user support via isolated WebSocket interpreter sessions.
Persistencebetter-sqlite3 with WAL mode ensures data survives restarts.

🚀 Getting Started

Installation Checklist

  • Install Node.js
  • Clone the repository
  • Run npm install

Execution Commands

To start the environment, use the following:

Development Mode:

npm run dev
# Access via http://localhost:5173

Production Mode:

npm run serve
# Builds and serves on http://localhost:3000

Note: The server binds to 0.0.0.0, making it compatible with LAN or Tailscale IPs (e.g., http://tailscale-ip:3000).


💻 Example Session

USE DATABASE mydb
CREATE TABLE customers (name CHAR(40), phone CHAR(20), country CHAR(30))
USE customers
APPEND RECORD REPLACE name WITH "Acme Corp", phone WITH "555-1234", country WITH "BE"
APPEND RECORD REPLACE name WITH "Zeta Ltd", phone WITH "555-5678", country WITH "NL"
INDEX ON name TO BYNAME
LIST               -- Output is now sorted A→Z
SEEK "Zeta Ltd"    -- Instant jump to record
BROWSE             -- Open the editable grid
SET FILTER TO country == "BE"
LIST               -- Only Belgian customers shown
SET FILTER TO      -- Clear the filter

📖 W3Script Reference

Work Areas

WebBase-III supports an unlimited number of work areas (unlike the original dBASE III, which was limited to 10 due to DOS file handles). Each area maintains its own:

  1. Table
  2. Record pointer
  3. Filter
  4. Index

Relational Data: Use SET RELATION TO to link work areas via key fields for automatic seeking during navigation.

Syntax Note: While dBASE III used alias->field (arrow syntax), WebBase-III adopts the modern alias.field (dot notation).

Common Commands

CommandDescription
SELECT aliasActivates or creates a specific work area.
USE table [ALIAS name]Opens a table in the active area (optional alias).
SET RELATION TO expr INTO aliasLinks the active area to another; auto-seeks on move.
SET RELATION TORemoves the relation from the active area.
LIST [col]Displays records in the current area.