Graviton

screenshot of Graviton

Relations and models for Meteor collections.

Overview

Graviton is a powerful tool designed for Meteor applications, specifically focused on enhancing the way developers handle collections and relationships between data models. By transforming MongoDB documents into structured models complete with attributes and methods, Graviton streamlines interaction with collections, making data management far more intuitive. The ability to define relationships and traverse them effortlessly enhances the overall efficiency and scalability of applications built on the Meteor framework.

With features that allow for robust data modeling and relationships, Graviton provides an excellent solution for developers looking to optimize their Meteor applications. The built-in transformation methods and seamless integration with various other packages facilitate effective data validation and management, making Graviton a versatile choice for any developer working with Meteor.

Features

  • Model Transformation: Automatically converts MongoDB documents into models, providing an organized structure for attributes and methods.
  • Relationship Definition: Allows developers to define relationships between collections, enabling easy navigation and retrieval of related models.
  • Versatile Methods: Includes built-in methods like set, push, and pop to make intuitive changes to models locally before persisting them to the database.
  • Seamless Integration: Works alongside packages like meteor-simple-schema for validation, making data management smoother and more reliable.
  • User-Friendly Syntax: Simplifies interactions with collections through new methods like all(), build(), and create(), enhancing developer productivity.
  • Error Handling: The Graviton.getProperty(key) function allows safe access to deeply nested attributes without throwing errors, which is especially useful for complex data structures.
  • Timestamp Handling: Optionally adds createdAt and updatedAt timestamps to models, facilitating better data tracking and management.