Code Monkey home page Code Monkey logo

mybikesg's Introduction

myBikeSG

Deployed Link

https://mybikesg-86ea4.web.app/

API Calls (How to access backend from frontend)

Login

POST http://localhost:3000/api/login (For now)
Body = {
"email": "",
"password" : ""
}
Returns true if password is correct and false if incorrect. Can also return Database Error.

SignUp

POST http://localhost:3000/api/signUp (For now)
Body = {
"email": ,
"password" : ,
"otp": ,
"dob": ,
"name":
}
Returns "Email already in use", "true", "false", and "Database Error".
Note: Call sendEmail before signUp to send OTP else we get an error 500

resetPassword

POST http://localhost:3000/api/resetPassword (For now)
Body = {
"email": ,
"password" : ,
"otp":
}
Returns "Account does not exist", "true", "false", and "Database Error".
Note: Call sendOTP before resetPassword to send OTP else we get an error 500

sendOTP

GET http://localhost:3000/api/sendOTP/:email
Returns SENT:

Add Repair Shops

POST http://localhost:3000/api/addRepairShops Body = {
"shop_id": 1,
"contact": "[email protected]",
"lat": 1.3476840889006585,
"long": 103.68160813919555,
"name": "Item exchange try get a bike part lol!"
}
Returns "Already in Database", "true", "false", and "Database Error".

Repair Shops

GET http://localhost:3000/api/repairShops
Returns a json file with all the repair shops in the database.

Add Racks

POST http://localhost:3000/api/addRacks Body = {
"rack_id": 1,
"user_email": "[email protected]",
"lat": 1.3476840889006585,
"long": 103.68160813919555,
"verified": "true"
}
Returns "Already in Database", "true", "false", and "Database Error".

Racks

GET http://localhost:3000/api/bikeRacks
Returns a json file with all the bike racks in the database.

FrontEnd

App is inside /mybikesg, change directory to /mybikesg then run npm start to start the app in your local host

Get Google Maps API key following https://developers.google.com/maps/documentation/javascript/get-api-key , then create a .env.local file locally OUTSIDE OF /src and enter

REACT_APP_GOOGLE_MAPS_API_KEY = "{YOUR_API_KEY}" (without the curly braces)

I think you need to set up a billing account because I don't think it's free to use google maps API XD but they give $300 as a 'sign up bonus' which should be enough to last till presentation week

mybikesg's People

Contributors

ddaarrrryyll avatar harshraod avatar aaryanmadan54 avatar sanskard001 avatar xitij27 avatar weichen1602 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.