Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial commit #1

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2697119
initial commit
TylerK64 Oct 24, 2017
cf3e9d4
Initial map react setup
joshleichtung Oct 25, 2017
9d7cb9d
Add build instruction to README
joshleichtung Oct 25, 2017
b3a2330
Update README.
aazevedojr Oct 25, 2017
d6cd484
Merge pull request #2 from kevincai79/readme
kevincai79 Oct 25, 2017
86f1f5b
Change map start point to San Diego.
aazevedojr Oct 25, 2017
dfffc65
Merge branch 'development' of https://github.com/kevincai79/SmartPark…
aazevedojr Oct 25, 2017
c30a522
Played around with styling - do not merge.
aazevedojr Oct 25, 2017
f8625a9
Hacky fetching of parking spots polygons
aazzolini Oct 25, 2017
825f5d8
update the map to track user's current location
kevincai79 Oct 25, 2017
895acb3
Add mobile responsive design.
aazevedojr Oct 25, 2017
2f5bb93
Merge pull request #4 from kevincai79/change-map
aazevedojr Oct 25, 2017
086ca9b
Merge branch 'development' into map-interface
kevincai79 Oct 25, 2017
4327516
Merge pull request #5 from kevincai79/map-interface
kevincai79 Oct 25, 2017
efdc627
Update pin.
aazevedojr Oct 25, 2017
8cb391a
Merge pull request #6 from kevincai79/pin
kevincai79 Oct 25, 2017
b29a16d
Add server side.
aazzolini Oct 25, 2017
91c19e1
More files.
aazzolini Oct 25, 2017
6572196
Add searchbox to app
joshleichtung Oct 25, 2017
be33c30
Initial files for cloud foundery.
aazzolini Oct 25, 2017
63a2232
Merge branch 'development' into fetch-parking-spot-geometry
aazevedojr Oct 25, 2017
c4c4efd
Merge pull request #7 from kevincai79/fetch-parking-spot-geometry
aazevedojr Oct 25, 2017
5a83182
Solve merge conflicts locally.
aazevedojr Oct 25, 2017
2d43a1f
Merge pull request #8 from kevincai79/bug-fixes
kevincai79 Oct 25, 2017
3dfad93
Implement search box map relocation
joshleichtung Oct 25, 2017
fec3ddb
Merge branch 'development' into add-text-search
joshleichtung Oct 25, 2017
e04e5a5
Merge pull request #9 from kevincai79/add-text-search
kevincai79 Oct 25, 2017
ed7b6b8
Fix duplicate axios and initialize this.state.parking
joshleichtung Oct 25, 2017
11a346c
Make calls to external API
joshleichtung Oct 25, 2017
81dea9d
Change centering
joshleichtung Oct 25, 2017
d09dd66
Update app name and search bar position.
aazevedojr Oct 25, 2017
d6906ee
Merge pull request #10 from kevincai79/styling
kevincai79 Oct 25, 2017
391ab4a
Migrate to flake
aazzolini Oct 25, 2017
40bcd13
Removed unused code.
aazzolini Oct 25, 2017
0881da0
Merge pull request #11 from kevincai79/server_fix
aazzolini Oct 25, 2017
8bfe575
Backend that actually provides suggestions based on input.
aazzolini Oct 26, 2017
2106681
Merge pull request #12 from kevincai79/new-back-end
joshleichtung Oct 26, 2017
1cada55
Update README.md
kevincai79 Oct 27, 2017
0cc3e8a
Add animated gif to readme_assets
joshleichtung Nov 15, 2017
0cdaf33
Update README.md
joshleichtung Nov 15, 2017
a6e233e
Center Image in README
joshleichtung Nov 15, 2017
21b99ae
Merge pull request #13 from joshleichtung/development
kevincai79 Nov 17, 2017
f24e87a
Bump lodash.template from 4.4.0 to 4.5.0 in /client
dependabot[bot] Jul 11, 2019
5b90e04
Merge pull request #14 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 11, 2019
4a89c61
Bump axios from 0.17.0 to 0.18.1 in /client
dependabot[bot] Jul 11, 2019
8a4a002
Merge pull request #15 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 11, 2019
d7e437c
Bump macaddress from 0.2.8 to 0.2.9 in /client
dependabot[bot] Jul 11, 2019
ebb6a5b
Bump fstream from 1.0.11 to 1.0.12 in /client
dependabot[bot] Jul 11, 2019
c79e9da
Bump sshpk from 1.13.1 to 1.16.1 in /client
dependabot[bot] Jul 11, 2019
dbfec22
Merge pull request #16 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 11, 2019
5df8900
Merge pull request #17 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 11, 2019
16cdeb6
Merge pull request #18 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 11, 2019
2aac22b
Bump extend from 3.0.1 to 3.0.2 in /client
dependabot[bot] Jul 11, 2019
e8a4a1d
Merge pull request #19 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 11, 2019
9d3a652
Bump merge from 1.2.0 to 1.2.1 in /client
dependabot[bot] Jul 12, 2019
aa9da83
Bump handlebars from 4.0.11 to 4.1.2 in /client
dependabot[bot] Jul 12, 2019
75b07db
Bump tar from 2.2.1 to 2.2.2 in /client
dependabot[bot] Jul 12, 2019
940fdb9
Bump clean-css from 4.1.9 to 4.1.11 in /client
dependabot[bot] Jul 12, 2019
2bd1f83
Bump diff from 3.4.0 to 3.5.0 in /client
dependabot[bot] Jul 12, 2019
07459c5
Bump react-dev-utils from 4.1.0 to 4.2.3 in /client
dependabot[bot] Jul 12, 2019
1fdf15f
Merge pull request #25 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 12, 2019
8d07457
Bump stringstream from 0.0.5 to 0.0.6 in /client
dependabot[bot] Jul 12, 2019
5cc9516
Merge pull request #24 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 12, 2019
2a5ce73
Merge pull request #26 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 12, 2019
b1237a0
Merge pull request #23 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 12, 2019
88eeadb
Merge pull request #22 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 12, 2019
a5f8d80
Merge pull request #21 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 12, 2019
596c175
Merge pull request #20 from kevincai79/dependabot/npm_and_yarn/client…
kevincai79 Jul 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# OS X
.DS_Store*
Icon?
._*

# Windows
Thumbs.db
ehthumbs.db
Desktop.ini

# Linux
.directory
*~


# npm
node_modules
package-lock.json
*.log
*.gz


# Coveralls
coverage

# Benchmarking
benchmarks/graphs

build
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# SmartParking
# Parking PrediXion
## About
Winner at the 2017 GE Minds + Machines Appathon.
<p align="center">
<img width="262" height="528" src="https://github.com/joshleichtung/ParkingPrediXion/blob/development/readme_assets/parking-predixion-example.gif?raw=true">
</p>
Parking PrediXion is mobile web and mobile application built in React, Node and Python, integrating Predix's CityIQ API and hosted on Predix. Parking PrediXion collects data from the CityIQ API while our algorithm processes this data in order to offer users an accurate prediction as to city conditions and parking availability up to an hour in advance. This will allow users to plan their time as well as their travel decisions to allow for reduced travel time as well as carbon dioxide emissions. Parking PrediXion in the near future will be able to predict urban parking conditions a week up to a month in advance to allow users to make travel plans much more efficiently and lower their carbon dioxide emissions in the process.

## Build Instruction
* Clone repo.
* Run `npm install` from the root. This installs the dependencies for the server.
* `cd client`, then `npm install`, which installs dependencies for the react front
end.
* You will need to run two servers, so will need 2 terminal tabs. In the root
directory, run `PORT=3001 node bin/www`
* In a new terminal tab, `cd client` and run `npm start` to start the react app.

## Development Notes
* You should only need to work inside the `/client` folder to start. The entry
point is `client/src/App.js`. Build further in the components directory.
* The mapbox package repo and demo info is at [react-mapbox-gl](https://github.com/alex3165/react-mapbox-gl)
46 changes: 46 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var index = require('./routes/index');
var users = require('./routes/users');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', index);
app.use('/users', users);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});

// error handler
app.use(function(err, req, res, next) {
// set locals, only providing error in development
res.locals.message = err.message;
res.locals.error = req.app.get('env') === 'development' ? err : {};

// render the error page
res.status(err.status || 500);
res.render('error');
});

module.exports = app;
90 changes: 90 additions & 0 deletions bin/www
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/usr/bin/env node

/**
* Module dependencies.
*/

var app = require('../app');
var debug = require('debug')('parking-predixion:server');
var http = require('http');

/**
* Get port from environment and store in Express.
*/

var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);

/**
* Create HTTP server.
*/

var server = http.createServer(app);

/**
* Listen on provided port, on all network interfaces.
*/

server.listen(port);
server.on('error', onError);
server.on('listening', onListening);

/**
* Normalize a port into a number, string, or false.
*/

function normalizePort(val) {
var port = parseInt(val, 10);

if (isNaN(port)) {
// named pipe
return val;
}

if (port >= 0) {
// port number
return port;
}

return false;
}

/**
* Event listener for HTTP server "error" event.
*/

function onError(error) {
if (error.syscall !== 'listen') {
throw error;
}

var bind = typeof port === 'string'
? 'Pipe ' + port
: 'Port ' + port;

// handle specific listen errors with friendly messages
switch (error.code) {
case 'EACCES':
console.error(bind + ' requires elevated privileges');
process.exit(1);
break;
case 'EADDRINUSE':
console.error(bind + ' is already in use');
process.exit(1);
break;
default:
throw error;
}
}

/**
* Event listener for HTTP server "listening" event.
*/

function onListening() {
var addr = server.address();
var bind = typeof addr === 'string'
? 'pipe ' + addr
: 'port ' + addr.port;
debug('Listening on ' + bind);
}
21 changes: 21 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Loading