Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
signaldb
Advanced tools
Readme
SignalDB is an innovative client-side database designed for modern web applications. It provides a powerful MongoDB-like interface that simplifies data handling with first-class TypeScript support, enhancing type safety and development experience. This JavaScript database is tailored for creating an optimistic UI, allowing developers to build responsive and dynamic user interfaces with ease.
Data persistence is a core feature of SignalDB. It enables the storage of data through a JSON interface in various storage providers, including the widely-used localStorage. This flexibility allows you to choose the most suitable storage mechanism for your application, whether you're aiming for temporary session storage or more permanent data retention.
SignalDB excels in situations where quick and efficient data handling is crucial. The use of a client-side approach ensures that data is readily available without the latency associated with server-side databases. This instant access to data is particularly beneficial for applications requiring high performance and real-time interactions.
Furthermore, SignalDB's architecture is designed to be lightweight and unobtrusive. It doesn't lock you into a specific framework, making it a versatile choice for a wide range of JavaScript applications. Whether you're working on a small project or a large-scale application, SignalDB's intuitive API and flexible design make it an ideal choice for developers looking to enhance their application's data management capabilities.
$ npm install signaldb
import { Collection } from 'signaldb'
const posts = new Collection()
const postId = posts.insert({ title: 'Foo', text: 'Lorem ipsum …' })
const cursor = collection.find({})
console.log(cursor.fetch()) // returns an array with all documents in the collection
In theory, every signal library is supported. SignalDB currently have pre-build reactivity adapters for these libraries:
More information in the reactivity section of the documentation.
import { effect } from '@preact/signals-core'
// OR
import { effect } from '@angular/core'
// OR
import { autorun as effect } from 'mobx'
// OR
import { createEffect as effect } from 'solid-js'
// OR
import { watchEffect as effect } from 'vue'
// ...
const posts = new Collection({
reactivity: /* ... */ // see https://signaldb.js.org/reactivity/ for reactivity adapters for your favorite library,
})
effect(() => { // will be executed everytime the query result changes
const cursor = posts.find({ author: 'John' })
console.log(cursor.count())
})
Please also take a look at the documentation
SignalDB harnesses the power of signal-based reactivity to offer a dynamic and responsive user experience. Our architecture integrates seamlessly with various signal libraries, ensuring compatibility and flexibility across different JavaScript frameworks. Whether you're using Angular, React, Vue.js, or others, SignalDB adapts to your preferred environment, enhancing the reactivity of your web applications.
At the heart of SignalDB lies its advanced handling of collections and queries. Our in-memory data storage approach ensures blazing-fast query performance, perfect for applications requiring real-time data manipulation and retrieval. This setup allows for a synchronous API, eliminating the complexity of asynchronous operations and making data handling straightforward and efficient.
SignalDB's data persistence layer is designed for scalability and flexibility. It offers various strategies for persisting data, from simple localStorage
implementations to more complex external systems. This versatility allows for customization based on your application's needs, ensuring data is stored efficiently and securely. Our architecture supports the evolution of your application, providing a solid foundation for growth and expansion.
Looking ahead, SignalDB plans to implement a cutting-edge data replication engine, drawing inspiration from established protocols like the RxDB replication protocol (more info). Initially, we'll offer data replication through a persistence interface for RxDB, with further expansions to follow. Our commitment to extensibility means that we're continually evolving, adding new features and capabilities to meet the ever-changing demands of modern web development.
Licensed under MIT license. Copyright (c) 2024 Max Nowack
Contributions are welcome. Please open issues and/or file Pull Requests.
FAQs
SignalDB is a client-side database that provides a simple MongoDB-like interface to the data with first-class typescript support to achieve an optimistic UI. Data persistence can be achieved by using storage providers that store the data through a JSON in
The npm package signaldb receives a total of 53 weekly downloads. As such, signaldb popularity was classified as not popular.
We found that signaldb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.