Giter Site home page Giter Site logo

uber-car-simulator's Introduction

UBER Car Simulator (for Uber Clone Course)

Simple server to simulate local cars & update their coords to Firebase.

Installation

  1. Run git clone https://github.com/HaysS/uber-car-simulator.git to clone the repo.
  2. Run cd uber-car-simulator & then npm install
  3. Copy .env.example to .env & add your Google Directions API & Firebase credentials (DO NOT COMMIT THIS FILE!)
  4. Run DEBUG=myapp:* npm start
  5. Server should now be running & viewable at http://localhost:3000/

Using the Simulator

To Store Your Simulator Coordinates

Navigate to http://localhost:3000/simulator/store to store coordinates for the routes laid out in utils/DirectionsAPI.js. This will parse the addresses & store an array of route coordinates for the Simulator to run your cars through.

To See Your Simulator Coordinates

Making sure your Firebase & Google Directions API credentials are set up correctly, navigate to http://localhost:3000/simulator/data. This will display all coordinates the simulator will use when running. (If you haven't added custom addresses in DirectionsAPI.js, it will be empty).

To Start Your Simulator

Making sure you have coordinates stored by viewing http://localhost:3000/simulator/data, navigate to http://localhost:3000/simulator/start in your browser & you can now see the coordinates being updated, in real-time, within your firebase database.

Adding Custom Routes with Addresses Near You

  • Navigate to /utils/DirectionsAPI.js in your text editor
  • Replace the JS Objects in the routesNearHome array with any number of addresses that you want.

I just find nearby addresses, then copy & paste from Google. These addresses are used to create coords from the origin to the destination address. This is what the car travels along, back & forth.

uber-car-simulator's People

Contributors

hayscoding avatar hayss avatar

Stargazers

Oleksandr Danylchenko avatar James A. avatar Timothy Ogbemudia avatar Shubham avatar Praveen Soni avatar lotvall avatar Juan pablo avatar Andrew Goodman avatar Prideaux avatar Vishwasraj avatar  avatar Ricardo Rodrigues avatar MoMo avatar Oz Shemesh avatar Rufat avatar William Mbotta avatar  avatar Amen Moja Ra avatar Patrick Gabriel avatar Ewetumo Alexander avatar Patrick Aljord avatar Devendra Singh Shekhawat avatar

Watchers

James Cloos avatar Prideaux avatar

uber-car-simulator's Issues

Your Uber-Clone RN Course in Youtube

hi, ı have two problems in driver.js. How can ı solve.
problems are here:
1- undefined is not an object (evaluating 'new _expo.MapView.AnimatedRegion'')
2-undefined is not an object (evaluating 'new _expo.MapView.Marker')

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.