Insights into what moves us. Contributions from the Structr team and guests. The Structr Blog

Christian Morgner
07. October 2014

What Are Structr's Use-Cases?

We often get questions like this: "Structr looks great and everything, but what can I actually to with it?" so I decided to write a blog post to answer these questions.

A little bit of history

For those who haven't followed the long and winding road that is Structr's history: it all started four years ago with a simple CMS, based on the Graph Database Neo4j. From there, the development was influenced by many different projects. Each project had its own requirements, and Structr is the essence of all the things those projects had in common.

What We are using Structr for

Maybe the easiest way to start this list of use-cases is to look at the projects that we do with Structr, since we are most likely the ones who know it best.

structr.org

Our website, structr.org, is of course based on Structr. This is not quite the "Basic CMS" use-case one would expect, because we have all those little things in there that you need for a real website. Structr.org has blog articles, authors, images, messages, feedback, features and categories, all of which are modeled using the Schema Editor. Structr even sends an e-mail when a new Feedback object is posted via the feedback form, using the below simple function expression (which is of course declared in the Schema Editor as well). This function is defined in the onCreate method of the Message entity (which is not depcited in the screenshot for brevity's sake).

(
    send_plaintext_mail(
        'contact-form@structr.com',
        'structr.com Contact Form',
        'team@structr.com',
        'Structr Team',
        this.subject,
        concat('Message from ', this.name, ' (', this.eMail, '): ', this.message)
    )
)

structr.com

Structr.com is the current home of the Structr hosting service. The Structr instance that powers the hosting service is one of the most advanced Structr projects we have. It manages all of the hosted instances using an API client for the cloud hosting provider and an ssh-based state machine protocol that controls the Structr instances on each server. The user management, payments, PayPal integration and hosting options are all built with Structr, although most of the mission-critical code is of course written in Java.

docs.structr.org

http://docs.structr.org is the Structr documentation site which fetches raw content from GitHub and displays it using Structr's integrated Markdown processor to create and display the HTML documentation.

Structr supports the following markup dialects:

  • Markdown
  • Textile
  • MediaWiki
  • TracWiki
  • Confluence
  • AsciiDoc

I blogged about the migration of our documentation content to GitHub recently.

The Epresia Recommendation Engine

Epresia is a German start-up that provides gift recommendations and other services around presents for friends, co-workers and family members. Structr powers the recommendation engine behind Epresia. It uses the Structr Java API and relies heavily on the flexible configuration options of the Structr REST server.

The Beer Graph

Structr serves as the backend for a mobile app written by one of our team members, Alexander Thiele, who built a social beer sharing / recommendation system called Bier Graph. This is of course more of a recreational use-case, but it supports the fact that Structr is a very good fit for mobile application backends.

Other projects

There are many other projects, some of which I will only mention anonymously. The list includes an e-learning platform (backend and frontend), a speaker and conference management system (backend and frontend), a hotel catalog and reservation system (backend and frontend), a social network (REST backend), another recommendation engine project (backend), and more.. Structr even powers our internal project management solution, which grows and evolves every day as we use it.

Structr is by far the most integrable piece of Software I have ever used.

The fact that the Structr REST server provides access to all elements of the Structr UI including schema, page and content information, users etc. (protected by fine-grained access control rules) enables an unprecedented degree of integration with other systems and scripts. You can use Python, bash scripting (curl, grep, awk, sed), etc... Basically the tools of your choice, to access the database, create, modify or delete data, users, schema information etc. Structr is easily scriptable and is perfectly suited for ROCA-style web applications.

Example

I set up Ansible this weekend to better manage the growing number of hosted instances. Ansible is an ssh-based infrastructure and configuration management tool that needs almost no configuration on the managed hosts. If you're familiar with Ansible: the most important piece of information is the so-called inventory which lists and groups all the hosts in your environment. Since we have a list of hosted instances in our Structr hosting platform, it was a matter of a few minutes to prepare a JSON document that contains only the information needed for the Ansible inventory, which I then fed to the Python JSON parser to create a dynamic inventory script:

#!/usr/bin/python

import json
import urllib2

# create the request and authorize it
url = urllib2.Request("http://localhost:8282/structr/rest/inventory")
url.add_header("X-User", "user")
url.add_header("X-Password", "password");

# load and parse the JSON document from Structr
data = json.load(urllib2.urlopen(url))

# remove id and type from the result
del data["result"][0]["id"]
del data["result"][0]["type"]

# print the result
print json.dumps(data["result"][0], indent=4)

Other possible use-cases

Replace the company wiki

Structr is the perfect replacement for your company's elderly wiki (if you can get all the unstructured data out of it). You can create new data types, extend existing ones, create new pages, shared spaces etc. You can start with a Structr-based generic "information storage" system and evolve it into a powerful specialized business solution that grows with your requirements.

Present and visualize your data

Create specialized views of your data in a few minutes and use it in your presentations. You can of course use the full power of Cypher in your Structr application.

Manage your assets

Structr has an integrated FTP server that provides access to pages, files and images in your database with the same fine-grained access controls that are available everywhere in the system.

Integrate Structr into your processes

Structr has a powerful command execution API that lets you run external tools and scripts for data processing and integration with other systems.

Test your designs

Test new screen designs in a matter of minutes. Import your design into Structr, wire it up and see how it looks with your live data.

Store your reporting data

Route your reporting data into Structr, and analyze it later. You can easily adapt the database schema at runtime, add new attributes or even new types. Changes to the schema are available in the REST interface immediately. You can write batch jobs that organize things or evaluate the data periodically.

tl;dr

Structr is a very flexible system that is well integrable into existing environments and lets you store, analyse, evaluate and visualize your data in unprecedented ways, using the Power of the Graph.

Contact us for more information, see our training page or request a personal evaluation workshop.