All Projects → sciactive → Nymph

sciactive / Nymph

Licence: apache-2.0
Data objects for JavaScript and PHP.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Nymph

Qb
The database toolkit for go
Stars: ✭ 524 (+440.21%)
Mutual labels:  sql, orm, database
Godb
A Go SQL query builder and struct mapper.
Stars: ✭ 651 (+571.13%)
Mutual labels:  sql, orm, database
Go Sqlbuilder
A flexible and powerful SQL string builder library plus a zero-config ORM.
Stars: ✭ 539 (+455.67%)
Mutual labels:  sql, orm, database
Nohm
node.js object relations mapper (orm) for redis
Stars: ✭ 462 (+376.29%)
Mutual labels:  orm, database, pubsub
Fluent
Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
Stars: ✭ 1,071 (+1004.12%)
Mutual labels:  sql, orm, database
Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+4740.21%)
Mutual labels:  sql, orm, database
Evolutility Server Node
Model-driven REST or GraphQL backend for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
Stars: ✭ 84 (-13.4%)
Mutual labels:  sql, orm, database
Rel
💎 Modern Database Access Layer for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API
Stars: ✭ 317 (+226.8%)
Mutual labels:  sql, orm, database
Gorose
GoRose(go orm), a mini database ORM for golang, which inspired by the famous php framwork laravle's eloquent. It will be friendly for php developer and python or ruby developer. Currently provides six major database drivers: mysql,sqlite3,postgres,oracle,mssql, Clickhouse.
Stars: ✭ 947 (+876.29%)
Mutual labels:  sql, orm, database
Express Knex Objection
A simple API system on a pg database, using knex and objection to simplify connection and management
Stars: ✭ 20 (-79.38%)
Mutual labels:  sql, orm, database
Android Orma
An ORM for Android with type-safety and painless smart migrations
Stars: ✭ 442 (+355.67%)
Mutual labels:  sql, orm, database
Dbx
A neat codegen-based database wrapper written in Go
Stars: ✭ 68 (-29.9%)
Mutual labels:  sql, orm, database
Gnorm
A database-first code generator for any language
Stars: ✭ 415 (+327.84%)
Mutual labels:  sql, orm, database
Pg
Golang ORM with focus on PostgreSQL features and performance
Stars: ✭ 4,918 (+4970.1%)
Mutual labels:  sql, orm, database
Freezer
A simple & fluent Android ORM, how can it be easier ? RxJava2 compatible
Stars: ✭ 326 (+236.08%)
Mutual labels:  sql, orm, database
Jailer
Database Subsetting and Relational Data Browsing Tool.
Stars: ✭ 576 (+493.81%)
Mutual labels:  sql, database, frontend
Granite
ORM Model with Adapters for mysql, pg, sqlite in the Crystal Language.
Stars: ✭ 238 (+145.36%)
Mutual labels:  sql, orm, database
Sqlhelper
SQL Tools ( Dialect, Pagination, DDL dump, UrlParser, SqlStatementParser, WallFilter, BatchExecutor for Test) based Java. it is easy to integration into any ORM frameworks
Stars: ✭ 242 (+149.48%)
Mutual labels:  sql, orm, database
Nano Sql
Universal database layer for the client, server & mobile devices. It's like Lego for databases.
Stars: ✭ 717 (+639.18%)
Mutual labels:  sql, orm, database
Layr
Dramatically simplify full‑stack development
Stars: ✭ 1,111 (+1045.36%)
Mutual labels:  orm, database, frontend

Nymph

Build Status Demo App Uptime Last Commit license

Powerful object data storage and querying for collaborative web apps.

Nymph is an ORM with a powerful query language, modern client library, REST and Publish/Subscribe servers, and user/group management.

Live Demos

Try opening the same one in two windows, and see one window update with changes from the other.

App Template

To start building an app with Nymph, you can use the Nymph App Template.

Nymph Entities

Nymph stores data in objects called Entities. Relationships between entities are done by saving one entity in another one's property.

// Creating entities is super easy.
async function createBlogPost(title, body, archived) {
  // BlogPost extends Entity.
  const post = new BlogPost();
  post.title = title;
  post.body = body;
  post.archived = archived;
  await post.$save();
  // The post is now saved in the database.
  return post;
}

// Creating relationships is also easy.
async function createBlogPostComment(post, body) {
  if (!(post instanceof BlogPost)) {
    throw new Error('post should be a BlogPost object!');
  }

  const comment = new Comment();
  comment.post = post;
  comment.body = body;
  await comment.$save();
  return comment;
}

const post = await createBlogPost('My First Post', 'This is a great blog post!', false);
await createBlogPostComment(post, 'It sure is! Wow!');

Nymph Query Language

Nymph uses an object based query language. It's similar to Polish notation, as 'operator' : ['operand', 'operand'].

// Object based queries are easy from the frontend.
async function searchBlogPosts(userQuery, page = 0) {
  // The server will only return entities the user has access to.
  return await Nymph.getEntities({
    'class': BlogPost.class,
    'limit': 10,
    'offset': page * 10
  }, {
    'type': '&',
    // You can do things like pattern matching.
    'like': ['title', '%' + userQuery + '%'],
    // Or strict comparison, etc.
    'strict': ['archived', false]
  });
}

// Querying relationships is also easy.
async function getBlogPostComments(post) {
  return await Nymph.getEntities({
    'class': BlogPostComment.class
  }, {
    'type': '&',
    'ref': ['post', post]
  });
}

// Complicated queries are easy.
async function getMyLatestCommentsForPosts(posts) {
  return await Nymph.getEntities({
    // Get all comments...
    'class': BlogPostComment.class
  }, {
    'type': '&',
    // ...made in the last day...
    'gte': ['cdate', null, '-1 day'],
    // ...where the current user is the author...
    'ref': ['user', await User.current()]
  }, {
    // ...and the comment is on any...
    'type': '|',
    // ...of the given posts.
    'ref': posts.map(post => ['post', post])
  });
}

Nymph PubSub

Making collaborative apps is easy with the PubSub server.

function watchBlogPostComments(post, component) {
  const comments = component.state.comments || [];

  const subscription = Nymph.getEntities({
    'class': BlogPostComment.class
  }, {
    'type': '&',
    'ref': ['post', post]
  }).subscribe(update => {
    // The PubSub server keeps us up to date on this query.
    PubSub.updateArray(comments, update);
    component.setState({ comments });
  });

  component.onDestroy(() => {
    subscription.unsubscribe();
  });
}

User/Group Management

Tilmeld is a user management system for Nymph. Check it out at tilmeld.org.

Installation

If you want to build an app with Nymph, you can use the app template.

You can also install Nymph in an existing app by following the instructions in the server and client repos, or in the wiki for Nymph and PubSub.

Nymph Server PubSub Server Tilmeld Server Browser Client Node.js Client Tilmeld Client App Examples

Dev Environment Installation

If you are interested in working on Nymph itself:

  1. Get Docker
    • You can run the Docker install script on Linux with:
      curl -fsSL https://get.docker.com -o get-docker.sh
      sh get-docker.sh
      
    • Or, from the repos on Ubuntu:
      sudo apt-get install docker.io
      sudo usermod -a -G docker $USER
      
      Then log out and log back in.
  2. Get Docker Compose
    • From the repos on Ubuntu:
      sudo apt-get install docker-compose
      
  3. Clone the repo:
    git clone --recursive https://github.com/sciactive/nymph.git
    cd nymph
    
  4. Make sure the submodules are on master:
    git submodule foreach git checkout master
    
  5. Run the app:
    ./run.sh
    

Now you can see the example apps on your local machine:

API Docs

Check out the API Docs in the wiki.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].