Meet Me in the Middle app can be found on heroku.
The Meet Me in the Middle back end repository supports the front end repository by accessing Google Maps and sending that information to the front end to be displayed to the user. The back end also keeps track of the database that the app uses in order to track users and meetings.
- Save users.
POST /api/v1/users
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "Some person",
"email": "sample@email.com",
"address": null
}
}
- Update users.
PUT /api/v1/users/{{user.id}}, body: {"address": "updated_address"}
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "Some person",
"email": "sample@email.com",
"address": “updated_address”
}
}
- Search users by email.
GET http://localhost:3000/api/v1/users/find_by?email={{email}}
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "Some person",
"email": "sample@email.com",
"address": “updated_address”
}
}
- Search for nearby locations to the midpoint between two locations.
GET /api/v1/search
"data": [
{
"id": "1",
"type": "location",
"attributes": {
"id": 1,
"name": "Craft Fine Street Food",
"place_id": "ChIJFWYEjYB5bIcRmxn8I3pwIyI",
"address": "2300 Steele Street, Denver",
"lat": 39.7501721,
"lng": -104.9507145,
"rating": 5.0,
"image_url": "Aap_uEA2DeYoTfsa2YAAKTBLjbr5uUMN3iaeYtNpz9ehr1lV8YVBESiDv
-xupQ2STTcWLYf8zhiXFptVPgoyUIhlahQLYxzw5kvFuZq68OvJb9U54gh8ZJEprez
ozU-IgXZZV9L9kOBMyPnpWrOI7RKTSw7yWk_ycMU9ltvXqaKidbtOtQSI",
"price_level": null
}
},
]
- Returns meetings with other users.
GET /api/v1/user_meetings
"data": [
{
"id": "1",
"type": "meeting",
"attributes": {
"host_name": "john",
"guest_name": "max",
"location_name": "A great place",
"location_address": "123 test way"
}
},
{
"id": "2",
"type": "meeting",
"attributes": {
"host_name": "john",
"guest_name": "max",
"location_name": "A bad place",
"location_address": "234 test blvd"
}
},
]
Note: You must also install and run mmie_fe for full functionality.
Go to Google and follow instructions for Google Developer setup and to create an API key.
- Clone this repository: On your local machine, open a terminal session and enter the following commands for SSH or HTTPS to clone the repo.
- using SSH key
$ git clone git@github.com:MMIM-Turing/mmim_be.git
- using HTTPS
$ git clone https://github.com/MMIM-Turing/mmim_be.git
- Once cloned, you'll have a new local copy in the directory you ran the clone command in.
- Change to the project directory: In terminal, use
$cd
to navigate to the project directory.
$ cd mmim_be
- Install required Gems utilizing Bundler:
- In terminal, use Bundler to install any missing Gems. If Bundler is not installed, first run the following command.
$ gem install bundler
- If Bundler is already installed or after it has been installed, run the following command.
$ bundle install
- Database Migration
- Before using the web application you will need to setup your databases locally by running the following command
$ rails db:{drop,create,migrate,seed}
- Run Figaro
$ bundle exec figaro install
-
That will create an
config/application.yml
file. -
Add your Google api to new this new file.
#config/application.yml
google_maps_api_key: 'your google key here'
- Startup and Access
-
Finally, in order to use the web app you will have to start the server locally and access the app through a web browser.
-
Start server
$ rails s
-
Note: You must run mmie_fe server simultaneously.
-
Open web browser and visit link http://localhost:5000
Joseph Downs | GitHub | LinkedIn |
Kim Guo | GitHub | LinkedIn |
John Hennerich | GitHub | LinkedIn |
Will Medders | GitHub | LinkedIn |
Oscar Santos | GitHub | LinkedIn |
Max Wagner | GitHub | LinkedIn |