🍹 MongoDB ODM for Node.js apps based on Redux

Related tags

Database mongodb odm
Overview




Lightweight and flexible MongoDB ODM for Node.js apps based on Redux.

Build Status Coverage Status

Features

Flexible

Mongorito is based on Redux, which opens the doors for customizing literally everything - from model's state (reducers) to the behavior of core methods, like set(), save() or find().

Each model instance has a separate Redux store, which ensures isolation between other models and easy extensibility.

No schemas

If MongoDB doesn't enforce schemas, why would Mongorito do? Enjoy the schema-free data management with Mongorito the same way you do in mongo console.

Lightweight

Mongorito is betting on 3rd-party plugins to deliver extra functionality to developers. Mongorito ships with a barebones model with basic get/set, save/remove and querying functionality and let's you be in control of what's included and what's not.

Mongorito is basically a tiny Redux-based application, which uses the official MongoDB driver and mquery for querying. Not that amount of lines are relevant when measuring complexity, but each file (module) is less than 300 lines. Check out the source code and see for yourself!

Quick overview

const {Database, Model} = require('mongorito');

const db = new Database('localhost/blog');
await db.connect();

class Post extends Model {}

db.register(Post);

const post = new Post({
	title: 'Steve Angello rocks',
	author: {
		name: 'Emma'
	}
});

await post.save();

post.set('author.name', 'Rick');
await post.save();

await db.disconnect();

Note: await won't work at top level, it's used to reduce the complexity of an example.

Installation

$ npm install --save mongorito

Contents

Connection

Mongorito exports several own classes, as well as a few properties from the MongoDB driver:

const {
	Database,
	Model,
	Timestamp,
	ObjectId,
	MinKey,
	MaxKey,
	DBRef,
	Long
} = require('mongorito');

Database and Model are Mongorito's own exports, all the other ones are exported straight from mongodb package for convenience. Normally, you'd need only Database, Model and ObjectId.

To connect, initialize a Database, which accepts a MongoDB connection string and an optional configuration which will be passed to mongodb's connect function.

To connect and disconnect use connect()/disconnect() methods. Both returns a Promise.

For convenience, await will be used in all examples below, even though it doesn't work at top level.

const {Database, Model} = require('mongorito');

const db = new Database('localhost/blog', {
	reconnectTries: 5
});

await db.connect();
await db.disconnect();

You don't have to wait until connection establishes to perform operations. Mongorito automatically executes pending operations once connection is up.

Models

Creating a model

Model is the connection between your data and a database. Each model represents a single collection. Model is a simple class, which doesn't even need to have any properties or methods.

class Post extends Model {}

For Post model to work and be aware of the database it's connected to, make sure to register it in the database we created earlier.

db.register(Post);

That's it, the Post model is good to go!

Working with fields

To create a new document, create an instance of Post model.

const post = new Post();

Model's constructor also accepts an object of fields to instantiate the document with:

const post = new Post({
	title: 'Great post',
	author: {
		name: 'Sarah'
	}
});

Note, documents can contain nested fields and even models, just like in MongoDB.

To get one or all fields from the post document, use a get() method.

const title = post.get('title');
//=> "Great post"

const author = post.get('author.name');
//=> "Sarah"

const data = post.get();
//=>
//  {
//    title: "Great post"
//    author: {
//      name: "Sarah"
//    }
//  }

Similarly, use set() to update fields:

// update fields one by one
post.set('title', 'Amazing post');
post.set('author.name', 'Monica');

// or all at once
post.set({
	title: 'Amazing post',
	author: {
		name: 'Monica'
	}
});

To remove a field, use unset():

// unset single fields
post.unset('title');
post.unset('author.name');

// or multiple fields at once
post.unset(['title', 'author.name']);

Saving or removing documents

To create or update documents, simply call save(). Even though Mongorito differentiates these two operations internally, you don't have to care about that! Mongorito also infers the collection name from the model, so the instances of the model Post will be saved to posts collection.

await post.save();

When a document is saved, an _id field is automatically added.

post.get('_id');
//=> ObjectId("5905cb6b543c3a50e03e810d")

To remove a document, use remove().

await post.remove();

To remove multiple documents, use remove() on the model itself with a query as an argument.

await Post.remove({good: false});

Incrementing fields

Mongorito also provides a handy increment() method to increment or decrement numerical fields:

const post = new Post({
	views: 0
});

await post.increment('views');

post.get('views');
//=> 1

You can also supply a value to increment a field by a specific amount.

await post.increment('views', 2);

post.get('views');
//=> 3

Multiple fields can be incremented at once, too.

const post = new Post({
	views: 10,
	comments: 10
});

await post.increment({
	views: 2,
	comments: 5
});

post.get('views');
//=> 12

post.get('comments');
//=> 15

Embedding other models

Just like MongoDB, Mongorito allows to effortlessly embed other models. They're transparently converted between JSON and Mongorito models.

To embed models, use embeds() method on the model itself to help Mongorito with the model serialization when saving/reading from the database. embeds() method accepts a field name, where the embedded document (or array of documents) resides.

Here's the quick overview on how it works. Note, that model registering via register() is skipped in the following example.

class Post extends Model {}
class Author extends Model {}
class Comment extends Model {}

Post.embeds('author', Author);
Post.embeds('comments', Comment);

const post = new Post({
	title: 'Great post',
	author: new Author({name: 'Steve'}),
	comments: [new Comment({body: 'Interesting!'})]
});

await post.save();

The above post will be saved to the database as:

{
	"title": "Great post",
	"author": {
		"name": "Steve"
	},
	"comments": [
		{
			"body": "Interesting!"
		}
	]
}

You can also just pass objects instead of model instances and Mongorito will take care of that too.

const post = new Post({
	title: 'Great post',
	author: {
		name: 'Steve'
	},
	comments: [{
		body: 'Interesting!'
	}]
});

When that document will be retrieved from the database next time, all embedded documents will be wrapped with their corresponding models.

const post = await Post.findOne();

const author = post.get('author');
//=> Author { name: "Steve" }

author.get('name');
//=> "Steve"

Configuration

Using a different collection name

In case you need to store documents in a custom collection, you can override the default one using collection() method.

class Post extends Model {
	collection() {
		return 'awesome_posts';
	}
}

Queries

Mongorito uses mquery to provide a simple and comfortable API for querying. It inherits all the methods from mquery with a few exceptions, which will be documented below. For documentation, please check out mquery's API - https://github.com/aheckmann/mquery.

Here's a quick overview of how querying works in Mongorito. All documents returned from queries are automatically wrapped into their models.

// find all posts
await Post.find();

// find all amazing posts
await Post.find({amazing: true});
await Post.where('amazing', true).find();

// find 5 recent posts
await Post
	.limit(5)
	.sort('created_at', 'desc')
	.find();

// find one post
await Post.findOne({incredible: 'yes'});

// count posts
await Post.count({super: false});

Plugins

Using plugins

To use a 3rd-party plugin, all you have to do is to call use() method.

const timestamps = require('mongorito-timestamps');

db.use(timestamps());

This will apply mongorito-timestamps to models registered after that.

If you want to apply the plugin to a specific model only, call it on the model itself.

Post.use(timestamps());

Writing plugins

A plugin is simply a function that accepts a model. A familiarity with Redux and its concepts will help you tremendously with writing plugins.

const myPlugin = model => {
	// do anything with model (Post, in this case)
};

Post.use(myPlugin);

Feel free to assign new methods to the model or instances, add new middleware, modify the model's state and anything that comes to your mind.

Extending model with new methods

Here's an example of adding a class method and an instance method to a Post model.

const extendPost = Post => {
	Post.findRecent = function () {
		return this
			.limit(5)
			.sort('created_at', 'desc')
			.find();
	};

	Post.prototype.makeAmazing = function () {
		this.set('amazing', true);
	};
};

Post.use(extendPost);

const post = new Post();
post.makeAmazing();
post.get('amazing');
//=> true

const posts = await Post.findRecent();
//=> [Post, Post, Post]

Modifying model's state

If you plugin needs to have its own state, you can modify the model's reducer using modifyReducer() method. It accepts a function, which receives the existing reducer shape as an argument and should return a new object with added reducers.

const customReducer = (state = null, action) => {
	// reducer code...
};

const extendReducer = model => {
	model.modifyReducer(reducer => {
		return {
			...reducer,
			customState: customReducer
		}
	});
};

Changing behavior using middleware

Middleware can be used to change or modify the behavior of model's operations. You can interact with everything, from get/set operations to queries.

To add plugin's custom middleware to the default middleware stack, return it from the plugin function.

const myPlugin = () => {
	return store => next => action => {
		// middleware code...
	};
};

Obviously, to detect what kind of action is being handled, you need to be aware of Mongorito's action types.

const {ActionTypes} = require('mongorito');

const myPlugin = () => {
	return store => next => action => {
		if (action.type === ActionTypes.SET) {
			// alter set() behavior
		}

		return next(action);
	};
};

Again, the middleware is identical to the middleware you're used to when writing apps with Redux. There are only 2 new properties added to the store:

  • model - instance of the model (document) the middleware is currently running in. If middleware is running at the model level (without instantiated model), it will be undefined.
  • modelClass - model class (Post, for example).

Here's an example on how to access all props of the store:

const myPlugin = () => {
	return ({getState, dispatch, model, modelClass}) => next => action => {
		// `getState()` and `dispatch()` are from Redux itself
		// `model` is `post`
		// `modelClass` is `Post`

		return next(action);
	};
};

Post.use(myPlugin);

const post = new Post();
await post.save();

For examples on how to write middleware, check out Mongorito's native ones - https://github.com/vadimdemedes/mongorito/tree/master/lib/middleware.

Migrating from legacy version

Connection

Before:

const mongorito = require('mongorito');

mongorito.connect('localhost/blog');

After:

const {Database} = require('mongorito');

const db = new Database('localhost/blog');
await db.connect();

License

MIT © Vadim Demedes

Comments
  • Mongorito v3

    Mongorito v3

    Hey everyone, Mongorito's been quiet for a long time now, but it deserves more attention that it has right now. I've been looking into library's code, repository issues and pull requests and decided to roll out a v2 of Mongorito in the coming weeks.

    Current state of Mongorito's codebase is not what I want it to be. It is bloated and it does not fit a variety of use cases. Here's a plan of improvements to build into a new major release. Note, that it will not be compatible with the current version, so a migration guide will be provided.

    Roadmap

    1. No more singleton Mongorito instance

    Instead of this:

    const mongorito = require('mongorito');
    mongorito.connect(url);
    

    We're going to have something like this:

    const mongorito = require('mongorito');
    const db = mongorito.create(); // or
    const db = new mongorito.Database(); // or
    const db = new mongorito.Db(); // or
    const db = mongorito.connect();
    

    Singleton Mongorito object leads to a dirty code in Mongorito's codebase and makes the whole library less flexible. It makes connecting to multiple databases inconvenient.

    2. Drop .extend() and go ES6 only

    After the next release, .extend() is no longer to be included in the core. To define a model, you will have to use ES6 classes.

    3. Registration of models

    Since singletons are to be discontinued (see point nr. 1) and the only way to define a model is through an ES6 class (see previous point), there has to be a way to connect models to databases. In Mongoose you have db.model() method and we'll have something similar:

    db.register(Post);
    db.register(Comment);
    

    I think this is simple enough and easy to understand what it's for.

    4. Export only necessary properties from the native driver

    Currently, Mongorito exports every property with a few exceptions from the native driver. I don't think it serves any purpose, as what's most often needed is just ObjectId.

    5. Drop generator support in hooks

    Since you can define hooks explicitly for before, after and around events, there's no need for flow control via generator functions. Next release will only support "regular" functions and functions that return Promises (async functions).

    Note, you will still be able to use code like this:

    const post = yield Post.find();
    

    This change is related only to defining hooks inside models.

    6. Use query building library like mquery

    I think it would be wise to not reinvent the wheel and wrap some query building library (like mquery) to handle the queries in Mongorito. Those libraries usually have good command coverage, so I think most people's needs would be satisfied.

    Feel free to discuss and add anything to this list.

    opened by vadimdemedes 32
  • in operator on _id throws

    in operator on _id throws "Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"

    When we use in operator on _id, find throws Used as :

    var listings = yield models.Listings.in("_id",this.query.id).find();
    

    Error:

    Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
          at new ObjectID (/Users/saikiran/Work/hack-cm/server/node_modules/mongorito/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid.js:38:11)
          at toObjectId (/Users/saikiran/Work/hack-cm/server/node_modules/mongorito/util/to-objectid.js:26:9)
          at Query.find (/Users/saikiran/Work/hack-cm/server/node_modules/mongorito/lib/query.js:332:20)
          at Object.<anonymous> (/Users/saikiran/Work/hack-cm/server/src/routes/properties.js:207:66)
          at next (native)
          at onFulfilled (/Users/saikiran/Work/hack-cm/server/node_modules/koa/node_modules/co/index.js:65:19)
          at /Users/saikiran/Work/hack-cm/server/node_modules/koa/node_modules/co/index.js:54:5
          at Object.co (/Users/saikiran/Work/hack-cm/server/node_modules/koa/node_modules/co/index.js:50:10)
          at Object.toPromise (/Users/saikiran/Work/hack-cm/server/node_modules/koa/node_modules/co/index.js:118:63)
          at next (/Users/saikiran/Work/hack-cm/server/node_modules/koa/node_modules/co/index.js:99:29)
          at onFulfilled (/Users/saikiran/Work/hack-cm/server/node_modules/koa/node_modules/co/index.js:69:7)
          at process._tickDomainCallback (node.js:411:9)
    
    bug help wanted 
    opened by SaikiranDaripelli 12
  • Connection errors when application starts

    Connection errors when application starts

    I'm using Mongorito with MongoLab (addon). 50% of the time when the app comes out of sleep mode, it gets an exception of bad connection

    2016-01-11T14:45:17.549001+00:00 app[web.1]: Unhandled Rejection at: Promise  Promise {
    2016-01-11T14:45:17.549009+00:00 app[web.1]:   <rejected> [TypeError: Cannot read property 's' of undefined] }  reason:  [TypeError: Cannot read property 's' of undefined]
    2016-01-11T14:45:17.552551+00:00 app[web.1]: TypeError: Cannot read property 's' of undefined
    2016-01-11T14:45:17.552554+00:00 app[web.1]:     at Function._collection (/app/node_modules/mongorito/lib/mongorito.js:103:15)
    2016-01-11T14:45:17.552556+00:00 app[web.1]:     at Function.Model._collection (/app/node_modules/mongorito/lib/mongorito.js:663:19)
    

    My connection.js looks like this:

    'use strict';
    let Mongorito = require('mongorito');
    
    class Connection {
      constructor () {
      }
    
      connect() {
        return Mongorito.connect(process.env.MONGOLAB_URI || 'localhost/example');
      }
    }
    
    module.exports = Connection
    

    And app.js:

    process.on('unhandledRejection', function(reason, p) {
      console.log("Unhandled Rejection at: Promise ", p, " reason: ", reason);
      console.log(reason.stack)
      process.exit(1);
    });
    
    let Connection = require('./connection')
    let connection = new Connection
    connection.connect()
    

    Any idea why this might happen?

    bug priority 
    opened by burgalon 12
  • I can't seem to get find() to return my data

    I can't seem to get find() to return my data

    I'm trying to use find() to query a table in my database.

    const obj = await tags.where('guildID', msg.guild.id).find()
    

    For some reason, that doesn't return what I'm looking for, It returns this:

    Now streaming realtime logs for [2] process
    2|encipio  | [ tags {
    2|encipio  |     store: 
    2|encipio  |      { dispatch: [Function],
    2|encipio  |        subscribe: [Function: subscribe],
    2|encipio  |        getState: [Function: getState],
    2|encipio  |        replaceReducer: [Function: replaceReducer],
    2|encipio  |        [Symbol(observable)]: [Function: observable] } },
    

    My table looks like this:

    {
    	"_id" : ObjectId("596618ccf394244ff3575b0a"),
    	"guildID" : "321417443585032203",
    	"tagName" : "MongoDB",
    	"tagContent" : "test",
    	"tagInfo" : {
    		"author" : "288855795951599617",
    		"createdAt" : ISODate("2017-07-12T12:40:39.437Z"),
    		"usage_content" : 1
    	},
    	"usage_count" : 5
    }
    

    Is this an issue with mongorito? I'm pretty sure the query is right.

    opened by Texlo-Dev 11
  • Timestamps (created_at, updated_at)

    Timestamps (created_at, updated_at)

    It seems illogical to have a created_at and updated_at set on the before create hook. You don't know what async functions are being run and a JSON Schema validation will have to include these fields when they are system set in most APIs.

    Also, not being able to turn them on/off and set the field names is restricting. Some people prefer camelCase over snake_case.

    class User extends Mongorito.Model {
    
      configure () {
        this.before("create", "validate");
      }
    
      * validate(next) {
           console.log(this.get()) 
      }
    }
    
    
    opened by sidhuko 10
  • Error occured while fetch all records

    Error occured while fetch all records

    on start I get this error:

    [Error: Module did not self-register.]
    js-bson: Failed to load c++ bson extension, using pure JS version
    

    and when I try to yield SomeModel.all(); this error throws:

    TypeError: Cannot read property 'find' of undefined
          at Query.find (/Users/artem/Projects/elastic/metagen/node_modules/mongorito/lib/query.js:127:37)
          at GeneratorFunctionPrototype.next (native)
    

    My model looks like

    var Mongorito = require('mongorito');
    var Model = Mongorito.Model;
    Mongorito.connect('mongodb://localhost:27017/mydb');
    
    var Api = Model.extend({
        collection: function () {
            return 'apis';
        }
    });
    
    module.exports = Api;
    

    I'm using Koajs and iojs

    opened by asci 10
  • allow .then on Query

    allow .then on Query

    When execute mquery methods on Query class, not have .then method

    before:

    Post.where('_id', 1).then() // error non function
    Post.findOneAndUpdate(...).then() // error non function
    

    after:

    Post.where('_id', 1).then() // Promise
    Post.findOneAndUpdate(...).then() // Promise
    
    await Post.findOneAndUpdate(...) // works
    
    opened by EduardoRFS 8
  • fix to-objectid crashes when id is not a valid object id

    fix to-objectid crashes when id is not a valid object id

    I have a couple of legacy mongo collections where _id is a Meteor Random and not ObjectId. Since mongorito searches for _id in query and automatic converts the id to obj id I was having crash all the time when i try to search this collection. I tried with find({ _id }) too, but then i realize mongorito was converting to obj id in find too, which is nice feature. This small change fix the crash problemas. If the user send a invalid _id, it will return null instead of crash. And it will still work with those collections where _id is not ObjectId.

    opened by garrefa 8
  • Implement object/array based hook assignment

    Implement object/array based hook assignment

    Add the #.hook method to instances of model, which provides an API for assign any kind of hook, and allows one to assign hooks using a configuration hash, or using a hook name and an array of methods. Makes all hook methods delegate to #.hook. Add tests for functionality.

    opened by ErikPeterson 8
  • Add use method with co-style generator and return a Promise.

    Add use method with co-style generator and return a Promise.

    I would suggest adding a Mongorito.use(connection, generatorFn) method. Where connection can be an established MongoDB client connection/pool, or a mongodb style connection string. and the generator function receives the Mongorito instance to use, where the connect/disconnect happen in the wrapper... the generatorFn essentially called like co@4 and returning a Promise.

    Mongorito.use(cnstr, function *(db) {
      //do stuff with db
    }).then(function (){
      //it's all good
    }).catch(function(err){
      //oh noes!!!
    });
    

    This would allow for someone writing a db layer to use Mongorito with co-style interaction in a generator, but have a final return that can be the promise... allowing for thenable chains outside said method. :-)

    opened by tracker1 8
  • Before save hook doesn't work

    Before save hook doesn't work

    I'm following the examples to abort save but doesn't work in node v8.0.0. I also test with —harmony param but nothing.

    The example is in bottom: http://mongorito.com/guides/middleware/

    Any help is welcome.

    opened by DavidBernal 7
  • can update the internal mongodb driver

    can update the internal mongodb driver

    Simply that... the mongodb driver used is of version 2.x, and the most updated is abobe 3.x.

    Mongondb 2.x falls in to high bulnerabilities mentioned in classic denependency check tools; can you update (and check that not breacks nothing) the version of that dependencies?

    thanks

    opened by sanslash332 0
  • How to check the current state of the connection with the database?

    How to check the current state of the connection with the database?

    I'm using this awesome library in a small microservice to connect to mongo and control some documents on it; but, the microservice deppends directly of this connection, so if the connection if dropped, instead of have a constant answer of http 500 or something other controlled error, I want to dettect if the connection was dropped, and throw an exception to destroy the ms.

    So, how to I can check the connection state?

    Thanks :)

    opened by sanslash332 0
  • Enormous difference between Github docs and Site docs

    Enormous difference between Github docs and Site docs

    Hi! I'm willing to notify you about outdated Getting Started part in your site. I tried to use quick start from it (http://mongorito.com) and example doesn't work at all! I use your example from Github and it work perfect. Thanks!

    opened by nikkaktus24 1
  • How to use findOneAndUpdate with option upsert : true ?

    How to use findOneAndUpdate with option upsert : true ?

    So I want to save document with insert or update if exist, and figured out that findOneAndUpdate with opt {upsert:true} maybe could, but it encounter error when save(). How is proper use of this method? here is my code :

    Mdel.upsert = async (where, data, cb) => {
    		const start = new Date();
    		const existdt = await Mdel.findOneAndUpdate(where, data, {
    			upsert: true
    		}).find();
    		console.log('exisdata', existdt);
    		await existdt.save();
    		console.log('speed of upsert', new Date() - start);
    		cb(existdt);
    	};
    

    and this is the error msg:

    (node:21468) UnhandledPromiseRejectionWarning: TypeError: existdt.save is not a function warning.js:18 at Function.Mdel.upsert (D:\app\botkorter\src\dbase.js:46:17)

    opened by bv99 0
  • support for hashed indexes, and compound indexes

    support for hashed indexes, and compound indexes

    Hi, in this issues, https://github.com/vadimdemedes/mongorito/issues/9#issuecomment-71807246

    How can I create hashed index, and compound indexes in models.

    An example would be great.

    Thanks

    opened by devendrapratap02 2
Releases(v0.6.0)
Owner
Vadim Demedes
Working on Lotus (https://getlotus.app) to easier to keep up with GitHub notifications without stress.
Vadim Demedes
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
A high performance MongoDB ORM for Node.js

Iridium A High Performance, IDE Friendly ODM for MongoDB Iridium is designed to offer a high performance, easy to use and above all, editor friendly O

Sierra Softworks 570 Dec 14, 2022
A back-end server aplication created using node.js, express and mongodb.

Course Material and FAQ for my Complete Node.js, Express and MongoDB Bootcamp This repo contains starter files and the finished project files for all

Pablo César Jiménez villeda 1 Jan 4, 2022
5-BackControlFinanzas - Node & MongoDB

API para APP 'Control Finanzas' Pequeña API/Backend creada para la aplicacion personal de Control Finanzas. Enlace de github a la aplicacion que requi

Ignacio Tirado 1 Jan 3, 2022
A Node.js ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud.

Dittorm A Node.js ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud. Installatio

Waline 21 Dec 25, 2022
A node.js locks library with support of Redis and MongoDB

locco A small and simple library to deal with race conditions in distributed systems by applying locks on resources. Currently, supports locking via R

Bohdan 5 Dec 13, 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
MongoDB object modeling designed to work in an asynchronous environment.

Mongoose Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Mongoose supports both promises and callbacks. Do

Automattic 25.2k Dec 30, 2022
The ultimate solution for populating your MongoDB database.

Mongo Seeding The ultimate solution for populating your MongoDB database ?? Define MongoDB documents in JSON, JavaScript or even TypeScript files. Use

Paweł Kosiec 494 Dec 29, 2022
📇 Generates and parses MongoDB BSON UUIDs

uuid-mongodb Generates and parses BSON UUIDs for use with MongoDB. BSON UUIDs provide better performance than their string counterparts. Inspired by @

Carmine DiMascio 96 Nov 21, 2022
A MongoDB-like database built on top of Hyperbee with support for indexing

hyperbeedeebee A MongoDB-like database built on top of Hyperbee with support for indexing WIP: There may be breaking changes in the indexing before th

null 35 Dec 12, 2022
E-Commerce Application developed with nodejs and stored to mongodb.

E-Commerce Application This Application has been developed with nodejs and mongodb. Environment Variables Create a file named config.env in config dir

Abdullah Öztürk 13 Dec 23, 2021
Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others. Runs under Windows, Linux, Mac or as web application

Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others. Runs under Windows, Linux, Mac or as web application

DbGate 2k Dec 30, 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
A joi extension to validate MongoDB's ObjectIDs

@marsup/joi-objectid This is a simple joi extension to validate MongoDB's ObjectIDs. Installation npm install --save @marsup/joi-objectid Usage const

Nicolas Morel 2 Dec 15, 2022
A starter template for Nest.js with MongoDB, GraphQL, JWT Auth, and more!

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

Michael Guay 19 Dec 25, 2022
🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️

A reactive database framework Build powerful React and React Native apps that scale from hundreds to tens of thousands of records and remain fast ⚡️ W

Nozbe 8.8k Jan 5, 2023
Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.

Lovefield Lovefield is a relational database written in pure JavaScript. It provides SQL-like syntax and works cross-browser (currently supporting Chr

Google 6.8k Jan 3, 2023