Chapter 1. Introduction

JoyfulWorker DMS is a simple document management system (DMS) implemented in Ruby and PostgreSQL. The main design goal are as follows:

DMS is not designed to be fancy. It is designed to be simple, reliable, and scalable. It provides a clean way to store, track, and associate metadata with documents. It does not concern itself with the content or identity of documents beyond their IDs. From its perspective, it's a simple repository — stick a new document in it, and it gives you back a unique ID with which to identify it. With that ID, you have the means to retrieve, overwrite, or delete it. Since the document ID is stored in a database, you can also associated an unlimited amount of metadata with it. But beyond the document ID, DMS could care less, and leaves it up to you to make sense of things. All it needs and knows about is basically the ID.

DMS consists of two principle components: a file system directory structure and a database. The file system holds the actual files/data, and the database holds all of the metadata about those files. Separately, each component is useless. For DMS to have any meaning, both components must be used together, and kept perfectly consistent. DMS library is therefore not just an API to provide a simple way to store documents, but also the means that guards and preserves the integrity between the file system and its associated database information.