Configuring LibCrowds

This page details all of the core LibCrowds settings. To edit them you can begin by copying the settings template:

cd /path/to/libcrowds
cp local.config.js.tmpl local.config.js

Required Settings

The following settings are all required for the application to run correctly. They are given defaults in the settings template but should be edited accordingly.

annotations

A server that complies with the Web Annotation Protocol is required to handle the storage and retrieval of user tags and results data.

LibCrowds has been built for use with the Explicates server, which complies with the standard protocol and has the additional search functionality required for this application.

The Setup section contains details on setting up an Annotation server, the base URL of which should then be added to the local settings file, as below.

config.explicates = {
  baseURL: 'http://127.0.0.1:3000'
}

brand

The name of the platform.

config.brand = 'My Brand'

company

The company responsible for the platform.

config.company = 'My Company'

description

An SEO optimised description of the platform.

config.description: 'My SEO optimised meta description'

libcrowdsHost

The host where this application will be deployed

config.libcrowdsHost: 'http://127.0.0.1:8080'

pybossaHost

The host for all PYBOSSA API calls.

config.pybossaHost: 'http://127.0.0.1:5000'

tagline

Some inspiring tagline.

config.tagline: 'My inspiring tagline'

Optional Settings

The following can be added to the configuration file to enable additional functionality.

analytics

Add Google Analytics to the platform by providing your tracking ID.

config.analytics = {
  ua: 'UA-XXX-X'
}

This will enable event tracking for the following events:

Category Action Label Description
Downloads {type}_{format} Project name or AnnotationCollection IRI Data file is downloaded
Statistics view Project name Project statistics viewed
Contributions {project name} Collection name Answer submitted
Filters {filter value} Collection name Main projects list filtered
Project Toolbar {name}_shown Collection name Project modal shown

Tracking these events can help to determine the content that your users are most interested in. For example, monitoring the filters most used for a microsite can help determine the types of project that should be prioritised for release at a given time.

Social interactions will be tracked using the social media 'Share' buttons present on the site. However, note that this reports button clicks and does not guarantee that the user actually then went ahead and shared the page.

User IDs are used to track all registered and authenticated users.

docs

Provide a URL to the platform's documentation that will be linked to from the main footer and all admin dashboard pages.

config.docs: 'http://docs.libcrowds.com'

If you want to use your own documentation site, please include the page structure found in the original documentation's mkdocs.yml file. This is beacuse many of these paths are linked to from specific LibCrowds admin pages.

email

Add a contact email address to the main footer.

config.email = 'me@example.com'

facebook

Add a Facebook app ID to enable Open Graph integration.

config.facebook = {
  appId: '1234567890'
}

flarum

Enable Flarum integration by adding the base url of the forum, a master apiKey, the sessionCookieDomain and a random string as the salt that is used to encrypt passwords.

The flarum-ext-sso extension will also need to be installed for your Flarum instance and the API key created during this installation process should be used in the configuration below.

config.flarum = {
  url: 'http://community.example.com',
  sessionCookieDomain: '.example.com',
  apiKey: 'XXX-XXX-XXX',
  salt: 'super-secret-string',
  disableEmailConfirmation: true
}

Adding these settings will enable SSO and add the ability to link each collection microsite to a particular forum topic.

Warning

Beware that if SSO is enabled, then disabled, user's will not be able to access their forum accounts without resetting their passwords.

Add an additional list menu to the main footer.

config.footer = {
  title: 'Newsletter',
  items: [
    { text: 'Sign up', url: 'http://mailchimp.signup.url' }
  ]
}

github

Add a GitHub link to the main footer.

config.githubUrl = 'https://github.com/github'

https

Force HTTPS for all external requests.

config.https = true

sentry

Enable Sentry error tracking.

config.sentry = {
  public_key: '',
  private_key: '',
  project_id: ''
}

social

A list of social profile links to add to the site's structured metadata.

config.social = [
  'http://www.facebook.com/your-profile',
  'http://instagram.com/yourProfile',
  'http://www.linkedin.com/in/yourprofile',
  'http://plus.google.com/your_profile'
]

twitter

Adds a twitter link to the main footer and enhances the platforms Twitter cards with twitter:site meta tag.

config.twitter = 'mytwitterhandle'

disableProjectBuilder

Disable project building functions for non-admin users.

config.disableProjectBuilder = true