Show HN: WebBase-III – dBASE III rebuilt in the browser with its own interpreter
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 customersfollowed by aLISTcommand 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.
🛠️ 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 BYNAMEgenerates a SQLite index. This ensures that subsequentLISTcalls are sorted alphabetically. SEEK: Allows the user to jump to a specific record (e.g.,SEEK "Delta NV") with a time complexity of .
📊 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 namecommand opens a built-in editor for.prgfiles. 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 variabledefines the field positions. - Execution: The
READcommand 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
| Feature | Technical Detail |
|---|---|
| W3Script Interpreter | Supports dBASE III dialect: loops, conditionals, and navigation. |
| BROWSE Grid | Inline editing with keyboard navigation and index-based sorting. |
| Form Engine | @ ROW,COL layout system triggered by the READ command. |
| Indexing | INDEX ON, SEEK, and FIND for record pointer control. |
| Logic | DO CASE with OTHERWISE fallbacks for multi-branching. |
| Built-in Functions | EOF(), BOF(), FOUND(), RECNO(), SUBSTR(), STR(), AT(), CTOD(), DTOC(), etc. |
| Scripting | .prg files managed via DO and EDIT. |
| The Assistant | Sidebar for GUI-driven DB management and report design. |
| Concurrency | Multi-user support via isolated WebSocket interpreter sessions. |
| Persistence | better-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:
- Table
- Record pointer
- Filter
- 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
| Command | Description |
|---|---|
SELECT alias | Activates or creates a specific work area. |
USE table [ALIAS name] | Opens a table in the active area (optional alias). |
SET RELATION TO expr INTO alias | Links the active area to another; auto-seeks on move. |
SET RELATION TO | Removes the relation from the active area. |
LIST [col] | Displays records in the current area. |