This Lambda Labs Project is a location based trip planner to keep your family and friends informed of your adventures.
React, Express, Node, Postgres
Deploy URL Backwoods
You must use NPM to install packages for this project. Our Heroku deploy fails if yarn.lock files are present in the build. With no lock file a package manager will install the newest dependencies which can cause incompatibility issues. Notably the date picker and maps packages that we are using.
- Clone repo.
- In
/CS8-Backwoodstypenpm ito install back-end dependencies. - Make sure you have a Postgres DB running on your local machine. Instructions here
- The
npm startcommand will start back-end server listening on port 8000. - Open a new terminal window.
cd clienttypenpm ito install front-end dependencies.- The or
npm startcommand visit site at localhost:3000
- Sign-up: located in the top right hand corner is a
SIGN UP/SIGN INbutton, this will pop-up a modal to the sign-up forum after entering the needed credentials to sign-up and hitting submit will make a greenuser successfully created!tab pop up at the top of the browser and should direct you to the sign-in modal. - Sign-in: After signing up and being redirected to sign-in your username and password should already be filled in with the correct credentials and you can hit submit to quickly sign-in. This will make a green
Logged in successful!tab pop up at the top of the browser and redirect you to the logged in home page where you get a navigation bar on the side and aAdd your first trip!card with the plus Icon on the page. - Adding your first Trip: If you click on the plus Icon you'll be routed to the create-trip page. On this page you'll have to fill out
Name,Start Date,End Dateand thesave tripbutton will no longer be grayed out and enabled! After filling out the required fields to save the trip you can click theAddbutton to the right of the map to add your first marker to the trip. Once you've clickedAddyou can now fill out your marker name and the card will open up and show your requiredETAfor the marker. After filling out yourMarker NameandETAyou can click on the map to place your marker then you're able to save the marker to the trip and theAddbutton will not be grayed out and enabled once again to add more markers, if you want to delete the marker you'll see theRemovebutton is no longer grayed out (after saving a marker) and you can delete that marker and add a new one. After completing these steps you can save your trip and you'll be redirected back to the home page and see your trip in a card view with yourtitleat the top andstart date/end datelocated below the thumbnail. - Clicking to view a trip: After you've created your trip(s) you can click on the card that was created for your trip(s) and you'll be directed to the view for the trip you just clicked on you'll have your
trip Namein the top right and yourstart date/end dateto the right of the map once again. You'll also havecheckpoint name(marker name) in a card that is clickable to view yourETAfor that marker.markerswill be placed on the map that correspond with thecheckpoint/markeron the right hand side of the map (currently not implemented). - Archiving Trips: After clicking the
Homebreadcrumb in the top right you'll be redirected to see your saved trip(s) again and you canArchivea trip by clicking theArchivebutton. This will take the trip out of your main trip(s) view and place it in theArchivedsection of your navigation on the left. Once clicking theArchivedyou'll be able to see yourArchivedtrips (working on getting this view to see the archived trips). - Changing Password: when clicking on the
Accounttab in the navigation you'll be redirected to a card where you can change your password. After entering your existingemail,Old Password, and your desiredNew Passwordyou'll have a green tab that pops up at the top of the browser sayingChanged Password Successfully!and you can not log out and log back in with the new password. - Payment: when clicking on the
Billingtab in the navigation where you'll be redirected to a card where you can enter your provided credentials for a subscribtion to the app. After entering valid credentials and clickingBuy Nowbelow the form your screen will change to aPurchase Completemethod.
- If go to
/(email for user created)while not logged in you or a guest will be able to view the trips this user created that are not archived. Also, the navigation menu will not let you accessArchived,Billing, andAccounttabs.
- sinon
- sinon-chai
- Material-UI
- axios
- google-maps-react
- react-router-dom
- react-stripe-elements
- react-material-ui-form-validator
- POST route
/signup
{
"firstName": "Test",
"lastName": "Test",
"email": "test@test.com",
"password": "test"
}
- POST route
/login
{
"email": "test@test.com",
"password":"test"
}
(This route will return a JWT token that you will need to create trips)
- GET route
/:user
/test@test.com
- POST route
/createTrips
{
"tripName": "test",
"startDate": "10-23-18",
"endDate": "11-24-18",
"email": "new@test.com"
}
(Under headers/Authorization you will need to pass back the JWT token from the /login route)
- PUT route
/trips/settings
{
"email": "test@test.com",
"oldPassword": "test"
"password": "newTest"
}
(Requires auth JWT token from login to work)
- POST route
/createMarker
{
"markersArr": [
{
"tripId":"3ce4b524-3f55-45f0-ada1-203da7c557e4",
"markerName":"test1",
"eta":"test1",
"long":"test1",
"lat":"test1"
},
{
"tripId":"3ce4b524-3f55-45f0-ada1-203da7c557e4",
"markerName":"test2",
"eta":"test2",
"long":"test2",
"lat":"test2"
},
{
"tripId":"3ce4b524-3f55-45f0-ada1-203da7c557e4",
"markerName":"test3",
"eta":"test3",
"long":"test3",
"lat":"test3"
},
{
"tripId":"3ce4b524-3f55-45f0-ada1-203da7c557e4",
"markerName":"test4",
"eta":"test4",
"long":"test4",
"lat":"test4"
}
]
}
(requires the id from the trip you created and inserted here as tripID and requires auth JWT token from login to work)
- GET
/getMarkers/:tripId(need to pass in your id from the trip you created that is connected to the markers)
- PUT
/:user/archiveTrip
{
"id": "60efdf74-64a9-4268-bae6-4999e4a8cde0",
"Archived":"true"
}
(pass in the id from the trip you want archived)
- GET
/:user/getArchivedTrips(need to pass in Auth token from login)
All images are licensed under a Creative Commons Attribution 4.0 International License.
