umutozel/Beetle.js — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a JavaScript data manager library that makes working with server data feel simple, kind of like Entity Framework and LINQ but in the browser.

I want it to track entities, detect edits, create and delete items, and save all pending changes back to the server. It should support querying data from an MVC or WebApi style backend, including filtering, sorting, paging, grouping, aggregates like count and sum, and loading related data. It should also let me run similar queries against local in memory collections.

Please support observable entities with Knockout or plain ES5 style properties, basic inheritance in models, validation rules like required, length, range, email, url, and auto handling of common data types like guid, date, boolean, number, and enum. It should work even when metadata is not available, fix navigation properties when foreign keys change, and use promises cleanly.

Please include tests and a small end to end example showing a controller, creating an entity manager, querying, editing data, and saving changes. Look up current docs online if you need to.

Want more depth? Deep Reverse