Skip to content

Project Structure

Michael Kleinhenz edited this page Apr 14, 2016 · 3 revisions

StoryQuest is a compound system consisting of an editor based on web technology and a series of clients based on various technologies based on the specific target platform technologies. This document describes the basic technology and architecture of the various components.

Editor

The editor itself consists of two distinct components: the frontend, based on HTML5 and the backend, based on a nodeJS service container. The frontend is a pure HTML5 application running in all current browsers and based on AngularJS. It communicates to the nodeJS backend with stateless REST calls. The communcation doesn't use any HTTP states to keep the system scalable.

The backend is based on nodeJS and provides the REST endpoints and the static hosting for the AngularJS frontend. The backend also authenticates requests based on a filter chain and a custom state mechanism.

Data is stored on the filesystem (for the project content data) and in a CouchDB (for the user data and project metadata). The project data is at all times synced to the filesystem to allow parallel manual editing of projects. One of the design goals was to enable editing projects via the web editor and an offline development environment in parallel.

All project data is stored in a project-specific directory under the projects directory. The projects directory has a specific layout that has to be followed:

Directory Contents
css CSS code
images All media resources like images, fonts, embedded videos
js JavaScript code
resources Dropin code
stationconfig Book content

The book content directory stationconfig contains the actual book data. A book consists of a series of nodes (stations). Each station is represented as two files: a JSON file with metadata and a TXT file with the actual chapter text.

Android Client

The Android client is a standard Android client project residing in client-android. It uses the standard Google build system based on Gradle and the Android Gradle plugin. The Gradle build is also used from the editor in the automated web build.

On build time, content from the project and editor is copied to the android build directory to package it along with the Android code. For the web build, the Android client is entirely copied to a temporary space to make sure the system does a clean build and does not interfere with parallel running builds of other projects.

Clone this wiki locally