Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.33-pr.279.c3fe9fePrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.33-pr.279.c3fe9fe"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.33-pr.279.c3fe9fe"
}
}
Preview published to npm registry — try new features instantly! |
|
README check ran. 4 issue(s) found and applied: added missing |
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
This PR adds full CRUD entity support to the local dev server, allowing developers to work with entity data entirely in-memory without hitting the remote Base44 API. It introduces an in-memory database layer using
@seald-io/nedbthat initializes a separate datastore per entity, and wires up an Express router with standard REST endpoints for each entity. The dev command is also updated to load entity schemas in parallel with functions on startup.Related Issue
None
Type of Change
Changes Made
@seald-io/nedbas a dev dependency for in-memory database supportsrc/cli/dev/dev-server/database.ts: aDatabaseclass that manages per-entity NeDB datastoressrc/cli/dev/dev-server/routes/entities.ts: Express router with full CRUD endpoints for entities:GET /User/me— proxied to remoteGET /:entityName— list records (supportssort,limit,skip,fields,qquery params)GET /:entityName/:id— get a single record by IDPOST /:entityName— create a record (auto-assignsid,created_date,updated_date)POST /:entityName/bulk— bulk insert an array of recordsPUT /:entityName/:id— update a record (updatesupdated_dateautomatically)DELETE /:entityName/:id— delete a single recordDELETE /:entityName— delete multiple records matching a query bodysrc/cli/dev/dev-server/main.tsto initialize theDatabaseand mount entity routes at/api/apps/:appId/entitiessrc/cli/commands/dev.tsto load entities in parallel with functions usingPromise.allREADME.mdcommand table to includeeject,connectors pull,connectors push, andtypes generateTesting
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
The entity routes follow the same pattern as the existing function routes. The
/User/meendpoint is explicitly proxied to remote since user identity must come from the real Base44 backend. All other entity collections are served locally from in-memory NeDB datastores, which are initialized fresh on eachbase44 devinvocation (data does not persist between runs).🤖 Generated by Claude | 2026-02-19 15:18 UTC