# About Hitchy's ODM

Hitchy is a server-side framework purely written in Javascript. It consists of a core which comes with limited abilities as it is basically capable of essentially handling requests via HTTP and discovering plugins to provide some actual request handlers.

Hitchy's ODM is an object document manager integrating with Hitchy as a discoverable plugin. It doesn't provide actual request handlers, but provides an API for managing structured data. It

  • focuses on non-relational data,
  • intends to provide a simple way for defining data structures,
  • supports an API to adopt database APIs for persistently storing structured data and
  • offers another API for accessing structured data using server-side code.

Using Hitchy's ODM

If you intend to access your data via HTTP requests you might be interested in another plugin called hitchy-plugin-odem-rest.

# Structured Data?

In an ODM you define types of data or classes or models. Every model describes instances or records of actual data each complying with a certain structure. This structure is part of a model's definition. It is a set of actual properties, each of a certain type of information and optionally attached with certain constraints. On handling instances of a model every property of that model may have an individual value for either instance.


The common use case for starting a web application is a blog. A blog has posts, comments and users that act in different roles. These all are models of that application.

Every model consists of common properties. A blog is always having a title and some content, a time of creation and an author. In opposition to that a comment belongs to a post, but has an author, some content and a time of creation as well. Users have a unique login name, a secret password and some mail address.

Some properties are meant to be unique or to be always there. Such keywords indicate constraints that might apply on a property. Constraints are rules to be met by either instance of a model prior to saving it in a database or similar. This helps assuring the integrity of data.

All this describes similarities in records of actual data. It doesn't describe any actual data of your application, though, such as a user named Bob or Alice or any of either user's posts in particular. Information describing Bob and Alice as users are instances of the model user.