Server for communication with Edisons and app clients. Holds a mongoDB database with user information and the state of the parking lot. Communications are done through mqtt for sensor data, and http for client requests.
Defines the car DB mongoose schema.
{
Plates: String,
Brand: String,
Model: String,
Year: Number
}
Defines functionality for the car model.
Defines the log DB mongoose schema.
{
Entry: Date,
User: {
Name: String,
Age: Number,
Gender: String,
Condition: String
},
Car: {
Plates: String,
Brand: String,
Model: String,
Year: Number
}
}
Defines functionality for the log model.
Defines the log DB mongoose schema.
{
Name: String,
Birthdate: Date,
Email: String,
Password: String,
Gender: String,
Condition: String,
Plates: [String]
}
Defines functionality for the log model.
Defines the log DB mongoose schema.
{
Points: [{latitude:Number, longitude: Number}],
Center: { latitude:Number, longitude: Number},
Adjacent: [String],
Name: String,
Spots: Number,
SpecialSpots: Number,
Cars: Number
}
Defines functionality for the log model.
Configuration files for the server.
Files to seed the server from a csv file.
Server instantiation.
Entry file.
File for configuring mqttServer.
Route configuration file.
Utility methods for geo point calculations and shortest path obtaining.
Get current state of parking log.
Get an ordered list of zones, ordered by fitness as a parking option. Based on graph distance from the selected preferred zone, and spot availability.
Get cars in DB.
Create a car entry on the DB.
Get all cars belonging to a specific user.
Verify an Email/password pair. Gets the user info if succesful.
Create a new user.
Add car plates to a user.
Get all logs from the server.
Get logs from a specific day.
Get logs from a specific range