Skip to content

Latest commit

 

History

History
166 lines (126 loc) · 6.58 KB

README.md

File metadata and controls

166 lines (126 loc) · 6.58 KB

crowdsource

a collaborative crowd sourcing and funding tool using virtual currency

Current build status: Build Status

Example installation: https://crowd-source.herokuapp.com You can register with anything. To "receive" activation emails and such please go to: https://crowd-source.herokuapp.com/mails. A regular user: [email protected]:einEselGehtZumBaecker! An admin: [email protected]:einAdminGehtZumBaecker!

Please feel free to mess around with this installation :)

Documentation

Modules

crowdsource-frontend The frontend-module contains the angularjs client app along with js-tests for it. It will be bundled in a jar file and then integrated into the core-app.

crowdsource-core The core-module contains the backend for crowdsource. It integrates the resources-jar generated by frontend-module.

crowdsource-example Example crowdsource-application. You can use this as a basis for your own build.

crowdsource-integrationtests Some end-to-end-, integration-, acceptance-, blackbox-, you-name-it-tests.

Example developer run config

java -jar crowdsource-example.jar

Token signing

CrowdSource uses JWT with a token signing key. These (tokensigningkey/tokensigningkey.pub) must be present under /src/main/resources. You can generate a pair of your own using ssh-keygen.

Persistence

CrowdSource uses MongoDB. You should provide the DB hosts comma-separated via property de.asideas.crowdsource.db.hosts. Eg java -jar ... -Dde.asideas.crowdsource.db.hosts=hosta,hostb,hostc For local development you can use the embed-mongo-maven-plugin that is used in the integrationstests as well. Simply run mvn com.github.joelittlejohn.embedmongo:embedmongo-maven-plugin:0.1.12:start -Dembedmongo.wait -Dmongodb.test.port=27017 in the crowdsource-integrationtests module.

For configuration your own application:

  • Create a appication.properties with following entries

de.asideas.crowdsource.db.hosts=127.0.0.1 de.asideas.crowdsource.db.port=27017 de.asideas.crowdsource.db.name=crowdsource de.asideas.crowdsource.db.username=crowdsource de.asideas.crowdsource.db.password=

You can use a comma seperated list for multiple db-hosts, eg.

de.asideas.crowdsource.db.hosts=127.0.0.1,127.0.0.2

Mailserver

CrowdSource sends Mails for some occassions. In the example-app a mailserver is started and the mails are exposed via a rest endpoint under /mails. This is handy for local development as well as integration testing.

For the configuration you need the following entries in your application.properties:

de.asideas.crowdsource.mail.host=smtp.xyzn.org de.asideas.crowdsource.mail.port=587 de.asideas.crowdsource.mail.username=[email protected] de.asideas.crowdsource.mail.password= de.asideas.crowdsource.mail.starttls=true

The default-configuration uses localhost:1025 with no username and no password. StartTls is false per default.

Mail-Templates: There are currently five different templates used for mailing. CrowdSource comes with default templates, but you can just create your own templates.

  • activation.template This template is the mail sent after you registered your account.
  • new-project.template This template is send to the administrator after someone created a new project.
  • password-forgotten.template A mail with the new password link, sent to the user.
  • project-published.template This mail is sent to the user, after his project was published/accepted.
  • project-rejected.template This mail is sent to the user, after his project was rejected.

Frontend

During maven build, frontend-maven-plugin will take care of downloading all tools and dependencies required for the frontend build. To execute manually you will need node/npm. See scripts in package.json for npm. You will also need to run 'npm install -g karma-cli'.

To be able to develop quickly, run those 2 commands in two separate shells

npm run watch
npm run test-watch

Tracking

The Crowdsource application supports tracking, utilizing PIWIK over Angulartics. In order to activate tracking set the following properties in your application.properties:

  • de.asideas.crowdsource.tracking.piwik.trackurl=//your-piwik.domain
  • de.asideas.crowdsource.tracking.piwik.siteid=1

This will cause the tracking snippet to be rendered in the index.html. Tracking includes virtual page views (all the angular anchor links) and the following actions with their respective category:

  • | Rejected | Projects
  • | Deferred | Projects
  • | Comment | Projects
  • | ProjectIdeaSubmitted | Projects
  • | ProjectPledged | Projects
  • | MailToPublisherIconClicked | Projects
  • | GoToStartNewProjectFromNavbar | Projects
  • | GoToStartNewProjectFromTeaser | Projects
  • | GoToFinancing | Projects
  • | NewFinancingRoundStarted  | FinancingRound
  • | FinancingRoundAborted | FinancingRound
  • | SignIn | UserActions
  • | SignUp | UserActions
  • | Logout | UserActions
  • | AccountActivated | UserActions
  • | FaqEntryOpened | UserActions | Label - faq_entry | Value - faq title

In order to decorate HTML elements, like buttons or links with tracking actions just add the following properties to the respective tag:

  • analytics-on="click"
  • analytics-category="<yourCategory>"
  • analytics-event="yourEvent"

Issue Tracking / Feedback Form

The Crowdsource application supports tracking, utilizing the JIRA issue collector. In order to activate tracking set the following properties in your application.properties:

  • de.asideas.crowdsource.jira.issuecollector.url=//your-jic.url

See link above for details on how to get your issue collector setup properly.

AT-Browsers: PHANTOMJS/CHROME/FIREFOX

There were some issues with phantomjs. Feel free to give it another try. Maybe its fixed? Specifiy path to chromedriver/chrome in test.properties to use chrome (environment variable also possible). Firefox is the fallback. Do nothing and use the worst browser in the world by default.

Maven

<dependencies>
    <dependency>
        <groupId>de.asideas.crowdsource</groupId>
        <artifactId>crowdsource-core</artifactId>
        <version>1.1</version>
    </dependency>
</dependencies>