https://github.com/thoughtworksinc/mooncake
A D-CENT project: Secure notifications combined with w3 activity streams
https://github.com/thoughtworksinc/mooncake
Last synced: 4 months ago
JSON representation
A D-CENT project: Secure notifications combined with w3 activity streams
- Host: GitHub
- URL: https://github.com/thoughtworksinc/mooncake
- Owner: ThoughtWorksInc
- License: mit
- Created: 2015-08-04T16:42:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-01T10:49:34.000Z (about 9 years ago)
- Last Synced: 2024-12-31T19:10:44.731Z (5 months ago)
- Language: Clojure
- Homepage:
- Size: 665 KB
- Stars: 3
- Watchers: 26
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://snap-ci.com/d-cent/mooncake/branch/master)
A D-CENT project: Secure notifications combined with w3 activity streams
["Mooncake"](https://en.wikipedia.org/wiki/Mooncake#Ming_revolution)
## Development VM
You can develop and run the application in a VM to ensure that the correct versions of Mooncake's dependencies
are installed. You will need [VirtualBox][], [Vagrant][] and [Ansible][] installed.First, clone the repository.
Navigate to the ops/ directory of the project and run:
vagrant up development
The first time this is run, it will provision and configure a new VM.
When the VM has started, access the virtual machine by running:
vagrant ssh
The source folder will be located at `/var/mooncake`.
After initial setup, navigate to the source directory with:
cd /var/mooncake
[Vagrant]: https://www.vagrantup.com
[Ansible]: http://docs.ansible.com/ansible/intro_installation.html
[VirtualBox]: https://www.virtualbox.org/### Running
To start the app, run:
lein stub
Go to localhost:3000 see the application running.
### Running test suite
To run all tests, use this command:lein test
Commands and aliases can be found in the project.clj file.
### Running the prototypeSimply type:
```
gulp server
```### Activity sources
Activities are expected in the following format:
{
@context: "http://www.w3.org/ns/activitystreams",
published: "2015-12-18T14:25:40.240Z",
type: "Add", --- used to customise the feed
object: {
url: "http://objective8.dcentproject.eu/objectives/41/questions/28", (optional)
name: "Why?",
type: "Question" --- used to set the action text
},
actor: {
name: "Jane Doe"
},
target: (optional) {
url: "http://objective8.dcentproject.eu/objectives/41", (optional)
name: "This Objective"
}
}
The timestamp uses the format YYYY-MM-DDThh:mm:ss.sZ as specified in the international standard ISO 8601.They should be presented inside a collection:
{
@context: "http://www.w3.org/ns/activitystreams",
type: "Collection",
name: "Activity stream",
totalItems: 23,
items: [
]
}The activity source must support the ```to``` and ```from``` query parameters, returning activities with a
published time less than or greater than the provided timestamp respectively. For example,
```https://objective8.dcentproject.eu/as2/activities?from=2015-12-22T14:00:00.000Z``` should return all activities that
occurred after 2pm on the 22nd December 2015.## Adding translations
The translation files can be found at ```resources/lang/```. To support a new language, you should create a new
```{language}.yml``` file and add to the ```client_translations.clj``` and ```time_translations.cljs``` files.You can add any unsupported activity or object types to the ```activity-type``` section in ```{language}.yml``` in the following format:
action-text-{object type}: action text here
customise-feed-{activity type}: text here for customise feed viewFor example,
activity-type:
action-text-objective: created an objective
customise-feed-create: Created content## Deployment
To deploy using Docker, see [here](doc/Docker.md).
To deploy to Heroku, see [here](doc/Heroku.md).