Tagged Images on a Map (TiMap) is an interactive map that allows users to search for locations and check related images posted by other people.
Once a search is made, images are plotted on a map (represented by markers) and when they are clicked, the image gets shown and tagged by image analysis services using AI.
The user then can review the analysis and indicate if the image was correctly tagged or not. That's how the analysis providers get ranked in the system. The more they get it right, more they get used to perform the image analyses.
TiMap uses a few APIs to work properly:
- Google maps API
- Flickr API
- Image tagging APIs:
TiMap uses a number of open source projects to work properly:
- Laravel - awesome PHP framework!
- MaterializeCSS - beautiful front-end framework based on Material Design
- Chart.js - awesome chart js library
- jQuery, LoDash - js
And of course TiMap itself is open source with a public repository on GitHub.
Checkout the master:
git clone https://github.com/marcelopm/TiMap.git
TiMap requires npm and Composer, so make sure they are installed before trying to install the dependencies:
$ cd TiMap
$ composer install
$ npm install
From the Laravel's doco:
[..] you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run [..]
If you have any issues, this should do it for running TiMap locally:
$ sudo chmod -R 777 storage bootstrap/cache
And run Gulp command to compile assets:
$ gulp
Note: if you get an error from the command above, you might need to install gulp manually:
$ npm install gulp-cli -g
$ npm install gulp -D
Create a .env file based on the sample provided:
$ cp .env.example to .env
$ vim .env
Create Laravel's app key:
$ php artisan key:generate
Login into MySQL db console and create a new database for TiMap:
mysql> create database timap;
And fill up the new DB details values on .env:
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
Create tables and populate them by running:
$ php artisan migrate --seed
This will create an user required to access the app with the default credentials: [email protected] / admin
And make sure to fill in values the for the service providers on your .env file:
GMAP_KEY=
FLICKR_KEY=
FLICKR_SECRET=
INDICO_KEY=
IMAGGA_KEY=
IMAGGA_SECRET=
More information on how to sign up and get APIs key for each of the above here:
Finally you should be able to start PHP's built-in dev server by running:
$ php artisan serve
And everything should be good to go with TiMap running on localhost
Want to contribute? Great!
TiMap uses Gulp + Webpack for fast developing. Make a change in your file and instantaneously see your updates!
Open your favorite Terminal and run these commands.
First Tab:
$ php artisan serve
Second Tab:
$ gulp watch
TiMap uses PHPUnit for unit testing, which is included out of the box from Laravel
Before running the tests, make sure:
- PHPUnit is installed
- phpunit.xml is configured accordingly to desired testing database:
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value="/tmp/timap_tests.db"/>
Note: the database specified above has to exist before running the tests
To run the tests, just use the command bellow:
$ phpunit
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.