Social Virtual Town Watch
- Product Owner: Zachary Lester
- Scrum Master: Brian Loughnane
- Development Team Members: John Mai, Zachary Lester, Brian Loughnane
Use watchly to protect yourself from dangers in your vicinity. Watchly maps user-sourced crime, hazard, and danger reports, providing vital safety information. Each submitted report provides a message thread where other watchly members can respond with helpful information and engage in fruitful discussions.
- Node 0.12.x
- Express 4.x
- MySQL 5.6.x
- Ionic 1.0.x
- Angular 1.4.x
From within the root directory:
* npm install
* bower install
* gulp
In the server/db/dev-support-assets directory, developers may access the following items:
- Schema visualization image
- schema.sql file which is unused in production but may be useful for creating schema during development
- testdata.sql file which is unused in production but may be useful for inserting sample data during development
- Start mysql and sign in (we default to no password, remember to change this in server/config/knex-config.js if you do):
mysql.server start
mysql -u [your username] -p
Enter Password: [your password]
- In server/db/knex-config.js, set your mysql username and password in the configuration object
- Create and use database "watchly"
create database watchly;
use watchly;
When the app is started (node index.js, run nodemon index.js to auto restart on saving files server side), the schema will be created so long as this setup has been performed.
- Start server From root directory:
node index.js
- Open browser and navigate to http://localhost:3000
* npm install -g cordova ionic ios-sim
* ionic platform add ios
* ionic build ios
* ionic emulate ios
* download the android sdk from google
* install the android sdk
* download jre from oracle
* install jre
* add into your .bash_profile ANDROID_HOME and JAVA_HOME
* rerun your .bash_profile
* npm install -g cordova ionic
* ionic platform add android
* ionic build android
* ionic emulate android
View the project roadmap here
See CONTRIBUTING.md for contribution guidelines.
- Get all incidents
$http.get('api/incidents/');
- Post a new incident by passing an incident object in your request:
var data = {
description: description,
latitude: latitude,
longitude: longitude,
address: address,
fuzzyAddress: fuzzyAddress,
occurred_at: occurred_at
}
$http.post('api/incidents/', data);
- Post the top and bottom of a map as min and max latitudes(x) and longitudes(y) to get incidents within map
var data = {xMin: 0, xMax: 100, yMin: -200, yMax: 100}
$http.post('api/incidents/nearby', data);
- get all incident types
$http.get('api/incidents/incidentType');
- Post a new message by passing an incidentId and a description
var data = { incidentsId: 1, description: 'There are lots of bikes stolen in that area, be careful' };
$http.post('api/messages/', data);
- Get thread of messages about an incident by posting an incidentId to thread endpoint
var data = { incidentsId: 1 };
$http.post('api/messages/thread', data);
- Reseting your Databases
* Run the app localy at localhost:3000 in your browser
* Click the Head Icon on the top Right
* Enter Username 'reset' and click Sign In
* An Ionic Modal popup should confirm a full database reset
- Added pictures to incidents! Can now add and view pictures related (or unrelated) to the incident
- Added comments on incidents! Can now visibly gasp in horror at all the crime around you
- Added votes on incidents! Can now like or dislike criminal activity. -3 Votes and the incident is auto deleted
- Added profile editing! Can now edit your profile by clicking on the Person Icon after signing in
- Added sustained sessions! When you log in your session will last for an hour and reset/autologin on refreshing the page
- Changed incident views! Incident views are Ionic Modals and not silly google maps popups
- Changed mobile formating! It works now! What was GreenField doing?!?
- Changed incident icons! Ours are better