|
1 | 1 | # Openframe Frame Controller |
2 | 2 |
|
3 | | -> Note: This repo is under development and is not ready for serious use. |
| 3 | +> *Friendly disclaimer:* This project is under active development; we cannot promise that everything will work 100%. We encourage you to try it out! Feedback and <a href="https://github.com/OpenframeProject">pull requests</a> are welcome :) |
4 | 4 |
|
5 | | -### Design Notes |
6 | | - |
7 | | -The Openframe controller acts as a process manager for starting, stopping, and transitioning between artworks. It communicates with an [Openframe API Server](https://github.com/OpenframeProject/Openframe-APIServer) server via a REST API, and connects to a [global event system](https://github.com/OpenframeProject/Openframe-PubSubServer) allowing for realtime updates. The idea is to work towards a system which supports the basic goals of Openframe, guided by a handful of [pilot use cases](https://github.com/OpenframeProject/Openframe-API/wiki/Pilot-Use-Cases). |
| 5 | +The Openframe controller is the software that runs on the frame itself (i.e. the RPi), acting as a process manager for starting, stopping, and transitioning between artworks. It communicates with an [Openframe API Server](https://github.com/OpenframeProject/Openframe-APIServer) server via a REST API, and connects to a [global event system](https://github.com/OpenframeProject/Openframe-PubSubServer) allowing for realtime updates. The idea is to work towards a system which supports the basic goals of Openframe, guided by a handful of [pilot use cases](https://github.com/OpenframeProject/Openframe-APIServer/wiki/Pilot-Use-Cases). |
8 | 6 |
|
9 | 7 | The block diagram below represents a proposed architecture for the Openframe platform. It will continue to evolve as development on the project progresses. |
10 | 8 |
|
11 | 9 |  |
12 | 10 |
|
13 | 11 | #### Modules |
14 | 12 |
|
15 | | -* `index.js` - node script which starts the frame software |
16 | 13 | * `controller.js` - manages the actions around controlling the frame (changing artwork, updating settings, etc.) |
17 | 14 | * `process-manager.js` - manages starting and stopping processes for displaying artworks |
18 | 15 | * `plugin-manager.js` - manages installing and initializing plugins (aka extensions) |
19 | | -* `frame.js` - a wrapper for the Frame model |
| 16 | +* `frame.js` - a wrapper for the Frame model, which gets persisted to |
20 | 17 | * `user.js` - a wrapper for the User model |
21 | 18 | * `pubsub.js` - creates and manages connection to global event system |
| 19 | +* `rest.js` - creates and manages connection to REST API via Swagger.js |
22 | 20 | * `downloader.js` - utility for downloading files |
23 | 21 | * `config.js` - configuration options |
24 | 22 |
|
25 | | - |
26 | 23 | ### Usage |
27 | 24 |
|
28 | 25 | > FYI: Pardon the lack of detail and documentation. We'll be updating frequently over the coming weeks / months! |
29 | 26 |
|
30 | | -If you're just trying to get a frame up and running on a Raspberry Pi, please hold tight :). We'll be updating the install instructions soon! |
| 27 | +If you're just trying to get a frame up and running on a Raspberry Pi, please check out the [Openframe User Guide](https://github.com/OpenframeProject/Openframe/wiki/Openframe-User-Guide). |
31 | 28 |
|
32 | 29 | If you're interested in hacking on Openframe, feel free to fork/clone this repo. Run `npm install` to install the deps, then start up the openframe software: |
33 | 30 |
|
34 | 31 | ``` |
35 | 32 | $ npm start |
36 | 33 | ``` |
37 | 34 |
|
38 | | -### Extensions |
| 35 | +Upon startup, the application will prompt you for your Openframe username and password, and a name for this frame. You can run this on a mac or linux machine (windows untested), though various artwork format extensions are likely to be developed with a specific target platform in mind. |
39 | 36 |
|
40 | | -Extensions are npm packages which add functionality to the frame, either by adding support for a new artwork format (i.e. media type) or by adding other functionality. |
| 37 | +### Configuration files |
41 | 38 |
|
42 | | -For more info on extensions, see the [Openframe-ExtensionExample](https://github.com/OpenframeProject/Openframe-ExtensionExample) repo. |
| 39 | +When you run `npm install`, the `install.sh` script will be executed. This script creates a hidden directory, `.openframe`, in your user home folder (/home/{username}/.openframe), and copies the default `.ofrc`configuration file there. The `.ofrc` file contains the server settings — by default this will point to the hosted API server at openframe.io, but if you're running a local server for development or are hosting your own API server you can update the settings in `.ofrc` accordingly. |
43 | 40 |
|
44 | | -### TODOs / Considerations / Questions |
| 41 | +After starting the application and answering the prompts, two additional files are created in the `.openframe` dir, `frame.json` which stores the frame state, and `user.json` which stores user data. |
| 42 | + |
| 43 | +### Extensions |
| 44 | + |
| 45 | +Extensions are npm packages which add functionality to the frame, either by adding support for a new artwork format (i.e. media type) or by adding other functionality. |
45 | 46 |
|
46 | | -* Auto-updating code? (e.g. https://github.com/grapeot/learn-expressjs/blob/master/bootstrap.js) |
47 | | -* Manage extensions via API... this is sort of there, as Frames and Artworks both have a `plugins` property. |
48 | | -* More example extensions. |
49 | | -* Should we define a namespace structure for extension-specific events? Channels? |
| 47 | +For more info on extensions, see the [Openframe-ExtensionExample](https://github.com/OpenframeProject/Openframe-ExtensionExample) repo. |
0 commit comments