Skip to content
/ cfu Public

React app with Node JS backend. Sample app to book Taxis for Intercity Travel. Deployed on Docker and Heroku.

Notifications You must be signed in to change notification settings

boffti/cfu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car For U

A sample app made using React to book cars for intercity travel.

Build Status

Table of Contents


Clone

  • Clone this repo to your local machine using
$ git clone https://github.com/boffti/cfu.git

Installation

  • Replace the XXX of the <Script> tag in client\public\index.html with your Google Places API Key.
  • Replace the key and secret in server.js with your RazorPay API Key and Secret. This can be done with a .env file placed in the root of server dir. The variables are REACT_APP_RZP_KEY and REACT_APP_RZP_SECRET.

Setup

  • Install all the Frontend and Backend dependencies.

Backend

$ cd cfu
$ cd server
$ npm install or yarn install

Frontend

$ cd cfu
$ cd client
$ npm install or yarn install

To run the Node server and the client app server, cd into project root dir.

$ cd cfu
$ cd server
$ npm run dev or yarn dev

This will serve both the backend and front end.

App is served on localhost:3000.

Node server running on localhost:5000.

The credentials to Login in the app -

  • username - admin
  • password - admin

Docker Configuration

A docker compose file has been written.

Install Docker from here

To configure docker, perform the following steps -

  • Change the proxy in server/package.json
"proxy" : "http://cfy_server:5000/"
  • Build the images and start the containers
$ docker-compose up --build

Features

  • Material Design
  • Backend NodeJS and Express
  • Destination Autocomplete using Google Places API
  • Calendar Date Picker
  • RazorPay payments integration for checkout

Tests

  • Basic Unit test scripts have been written for a couple of components.
$ cd cfu
$ npm test or yarn test

Created By

Aneesh Melkot

AneeshMelkot

https://github.com/boffti


FAQ

  • How did you calculate the distance between the origin and the destination?

    Ans - Using the haversine function which determines the great-circle distance between two points on a sphere given their longitudes and latitudes. Haven't used any API for this yet.

  • Do I have to give my real details to check the RazorPay Booking Payment feature?

    Ans - NO. Just give any dummy values for the payment fields as it is running in Test Mode. Booking ID will be generated after Fake Payment.


Support

Reach out to me at one of the following places!


License

License

About

React app with Node JS backend. Sample app to book Taxis for Intercity Travel. Deployed on Docker and Heroku.

Resources

Stars

Watchers

Forks