wikiworldorder/survloop

SurvLoop is a Laravel-based engine for designing a database and creating a mobile-friendly user interface to fill it.

v0.0.9 2018-07-18 04:38 UTC

README

Laravel License: GPL v3

SurvLoop is a Laravel-based engine for websites dominated by the collection and publication of open data. This is a database design and survey generation system, though it will increasingly be a flexible tool to solve many web-based problems.

It is currently in continued, heavy development, with much happening here in mid-2018, almost ready to go live. I plan to provide more documentation in the coming weeks. Thank you for your interest and patience!

This was originally developed to build the Open Police system. So until the SurvLoop installation processes automates everything, plus the bell & whistle options, please check out the Open Police package for an heavy example of how to extend SurvLoop for your custom needs. (Lighter examples coming online soon!-)

The upcoming Open Police web app is the best live beta demo of the engine's end results, and feedback on that project and the SurvLoop user experience can be via the end of the submission process:
https://openpolice.org/test
The resulting database designed using the engine, as well as the branching tree which specifies the user's experience: /db/OP
/tree/complaint
Among other methods, the resulting data can also be provided as XML included an automatically generated schema, eg.
/complaint-xml-schema
/complaint-xml-example
/complaint-xml-all

Other projects running SurvLoop: <a href="https://powerscore.resourceinnovation.org/start/calculator" target="_blank"

Cannabis PowerScore (GitHub), and Drug Story.

Table of Contents

Requirements

Getting Started

These instructions — and more if you are new to Laravel — can also be found here: SurvLoop.org/how-to-install-survloop.

  • Install Laravel's default user authentication, notifications, and SurvLoop:
$ php artisan make:auth
$ php artisan vendor:publish --tag=laravel-notifications
  • Update composer.json to add requirements and an easier SurvLoop reference:
$ nano composer.json
...
"require": {
	...
    "wikiworldorder/survloop": "0.*",
    "matthiasmullie/minify": "~1.3",
	...
},
...
"autoload": {
	...
	"psr-4": {
		...
		"SurvLoop\\": "vendor/wikiworldorder/survloop/src/",
		"MatthiasMullie\\Minify\\": "vendor/matthiasmullie/minify/src/",
		"MatthiasMullie\\PathConverter\\": "vendor/matthiasmullie/path-converter/src/",
	}
	...
},
...
$ composer update
  • Add the package to your application service providers in config/app.php.
...
    'name' => 'SurvLoop',
...
'providers' => [
	...
	SurvLoop\SurvLoopServiceProvider::class,
	...
],
...
'aliases' => [
	...
	'SurvLoop'	=> 'WikiWorldOrder\SurvLoop\SurvLoopFacade',
	...
],
...
  • Swap out the SurvLoop user model in config/auth.php.
...
'model' => App\Models\User::class,
...
  • Update composer, publish the package migrations, etc...
$ php artisan vendor:publish --force
$ php artisan migrate
$ composer dump-autoload
$ php artisan db:seed --class=SurvLoopSeeder
  • For now, to apply database design changes to the same installation you are working in, depending on your server, you might also need something like this...
$ chown -R www-data:33 app/Models
$ chown -R www-data:33 database
  • Browse to load the style sheets, etc.. /dashboard/css-reload

Documentation

Once installed, documentation of this system's database design can be found at /dashboard/db/all. This system's survey design can be found at /dashboard/surv-1/map?all=1&alt=1 or publicly visible links like those above.

https://survloop.org/db/SL

Roadmap

Here's the TODO list for the next release (1.0). It's my first time building on Laravel, or GitHub. So sorry.

  • Correct all issues needed for minimum viable product, and launch initial beta sites powered by SurvLoop.
  • Database design and user experience admin tools to be generated by SurvLoop itself.
  • Breaking up larger objects/classes into smaller ones
  • Code commenting, learning and adopting more community norms.
  • Finish migrating all raw queries to use Laravel's process.
  • Add unit testing.

Change Logs

Contribution Guidelines

Please help educate me on best practices for sharing code in this community. Please report any issue you find in the issues page.

Reporting a Security Vulnerability

We want to ensure that SurvLoop is a secure HTTP open data platform for everyone. If you've discovered a security vulnerability in SurvLoop, we appreciate your help in disclosing it to us in a responsible manner.

Publicly disclosing a vulnerability can put the entire community at risk. If you've discovered a security concern, please email us at wikiworldorder at protonmail.com. We'll work with you to make sure that we understand the scope of the issue, and that we fully address your concern. We consider correspondence sent to wikiworldorder at protonmail.com our highest priority, and work to address any issues that arise as quickly as possible.

After a security vulnerability has been corrected, a release will be deployed as soon as possible.