crowdsource
a collaborative crowd sourcing and funding tool using virtual currency
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
Example developer connect with stage Mongo
VM Options: -Dspring.profiles.active=stage -Dspring.data.mongodb.uri=mongodb://:@crowdstage-shard-00-00-je9bv.mongodb.net:27017,crowdstage-shard-00-01-je9bv.mongodb.net:27017,crowdstage-shard-00-02-je9bv.mongodb.net:27017/crowdsource_as?ssl=true&replicaSet=CrowdStage-shard-0&authSource=admin&retryWrites=true
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 or just configure spring data properties
spring.data.mongodb.*
, e.g:
spring.data.mongodb.uri=mongodb://127.0.0.1:27017/crowdsource
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
If you want to skip uglifying of your javascript (app AND libs), run
npm run watch-dev
Issue Tracking / Feedback Form (2018: deprecated and disabled)
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.2</version>
</dependency>
</dependencies>