Kansalaisaloite.fi / Medborgarinitiativ.fi is a web service for launching citizens’ initiatives and collecting statements of support for these initiatives. If an initiative gets 50000 statements of support the initiative’s organizer may submit the initiative to the Parliament for consideration.
The web service has been implemented by the Ministry of Justice Finland together with Solita Oy. The service went online on December 1st, 2012.
The Ministry of Justice decided to publish the source code for the software together with Solita Oy after the service has been in use for one year. Commit history prior to the source code publication is not provided, but future commits will be viewable.
Solita Oy is responsible for the future development of the software. Any pull-requests or suggestions for improvement to the source code are considered separately between the Ministry of Justice and Solita Oy. Reports for possible issues in the code might be rewarded by Solita. The Ministry of Justice will handle all the feedback sent to kansalaisaloite.om@om.fi.
Apache License 2.0, see COPYING and LICENSE
Application is packaged as standalone jar with embedded jetty server. Following command-line parameters must be used when starting the application
Some dev-related stuff can be enabled with spring.profiles.active
Setting up database
initdb-xxx.sh
to create local test and local production-like PostgreSQL-databasesetc
-folder using sh ./createdb.sh <locale> <application user password>
<locale>
is system dependent. In Mac it's fi_FI.utf-8
.<application user password>
createuser -s -P flyway_user
. Application migrates database on startup if necessary when 'flyway.password' for flyway_user is overriden properly in app.propertiesOverriding configurations in different environments
src/main/resources/default.properties
config/app.properties
with the overriding parametersbonecp-config.xml
into config/bonecp-config.xmlEncrypting secret properties with EncryptablePropertiesConfigurer
mvn exec:java -Dexec.mainClass="fi.om.initiative.conf.EncryptablePropertiesConfigurer" -Dexec.args="encrypt <message-to-be-encrypted>"
property.key = ENC(Okbz86n6+NnffnKmAPhedp8DIi51zSVZa1Jx88ZthVI=)
properties will be decrypted runtime when needed via EncryptablePropertiesConfigurerCreate local database and flyway-user as told above. Encryptions are optional.
Start application with IDE: fi.om.initiative.StartJetty.main
When DB schema is changed,
src/main/resources/db/migration
. If flyway information is set up correctly to app.properties, application will migrate itself on startup JdbcConfiguration.querydslConfiguration()
src/main/java/fi/om/initiative/sql