This example shows patterns to implement a data admin app which allows users to view, create new, edit and delete data records.
The data in this very basic example contains a set of brands, and a set of products saved in a MongoDB database. A one-to-many relation exists between brands and products. Each product is related to one brand, and a brand can be related to many products.
This Lowdefy application consists of four pages.
Adding a new brand, editing an existing brand and viewing the saved brands have been split up into separate pages. This implementation is a simpler approach than that of the products. Adding a new product, editing an existing product and viewing the saved products are all done on one page. Drawers are used in order to get this right, which leads to a more complex implementation.
example-crud
)..env
file in your project folder and set your MongoDB database connector URI as a variable in the .env
file: LOWDEFY_SECRET_EXAMPLES_MDB="{{ your_mongodb_connection_uri }}"
pnpx lowdefy@4 dev
.