Draft
Conversation
9aea1ab to
fdb40b7
Compare
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.28-pr.195.8b03abfPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.28-pr.195.8b03abf"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.28-pr.195.8b03abf"
}
}
Preview published to npm registry — try new features instantly! |
fdb40b7 to
d106c5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
Adds a local development mode via the
base44 devcommand that enables running Base44 applications entirely offline without backend connectivity. The implementation includes an Express-based API server that emulates Base44's backend, an in-memory NeDB database for entity storage, and a sophisticated Deno runtime manager that spawns isolated worker processes for each function with dynamic port allocation.Related Issue
None
Type of Change
Changes Made
base44 devCLI command for starting local development serversrc/dev-server/main.ts) running on port 3000 with CORS support@seald-io/nedbfor session-scoped storage with full CRUD operationsFunctionManagerclass that spawns and manages isolated Deno worker processes with automatic port allocation (starting from 4001)/api/apps/:appId/entities) emulating Base44's entity endpoints (list, get, create, update, delete, query)deno-runtime/main.ts) that patchesDeno.serveto inject dynamic ports for function isolationinfra/build.ts) to bundle CLI and Deno runtime separately, changed CLI output todist/cli/index.js.base44/to gitignore templates for both backend-and-client and backend-only project typesexpress,cors,@seald-io/nedb,get-portand their TypeScript type definitionsTesting
bun test)Checklist
Additional Notes
Architecture Overview:
The dev server follows a clean separation of concerns:
src/dev-server/- Express server with routing logic and API emulationdeno-runtime/- Deno-side wrapper that interceptsDeno.serve()calls to inject allocated portsDatabaseclass - Isolated entity CRUD operations with in-memory NeDB storageFunctionManagerclass - Function lifecycle management (spawn, port allocation, readiness detection, cleanup)Current capabilities:
Known limitations:
Future enhancements:
🤖 Generated by Claude | 2026-02-05 14:15 UTC