Official turtleDB project

Related tags

Database turtleDB
Overview

OverviewGetting StartedFeaturesContributorsLicense

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, as well as developer-controlled, flexible conflict resolution strategies for any document conflicts while collaborating.

You can check out our API documentation and read more about the story behind project itself here.

Note: for the best user experience we strongly recommend using Chrome.



Getting Started

Install

npm i turtledb

Usage

import TurtleDB from 'turtledb';
// or
const TurtleDB = require('turtledb');
// 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

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.

Comments
  • refactored and cleaned up package.json

    refactored and cleaned up package.json

    just got rid of all the extra components and packages we werent using, trying to keep package.json clean and simple.

    also refactored turtle.js and cleaned up the ui a little. lemme know if you think it all looks okay.

    opened by maxiappleton 0
  • TypeError: TurtleDB is not a constructor

    TypeError: TurtleDB is not a constructor

    Hello Turtle-DB team,

    i do install on first time with npm i turtledb

    then make a file turtledb.js

    with code

    const TurtleDB = require('turtledb'); const mydb = new TurtleDB('example');

    then run it with node turtledb.js

    but showing error

    TypeError: TurtleDB is not a constructor

    Can you explain to me where is the problem?

    Thank You

    opened by ghost 0
  • Check if id exists then either update or create

    Check if id exists then either update or create

    I am sure this has to be possible but I have not been able to make heads or tails of how to do it. I would like to check if an id already exists in the db, and if it does, I'd like to update it. Otherwise, I'd like to create a new item in the db with the given id.

    I tried this:

    if(mydb.read(idToCheck)) {
      mydb.update(idToCheck, { data: dataToPost })
    } else {
      mydb.create({ _id: idToCheck, data: dataToPost })
    }
    

    But that returns true every time even if the id does not exist in the db. Any tips?

    opened by polluterofminds 1
  • Use-case Electron multiple renderers

    Use-case Electron multiple renderers

    Hi there, i've also read the medium post, which was written in a great way. Along reading it i was thinking whether this could be used in an Electron app to keep the Main and multiple renderers in sync. Any thoughts about this?

    opened by zewa666 0
  • Queries and Collections

    Queries and Collections

    TurtleDb tackles complex areas I'm very interested in and from reading the Medium article and docs the work so far looks impressive. My specific interest is adding full offline capabilities to Clibu (www.clibu.com) a knowledge base app I'm developing which has similarities to apps like Evernote.

    Clibu uses MongoDb on the server and currently makes light use of Dexie.js in the Browser. I've spent considerable time researching Browser Dbs, offline use, sync, eventual consistency etc. and have played with various solutions including PoachDb which isn't a good fit.

    If I'm correct Turtledb doesn't have any querying or indexing capabilities, nor support for Mongodb style collections. I couldn't see any mention of these in the Roadmap. Am I missing something, if not are these planned? These are essential for my use case and are fully supported by Dexie.js as are nested arrays of documents with indexes on same.

    I am seriously evaluating another framework, however now that Turtledb has come along things may change.

    opened by nevf 2
Owner
turtleDB
A framework for creating offline-first, collaborative web applications
turtleDB
Couchbase Node.js Client Library (Official)

Couchbase Node.js Client The Node.js SDK library allows you to connect to a Couchbase cluster from Node.js. It is a native Node.js module and uses the

null 460 Nov 13, 2022
Nano: The official Apache CouchDB library for Node.js

Nano Offical Apache CouchDB library for Node.js. Features: Minimalistic - There is only a minimum of abstraction between you and CouchDB. Pipes - Prox

The Apache Software Foundation 578 Dec 24, 2022
Run official FLAC tools `flac` and `metaflac` as WebAssembly, on browsers or Deno.

flac.wasm Run official FLAC tools flac and metaflac as WebAssembly, on browsers or Deno. Currently we have no plans on supporting Node.js. Try it onli

Pig Fang 15 Aug 21, 2022
project overview tool, used to analyze the amount of code, the number of files, code statistics and so on.

pot z-pot is a project overview tool, used to analyze the amount of code, the number of files, code statistics and so on. 项目概述工具,用于分析代码量、文件数、代码统计等。 快速

zhangchi 18 Aug 10, 2022
Burger builder project using React, Hooks and Context API.

Burger Builder In this project, I made a context-api project by creating hamburgers with 3 different materials. Project setup npm install Project star

Efecan Pınar 4 Jun 17, 2021
Scratch project

onlydevs Only Devs for Lonely Devs (A dating application for you losers) Scratch project Front-end: REACT with Redux, react router dom for compenent r

null 3 Jul 8, 2021
Welcome to the LEGO Games Repository, where you can enjoy anytime, anywhere. This is the 2021 KNU Advanced Web Programming team project.

Welcome to LEGO git repository! Here are some useful information about LEGO service. 0. Docker image Link : https://hub.docker.com/r/leibniz21c/legoga

Heesung Yang 16 Jul 21, 2022
A template for WebSockets powered Cloudflare Worker project using graphql-ws

?? graphql-ws on Cloudflare Workers A template for WebSockets powered Cloudflare Worker project using graphql-ws. The worker serves the following rout

Denis Badurina 26 Dec 18, 2022
A Gmail Clone which built with ReactJS and Redux. You can sign in with your Google Account, compose a new e-mail and send realtime emails to the project.

Gmail Clone with ReactJS A Gmail Clone that you can sign in with your Google Account, compose a new e-mail and send realtime emails to the project. Cl

Özge Coşkun Gürsucu 49 Nov 14, 2022
Senior Design Project. Water intake tracker. Software for the communication to bottle and app. Software for app and database

WaterMate Senior Design Project. Water intake tracker to provide everyone with an easy to use water tracking system that can be integrated with your f

null 3 Nov 10, 2021
Database Engineering PHP Project

ICT502-Database-Engineering This repository contains the Database Engineering end-of-semester project. It uses PHP as the back-end processing language

Farhana Ahmad 2 Oct 11, 2021
Project-x - Данный проект несет за собой сугубо образовательный характер и не подразумевает получения финансовой выгоды.

Project - X Данный проект несет за собой сугубо образовательный характер и не подразумевает получения финансовой выгоды. Все наработки в рамках данног

null 3 Apr 12, 2022
The Wholesome App. A project that allows you to upload images directly to MongoDB Atlas into your collection, a faster cloud database.

The Wholesome App. A project that allows you to upload images directly to MongoDB Atlas into your collection, a faster cloud database. To upload your cute and wholesome images.

Gourav Singh Rawat 2 Jul 17, 2022
NodeJS,express and mysql starter project

Node-express-mysql-starterproject NodeJS,express and mysql starter project Start with cloning the repo & Run npm i to download all the dependecies Aft

Nermine slimane 16 Dec 11, 2022
The Firma Project - Backend

Firma About This is a backend for Firma Project. The Firma project is another corporate piece of software to engage employees to collaborate with othe

Firma 8 Feb 5, 2022
This is the semester project for the course "Databases" at ECE-NTUA, in 2021.

Hotel Management project Semester Assignments for Databases course, summer semester 2021 Concept The project's concept is to create a system that mana

ApoGrs 4 Nov 28, 2022
First NestJS project powered by TypeScript (Simple CRUD)

First Nest TS (TypeScript) First NestJS project powered by TypeScript (Simple CRUD) Routes Get All GET http://localhost:3000/products/ Get one GET htt

Max Base 3 Feb 22, 2022
📄 Easily implement pagination into your Knex.js project.

knex-pagination Easily implement pagination into your application. Usage const knex = require('knex'); const paginate = require('knex-pagination'); co

Snoot 2 Apr 16, 2022
New base script bot wa by Ramdani Official, don't forget to subscribe youtube Ramdani Official.

Requirements • Installation • Thanks to • Official Group Bot • Donate Information bahasa Indonesia Ramdani Botz V17 adalah bot yang di ciptakan oleh R

Ramdani Official 22 Nov 1, 2022
The Official MongoDB Node.js Driver

MongoDB NodeJS Driver The official MongoDB driver for Node.js. NOTE: v3.x released with breaking API changes. You can find a list of changes here. Ver

mongodb 9.6k Dec 28, 2022