├── public ├── favicon.ico ├── assets │ ├── js │ │ ├── frontend.js │ │ ├── vendor │ │ │ └── video-js.swf │ │ ├── backend │ │ │ ├── pages.js │ │ │ └── datasources-sync.js │ │ ├── frontend │ │ │ ├── map-categories.js │ │ │ ├── routes.js │ │ │ └── loadpretty.js │ │ ├── pahali │ │ │ ├── pahali-categories.js │ │ │ ├── pahali-models.js │ │ │ ├── pahali.js │ │ │ ├── pahali-datasources.js │ │ │ ├── pahali-subscribe.js │ │ │ └── pahali-projects.js │ │ └── plugins.js │ ├── img │ │ ├── favicon.ico │ │ ├── bg │ │ │ ├── garbage.png │ │ │ ├── rhino-lady.jpg │ │ │ └── chemical-plant.jpg │ │ ├── fist-green.png │ │ ├── fist-icon.png │ │ ├── login │ │ │ ├── icon.png │ │ │ ├── imac.png │ │ │ └── imac-2x.png │ │ ├── logos │ │ │ ├── anic.png │ │ │ ├── bmgf.png │ │ │ ├── sej.png │ │ │ ├── osiwa.jpg │ │ │ ├── cfafrica.png │ │ │ ├── cfnigeria.png │ │ │ ├── oxpeckers-long.png │ │ │ └── oxpeckers-square.png │ │ ├── tile │ │ │ ├── ribbon.png │ │ │ └── ribbon-2x.png │ │ └── icons │ │ │ ├── png │ │ │ ├── Book.png │ │ │ ├── Chat.png │ │ │ ├── Mail.png │ │ │ ├── Map.png │ │ │ ├── Compas.png │ │ │ ├── Pensils.png │ │ │ ├── Pocket.png │ │ │ ├── Watches.png │ │ │ ├── Calendar.png │ │ │ ├── Clipboard.png │ │ │ ├── Gift-Box.png │ │ │ ├── Retina-Ready.png │ │ │ ├── Toilet-Paper.png │ │ │ └── Infinity-Loop.png │ │ │ └── svg │ │ │ ├── loop.svg │ │ │ ├── paper-bag.svg │ │ │ ├── clocks.svg │ │ │ ├── mail.svg │ │ │ ├── chat.svg │ │ │ ├── toilet-paper.svg │ │ │ ├── book.svg │ │ │ ├── map.svg │ │ │ ├── retina.svg │ │ │ ├── clipboard.svg │ │ │ ├── pencils.svg │ │ │ └── compas.svg │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── lato │ │ │ ├── lato-black.eot │ │ │ ├── lato-black.ttf │ │ │ ├── lato-bold.eot │ │ │ ├── lato-bold.ttf │ │ │ ├── lato-bold.woff │ │ │ ├── lato-light.eot │ │ │ ├── lato-light.ttf │ │ │ ├── lato-black.woff │ │ │ ├── lato-italic.eot │ │ │ ├── lato-italic.ttf │ │ │ ├── lato-italic.woff │ │ │ ├── lato-light.woff │ │ │ ├── lato-regular.eot │ │ │ ├── lato-regular.ttf │ │ │ ├── lato-regular.woff │ │ │ ├── lato-bolditalic.eot │ │ │ ├── lato-bolditalic.ttf │ │ │ └── lato-bolditalic.woff │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons │ │ │ ├── flat-ui-icons-regular.eot │ │ │ ├── flat-ui-icons-regular.ttf │ │ │ └── flat-ui-icons-regular.woff │ └── css │ │ ├── base.css │ │ ├── backend.css │ │ ├── _bower.leaflet.css │ │ └── frontend.css ├── robots.txt ├── .htaccess ├── web.config └── index.php ├── database ├── .gitignore ├── seeds │ └── DatabaseSeeder.php ├── migrations │ ├── 2014_11_15_175051_delete_data_source_datas_table.php │ ├── 2015_04_13_154337_rename_password_reminders_resets_table.php │ ├── 2014_11_13_165546_reverse_datasource_table_rename.php │ ├── 2014_12_03_205301_subscriptions_soft_delete.php │ ├── 2014_10_27_213621_drop_alert_tables.php │ ├── 2015_03_26_215431_create_scrapers_table.php │ ├── 2014_11_03_214012_add_fullname_to_user.php │ ├── 2014_10_06_144154_create_project_category_table.php │ ├── 2014_11_15_135412_rename_project_data_id.php │ ├── 2014_10_10_191356_create_failed_jobs_table.php │ ├── 2014_11_11_210200_add_geojson_to_subscriptions_table.php │ ├── 2014_12_07_113031_create_password_reminders_table.php │ ├── 2014_11_01_200517_allow_full_text_search.php │ ├── 2014_10_05_204247_create_syncs_table.php │ ├── 2014_10_01_062953_create_data_sources_table.php │ ├── 2014_12_13_212827_alter_projects_table_geo_defaults.php │ ├── 2014_10_06_141420_create_categories_table.php │ ├── 2015_04_22_195458_change_scrape_file_location_to_directory.php │ ├── 2014_10_05_210551_create_data_source_syncs_table.php │ ├── 2015_03_26_215739_create_scrapes_table.php │ ├── 2014_10_06_202238_create_geocodes_table.php │ ├── 2017_05_09_192806_create_jobs_table.php │ ├── 2014_10_06_202914_create_geo_apis_table.php │ ├── 2014_10_01_024415_create_users_table.php │ ├── 2014_10_10_181114_add_indexes.php │ ├── 2014_11_11_154441_create_alerts_table.php │ ├── 2014_10_29_235428_add_subscription_columns.php │ ├── 2014_10_27_214043_create_subscription_table.php │ ├── 2014_11_12_174325_rename_datasources_table.php │ ├── 2014_10_06_094413_create_projects_table.php │ ├── 2014_10_27_215958_include_subscribers_in_users_table.php │ ├── 2014_11_12_194341_move_config_to_datasources_table.php │ ├── 2014_10_14_220942_create_pages_table.php │ ├── 2014_11_13_204502_create_projects_data_column.php │ └── 2014_11_11_140746_make_custom_pages_content.php └── factories │ └── ModelFactory.php ├── bootstrap ├── cache │ └── .gitignore ├── autoload.php └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── cache │ └── .gitignore │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── Procfile ├── .bowerrc ├── .buildpacks ├── app ├── Commands │ ├── Command.php │ ├── CategoryQueue.php │ ├── SyncQueue.php │ ├── DataSourceQueue.php │ └── AlertQueue.php ├── Scraper.php ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── TrimStrings.php │ │ ├── Secure.php │ │ └── RedirectIfAuthenticated.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── LoginController.php │ │ └── ScrapesController.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── ConfigServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── GeoApi.php ├── Page.php ├── Alert.php ├── Services │ └── Registrar.php ├── DataSourceSync.php ├── Sync.php ├── User.php ├── Console │ ├── Kernel.php │ └── Commands │ │ ├── PahaliUpgrade.php │ │ └── PahaliUpdate.php ├── Subscription.php ├── Mail │ └── Subscribed.php ├── Geocode.php └── Exceptions │ └── Handler.php ├── .gitattributes ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── CreatesApplication.php └── Feature │ └── ExampleTest.php ├── .gitignore ├── resources ├── assets │ ├── sass │ │ ├── app.scss │ │ └── _variables.scss │ └── js │ │ ├── components │ │ └── Example.vue │ │ ├── app.js │ │ └── bootstrap.js ├── lang │ └── en │ │ ├── pagination.php │ │ ├── auth.php │ │ └── passwords.php └── views │ ├── vendor │ └── pagination │ │ ├── simple-default.blade.php │ │ ├── simple-bootstrap-4.blade.php │ │ ├── default.blade.php │ │ └── bootstrap-4.blade.php │ ├── emails │ ├── auth │ │ └── reminder.blade.php │ ├── alerts │ │ ├── status.blade.php │ │ └── default.blade.php │ └── subscription │ │ └── new.blade.php │ ├── dashboard │ ├── settings.blade.php │ └── subscriptions.blade.php │ ├── home │ ├── snippets │ │ └── partners.blade.php │ ├── about.blade.php │ └── search.blade.php │ ├── layouts │ └── email.blade.php │ └── auth │ ├── passwords │ └── email.blade.php │ ├── password.blade.php │ └── login.blade.php ├── routes ├── channels.php ├── api.php └── console.php ├── webpack.mix.js ├── server.php ├── bower.json ├── package.json ├── config ├── view.php ├── services.php ├── broadcasting.php ├── filesystems.php ├── scout.php └── queue.php ├── phpunit.xml ├── .env.example ├── artisan ├── composer.json └── readme.md /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/assets/js/frontend.js: -------------------------------------------------------------------------------- 1 | // Empty file 2 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: vendor/bin/heroku-php-apache2 public/ 2 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "vendor/bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /.buildpacks: -------------------------------------------------------------------------------- 1 | https://github.com/heroku/heroku-buildpack-php#v190 2 | -------------------------------------------------------------------------------- /public/assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeForAfrica/AlertME/master/public/assets/img/favicon.ico -------------------------------------------------------------------------------- /app/Commands/Command.php: -------------------------------------------------------------------------------- 1 | hasMany('AlertME\Scrape'); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600); 4 | 5 | // Variables 6 | @import "variables"; 7 | 8 | // Bootstrap 9 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 10 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /public/assets/js/frontend/map-categories.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Map Categories Javascript File 3 | * ----------------------------------------------------------------------------- 4 | */ 5 | 6 | 7 | $('.cat-all').addClass('active'); 8 | 9 | $('.cat-sel').click(function (){ 10 | pahali.map.filter_by_category( 11 | $(this).attr('data-cat-id'), pahali.categories, pahali.projects 12 | ); 13 | }); -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | hasMany('AlertME\Geocode'); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 20 | 21 | $response->assertStatus(200); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const { mix } = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/assets/js/app.js', 'public/js') 15 | .sass('resources/assets/sass/app.scss', 'public/css'); 16 | -------------------------------------------------------------------------------- /public/assets/js/pahali/pahali-categories.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Pahali-categories.JS 3 | * ----------------------------------------------------------------------------- 4 | * 5 | * Categories 6 | * 7 | */ 8 | 9 | 10 | (function ( $ ) { 11 | 12 | var Pahali_Category = Backbone.Model.extend({ 13 | 14 | }); 15 | 16 | var Pahali_Categories = Backbone.Collection.extend({ 17 | model: Pahali_Category, 18 | url: '/api/v1/categories', 19 | 20 | parse: function(response) { 21 | return response.categories; 22 | } 23 | }); 24 | 25 | pahali.categories = new Pahali_Categories; 26 | 27 | }( jQuery )); 28 | 29 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/Secure.php: -------------------------------------------------------------------------------- 1 | secure() && !env('APP_DEBUG') ) { 18 | return redirect()->secure($request->path()); 19 | } 20 | 21 | return $next($request); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/Page.php: -------------------------------------------------------------------------------- 1 | attributes['data'] = json_encode($value); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /database/migrations/2015_04_13_154337_rename_password_reminders_resets_table.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/dashboard'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /public/assets/img/icons/svg/loop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/assets/img/icons/svg/paper-bag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/assets/js/components/Example.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /database/migrations/2014_12_03_205301_subscriptions_soft_delete.php: -------------------------------------------------------------------------------- 1 | softDeletes(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->bind( 28 | 'Illuminate\Contracts\Auth\Registrar', 29 | 'AlertME\Services\Registrar' 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2014_10_27_213621_drop_alert_tables.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | window.Vue = require('vue'); 11 | 12 | /** 13 | * Next, we will create a fresh Vue application instance and attach it to 14 | * the page. Then, you may begin adding components to this application 15 | * or customize the JavaScript scaffolding to fit your unique needs. 16 | */ 17 | 18 | Vue.component('example', require('./components/Example.vue')); 19 | 20 | const app = new Vue({ 21 | el: '#app' 22 | }); 23 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 17 | @endif 18 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2015_03_26_215431_create_scrapers_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('slug')->unique(); 18 | $table->integer('status'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('scrapers'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014_11_03_214012_add_fullname_to_user.php: -------------------------------------------------------------------------------- 1 | mediumText('fullname')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('users', function (Blueprint $table) { 29 | // 30 | $table->dropColumn('fullname'); 31 | }); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /public/assets/js/plugins.js: -------------------------------------------------------------------------------- 1 | // Avoid `console` errors in browsers that lack a console. 2 | (function() { 3 | var method; 4 | var noop = function () {}; 5 | var methods = [ 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 9 | 'timeStamp', 'trace', 'warn' 10 | ]; 11 | var length = methods.length; 12 | var console = (window.console = window.console || {}); 13 | 14 | while (length--) { 15 | method = methods[length]; 16 | 17 | // Only stub undefined methods. 18 | if (!console[method]) { 19 | console[method] = noop; 20 | } 21 | } 22 | }()); 23 | 24 | // Place any jQuery/helper plugins in here. 25 | -------------------------------------------------------------------------------- /app/Alert.php: -------------------------------------------------------------------------------- 1 | id)); 24 | }); 25 | 26 | } 27 | 28 | function project() 29 | { 30 | return $this->belongsTo('AlertME\Project'); 31 | } 32 | 33 | public function subcriptions() 34 | { 35 | return $this->belongsToMany('AlertME\Subscription', 'subscription_alert'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2014_10_06_144154_create_project_category_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->integer('project_id'); 18 | $table->integer('category_id'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('project_category'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014_11_15_135412_rename_project_data_id.php: -------------------------------------------------------------------------------- 1 | renameColumn('project_id', 'data_id'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('projects', function (Blueprint $table) { 29 | // 30 | $table->renameColumn('data_id', 'project_id'); 31 | }); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 16 | static $password; 17 | 18 | return [ 19 | 'name' => $faker->name, 20 | 'email' => $faker->unique()->safeEmail, 21 | 'password' => $password ?: $password = bcrypt('secret'), 22 | 'remember_token' => str_random(10), 23 | ]; 24 | }); 25 | -------------------------------------------------------------------------------- /database/migrations/2014_10_10_191356_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->text('connection'); 18 | $table->text('queue'); 19 | $table->text('payload'); 20 | $table->timestamp('failed_at'); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::drop('failed_jobs'); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2014_11_11_210200_add_geojson_to_subscriptions_table.php: -------------------------------------------------------------------------------- 1 | longText('geojson')->after('zoom')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('subscriptions', function (Blueprint $table) { 29 | // 30 | $table->dropColumn('geojson'); 31 | }); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2014_12_07_113031_create_password_reminders_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('password_reminders'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 17 | @endif 18 | -------------------------------------------------------------------------------- /database/migrations/2014_11_01_200517_allow_full_text_search.php: -------------------------------------------------------------------------------- 1 | index(['title', 'description', 'geo_address', 'status']); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('projects', function (Blueprint $table) { 29 | // 30 | // $table->dropIndex(['title', 'description', 'geo_address', 'status']); 31 | }); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /public/assets/js/pahali/pahali-models.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Pahali.JS MODELS 3 | * ----------------------------------------------------------------------------- 4 | */ 5 | 6 | pahali.datasources = {}; 7 | 8 | pahali.datasource = {}; 9 | 10 | pahali.datasource.config = { 11 | id: { 12 | title: 'ID', col: -1 13 | }, 14 | title: { 15 | title: 'Title', col: -1 16 | }, 17 | desc: { 18 | title: 'Description', col: -1 19 | }, 20 | geo: { 21 | title: 'Geo Type', 22 | type: 'lat_lng', 23 | lat_lng: { 24 | lat: { 25 | title: 'Geo Lat', col: -1 26 | }, 27 | lng: { 28 | title: 'Geo Lng', col: -1 29 | } 30 | }, 31 | address: { 32 | title: 'Geo Address', col: -1 33 | } 34 | }, 35 | status: { 36 | title: 'Status', col: -1 37 | } 38 | }; 39 | 40 | 41 | pahali.project = {}; 42 | pahali.projects = {}; 43 | 44 | pahali.subscribe = {}; 45 | -------------------------------------------------------------------------------- /database/migrations/2014_10_05_204247_create_syncs_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->integer('sync_status')->default(0); 18 | $table->integer('user_id')->default(0); 19 | $table->timestamp('completed_on')->default('1990-01-01 00:00:00')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::drop('syncs'); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2014_10_01_062953_create_data_sources_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('title'); 19 | $table->mediumText('description')->nullable(); 20 | $table->string('url'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('data_sources'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /public/assets/js/pahali/pahali.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Pahali.JS 3 | * ----------------------------------------------------------------------------- 4 | * 5 | * The Pahali.JS extension. 6 | * 7 | */ 8 | 9 | var pahali = { 10 | _name: 'Pahali.JS', 11 | _description: 'The Pahali.JS extension', 12 | base_url: '', 13 | csrf_token: '', 14 | country: { 15 | code: 'za' // Default country code 16 | } 17 | }; 18 | 19 | 20 | document.write(' 78 | @endsection 79 | -------------------------------------------------------------------------------- /database/migrations/2014_11_13_204502_create_projects_data_column.php: -------------------------------------------------------------------------------- 1 | get(); 16 | Schema::table('projects', function (Blueprint $table) { 17 | // 18 | $table->longText('data')->after('status')->nullable(); 19 | }); 20 | foreach ($datasources as $datasource) { 21 | if (Schema::hasTable('data_source_datas_' . $datasource->id)) { 22 | // 23 | $ds_datas = DB::table('data_source_datas_' . $datasource->id)->get(); 24 | foreach ($ds_datas as $ds_data) { 25 | DB::table('projects') 26 | ->where('project_id', $ds_data->data_id) 27 | ->update(array('data' => $ds_data->data)); 28 | } 29 | Schema::drop('data_source_datas_' . $datasource->id); 30 | } 31 | } 32 | } 33 | 34 | /** 35 | * Reverse the migrations. 36 | * 37 | * @return void 38 | */ 39 | public function down() 40 | { 41 | $projects = DB::table('projects')->get(); 42 | foreach ($projects as $project) { 43 | if (!Schema::hasTable('data_source_datas_' . $project->datasource_id)) { 44 | Schema::create('data_source_datas_' . $project->datasource_id, function ($table) { 45 | $table->increments('id'); 46 | $table->string('data_id')->default('0'); 47 | $table->longText('data')->nullable(); 48 | $table->timestamps(); 49 | }); 50 | Schema::table('data_source_datas_' . $project->datasource_id, function ($table) { 51 | $table->index('data_id'); 52 | }); 53 | } 54 | DB::table('data_source_datas_' . $project->datasource_id)->insert( 55 | array( 56 | 'data_id' => $project->project_id, 57 | 'data' => $project->data 58 | ) 59 | ); 60 | } 61 | Schema::table('projects', function (Blueprint $table) { 62 | // 63 | $table->dropColumn('data'); 64 | }); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /public/assets/css/frontend.css: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | 5 | @import'base.css'; 6 | 7 | body { padding-top: 76px; } 8 | 9 | img { max-width: 100%; } 10 | 11 | a.navbar-brand small { 12 | font-size: 12px; 13 | font-weight: 300; 14 | line-height: 12px; 15 | padding-left: 5px; 16 | vertical-align: top; 17 | } 18 | .navbar-lg .navbar-brand { 19 | height: 76px; 20 | padding-top: 20px; 21 | padding-bottom: 20px; 22 | } 23 | 24 | footer { 25 | padding: 40px 0 30px; 26 | } 27 | 28 | 29 | /** 30 | * HOME 31 | * ----------------------------------------------------------------------------- 32 | */ 33 | 34 | .home-search { 35 | height: 500px; 36 | position: absolute; 37 | top: 76px; 38 | background: rgba(44, 62, 80, 0.59); 39 | width: 100%; 40 | color: #ECF0F1; 41 | padding-top: 100px; 42 | } 43 | 44 | #alertModal .alert { 45 | padding: 5px 35px 5px 10px; 46 | } 47 | #alertModal .alert-dismissable .close, #alertModal .alert-dismissible .close { 48 | top: 3px; 49 | } 50 | #alertModal .msg-error { 51 | font-family: monospace; 52 | padding-left: 25px; 53 | } 54 | 55 | .pac-container { 56 | font-family: inherit; 57 | } 58 | 59 | .home-logos a { 60 | } 61 | .home-logos a img { 62 | margin: 10px 25px; 63 | height: 70px; 64 | opacity: 1; 65 | -webkit-transition: all 0.5s; 66 | transition: all 0.5s; 67 | } 68 | .home-logos a img:hover { 69 | opacity: 0.7; 70 | } 71 | .home-logos .funders img { 72 | height: 55px; 73 | } 74 | 75 | /** 76 | * Map 77 | * ----------------------------------------------------------------------------- 78 | */ 79 | 80 | .home-map, .home-map .map-wrapper, .home-map .map-list { 81 | min-height: 500px; 82 | height: 100%; 83 | } 84 | 85 | .home-map #map { 86 | height:100%; 87 | } 88 | 89 | .home-map .map-list { 90 | width: 360px; 91 | background-color: rgba(52, 73, 94, 0.5); 92 | z-index: 9; 93 | } 94 | 95 | .home-map .map-controls, .home-map .map-list { 96 | position: absolute; 97 | top: 76px; 98 | padding: 15px; 99 | } 100 | .map-controls.pull-right { 101 | right: 0; 102 | } 103 | 104 | 105 | 106 | /** 107 | * About 108 | * ----------------------------------------------------------------------------- 109 | */ 110 | 111 | /*.about { 112 | padding-bottom: 60px; 113 | }*/ 114 | 115 | 116 | /** 117 | * Project 118 | * ----------------------------------------------------------------------------- 119 | */ 120 | 121 | .project { 122 | padding-bottom: 20px; 123 | } 124 | 125 | -------------------------------------------------------------------------------- /public/assets/js/pahali/pahali-projects.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Pahali-projects.JS 3 | * ----------------------------------------------------------------------------- 4 | * 5 | * Projects 6 | * 7 | */ 8 | 9 | 10 | (function ( $ ) { 11 | 12 | var Pahali_Project = Backbone.Model.extend({ 13 | 14 | defaults: { 15 | 'title': ' Loading...' 16 | }, 17 | 18 | pull: function(request) { 19 | data = typeof request.data === 'undefined' ? {} : request.data; 20 | callback = typeof request.callback === 'undefined'? function () {} : request.callback; 21 | $.ajax({ 22 | url: "/api/v1/projects/"+this.id, 23 | data: data, 24 | callback: callback, 25 | model: this 26 | }).done(function(response) { 27 | var projects = []; 28 | if (typeof response.project !== 'undefined') { 29 | project = response.project; 30 | this.model.set(project); 31 | this.callback(); 32 | }; 33 | }); 34 | } 35 | 36 | }); 37 | 38 | var Pahali_Projects = Backbone.Collection.extend({ 39 | model: Pahali_Project, 40 | url: '/api/v1/projects', 41 | 42 | pull: function(request) { 43 | data = typeof request.data === 'undefined' ? {} : request.data; 44 | callback = typeof request.callback === 'undefined'? function () {} : request.callback; 45 | $.ajax({ 46 | url: "/api/v1/projects", 47 | data: data, 48 | callback: callback, 49 | collection: this 50 | }).done(function(response) { 51 | var projects = []; 52 | if (typeof response.projects !== 'undefined') { 53 | if (typeof response.projects.current_page !== 'undefined') { 54 | projects = response.projects.data; 55 | } else { 56 | projects = response.projects; 57 | }; 58 | 59 | this.collection.reset(); 60 | this.collection.add(projects); 61 | this.callback(); 62 | }; 63 | 64 | }); 65 | }, 66 | 67 | parse: function(response) { 68 | if (typeof response.projects !== 'undefined') { 69 | if (typeof response.projects.current_page !== 'undefined') { 70 | var projects = []; 71 | _.each(response.projects.data, function(project){ 72 | projects.push(project); 73 | }); 74 | return projects; 75 | }; 76 | return response.projects; 77 | }; 78 | return response.projects; 79 | } 80 | }); 81 | 82 | pahali.project = new Pahali_Project(); 83 | 84 | pahali.projects = new Pahali_Projects(); 85 | 86 | 87 | }( jQuery )); 88 | 89 | -------------------------------------------------------------------------------- /resources/views/dashboard/subscriptions.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.backend') 2 | 3 | @section('content') 4 |
5 |
6 | Subscriptions 7 | 11 |
12 |
13 | 14 |
15 | 16 | @if (count($subscriptions) === 0) 17 |

It seems you don't have any subscriptions yet.

18 | @else 19 | 20 |
21 |
22 | 23 | @foreach ($subscriptions as $key => $subscription) 24 |

25 | 26 | {{ $subscription->confirm_token }} 27 | 28 | 29 | 30 | @if ( $subscription->trashed() ) 31 | Unsubscribed 32 | @elseif ( $subscription->status == 0 ) 33 | Unconfirmed 34 | @elseif ( $subscription->status == 1 ) 35 | Confirmed 36 | @endif 37 | 38 |
39 | Email: {{ $subscription->user->email }} 40 |

41 | 42 |
43 | @endforeach 44 | 45 |
46 | {{ $subscriptions->links('vendor.pagination.default') }} 47 |
48 |
49 |
50 |
51 |

Overview

52 | 53 |
54 |
55 |

Total:

56 |
57 |
58 |

{{ $subscriptions->total() }}

59 |
60 |
61 | 62 |
63 |
64 |
65 | 66 | @endif 67 | 68 |
69 | 70 | 71 | 72 | 73 | 74 |
75 | 76 | @stop 77 | 78 | @section('scripts-data') 79 | 80 | 81 | @stop 82 | 83 | @section('scripts') 84 | {{----}} 85 | @stop 86 | -------------------------------------------------------------------------------- /config/scout.php: -------------------------------------------------------------------------------- 1 | env('SCOUT_DRIVER', 'algolia'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Index Prefix 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify a prefix that will be applied to all search index 26 | | names used by Scout. This prefix may be useful if you have multiple 27 | | "tenants" or applications sharing the same search infrastructure. 28 | | 29 | */ 30 | 31 | 'prefix' => env('SCOUT_PREFIX', ''), 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Queue Data Syncing 36 | |-------------------------------------------------------------------------- 37 | | 38 | | This option allows you to control if the operations that sync your data 39 | | with your search engines are queued. When this is set to "true" then 40 | | all automatic data syncing will get queued for better performance. 41 | | 42 | */ 43 | 44 | 'queue' => false, 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Algolia Configuration 49 | |-------------------------------------------------------------------------- 50 | | 51 | | Here you may configure your Algolia settings. Algolia is a cloud hosted 52 | | search engine which works great with Scout out of the box. Just plug 53 | | in your application ID and admin API key to get started searching. 54 | | 55 | */ 56 | 57 | 'algolia' => [ 58 | 'id' => env('ALGOLIA_APP_ID', ''), 59 | 'secret' => env('ALGOLIA_SECRET', ''), 60 | ], 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Elasticsearch Configuration 65 | |-------------------------------------------------------------------------- 66 | | 67 | | TODO: Add documentation on elasticsearch 68 | | 69 | */ 70 | 71 | 'elasticsearch' => [ 72 | 'index' => env('ELASTICSEARCH_INDEX', 'laravel'), 73 | 'hosts' => [ 74 | env('ELASTICSEARCH_HOST', 'http://localhost'), 75 | ], 76 | ], 77 | 78 | ]; 79 | -------------------------------------------------------------------------------- /database/migrations/2014_11_11_140746_make_custom_pages_content.php: -------------------------------------------------------------------------------- 1 | truncate(); 18 | Schema::table('pages', function (Blueprint $table) { 19 | // 20 | $table->dropColumn('title'); 21 | $table->dropColumn('description'); 22 | $table->longText('data')->nullable(); 23 | }); 24 | 25 | // Create Home Page 26 | $page = new Page; 27 | $page->slug = '/'; 28 | $page->data = array( 29 | 'banner' => array( 30 | 'title' => 'Find Environmental Impact Assessments Near You', 31 | 'description' => 'And register for alerts in your area...' 32 | ), 33 | 'how' => array( 34 | 'title' => 'How '.env('APP_NAME','#AlertME').' Works', 35 | 'blurbs' => array( 36 | array( 37 | 'description' => 'Find Environmental Impact Assessments happening near you.' 38 | ), 39 | array( 40 | 'description' => 'Register for alerts in your area to get updates of new or current EIAs.' 41 | ), 42 | array( 43 | 'description' => 'Take action by getting your friends involved in signing a petition.' 44 | ) 45 | ) 46 | ) 47 | ); 48 | $page->save(); 49 | 50 | // Create About Page 51 | $page = new Page; 52 | $page->slug = 'about'; 53 | $page->data = array( 54 | 'title' => $about->title, 55 | 'description' => $about->description 56 | ); 57 | $page->save(); 58 | 59 | } 60 | 61 | /** 62 | * Reverse the migrations. 63 | * 64 | * @return void 65 | */ 66 | public function down() 67 | { 68 | $about = Page::find(2); 69 | DB::table('pages')->truncate(); 70 | Schema::table('pages', function (Blueprint $table) { 71 | // 72 | $table->dropColumn('data'); 73 | $table->string('title')->nullable(); 74 | $table->longText('description')->nullable(); 75 | }); 76 | // Add Page using Eloquent 77 | $page = new Page; 78 | $page->slug = 'about'; 79 | $page->title = $about->data->title; 80 | $page->description = $about->data->description; 81 | $page->save(); 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.base') 2 | 3 | @section('title') 4 | Login 5 | @stop 6 | 7 | {{-- Content --}} 8 | @section('content') 9 | 10 |
11 | 12 |
13 |
14 |

Login

15 |
16 |
17 | 18 |
19 |
20 | 60 |
61 |
62 |
63 | 64 | @endsection 65 | 66 | @section('stylesheets') 67 | 80 | @endsection 81 | 82 | @section('scripts') 83 | 86 | @endsection 87 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => env('QUEUE_NAME', 'default'), 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => env('QUEUE_NAME', 'default'), 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => env('QUEUE_NAME', 'default'), 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => env('QUEUE_NAME', 'default'), 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /public/assets/img/icons/svg/compas.svg: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------