Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turtle-DB/turtleDB
Official turtleDB project
https://github.com/turtle-DB/turtleDB
Last synced: 3 months ago
JSON representation
Official turtleDB project
- Host: GitHub
- URL: https://github.com/turtle-DB/turtleDB
- Owner: turtle-DB
- License: mit
- Created: 2018-07-04T18:37:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-10T19:52:48.000Z (over 6 years ago)
- Last Synced: 2024-03-14T17:13:54.420Z (11 months ago)
- Language: JavaScript
- Size: 13.7 MB
- Stars: 437
- Watchers: 14
- Forks: 14
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome-list - turtleDB - DB | 438 | (JavaScript)
README
Overview •
Getting Started •
Features •
Contributors •
License •# Overview
turtleDB is a JavaScript framework and in-browser database for developers to build offline-first, collaborative web applications. It provides a developer-friendly API to access an in-browser database built on top of IndexedDB.
It comes with built in document versioning and automatic server synchronization when paired with our back-end package [tortoiseDB](https://github.com/turtle-DB/tortoiseDB), as well as developer-controlled, flexible conflict resolution strategies for any document conflicts while collaborating.
You can check out our [API documentation](https://turtle-db.github.io/api) and read more about the story behind project itself [here](https://turtle-db.github.io/about).
Note: for the best user experience we strongly recommend using Chrome.
# Getting Started
## Install
```javascript
npm i turtledb
```## Usage
```javascript
import TurtleDB from 'turtledb';
// or
const TurtleDB = require('turtledb');
``````javascript
// Create a new database
const mydb = new TurtleDB('example');// Link a remote tortoiseDB database to sync to
mydb.setRemote('http://127.0.0.1:3000');// CRUD Operations - all return promises
mydb.create({ _id: 'firstTurtle', species: 'Sea Turtle' });
mydb.read('firstTurtle').then((doc) => console.log(doc));
mydb.update('firstTurtle', { species: 'Giant Turtle' });
mydb.mergeUpdate('firstTurtle', { name: 'Michelangelo' });
mydb.delete('firstTurtle');// Sync
mydb.sync();
```[Full API Documentation](https://turtle-db.github.io/api)
# Features
- Simple Promise-based API
- Integration with IndexedDB
- Document versioning and developer-controlled conflict resolution
- Synchronization with tortoiseDB and a MongoDB back-end
- Batching during synchronization
- Local database compaction# Contributors
Andrew Houston-Floyd - NYC - Website
Max Appleton - SF/Bay Area - Website
Steven Shen - Toronto - Website
# License
This project is licensed under the MIT License.