Coder Social home page Coder Social logo

pp-car-share's Introduction

Car Share Scheme

Car Share Scheme is a web application implemented on a MERN Stack.

Features

  • Car Share Booking System for customers:
    • Overview of Car Share System on landing page
      • Details about the system
      • Cars offered for rental service
      • FAQs
    • Location map displaying all the garages in Melbourne with Google Maps API
    • Ability to checkout cars at a given pickup/return location
    • Account registration to keep track of customer's bookings
    • Booking System:
      • Search for available cars by a specified date range
      • Filter available cars in specified date range by car attributes and pickup/return location
      • Make bookings with desired car and time
      • View all of customer's bookings
      • Ability to cancel upcoming bookings
      • Pickup and return car on booking dashboard when it's time, changing booking status
  • Car Share Admin System for staff members:
    • Create/modify locations/garages/car pickup/return spots with address using Google Maps Places API Autocomplete feature
    • Create/modify user accounts
    • Create/modify cars
    • View all of customers' bookings
    • Cancel customer's upcoming bookings

Installation

  1. Make sure Node.js is installed on your machine.
  2. MongoDB setup:
    1. Make sure MongoDB is installed and running on your machine.
    2. Leave credentials as blank.
    3. In your environment, export the MongoDB URI as variable MONGO_URI with mongodb://localhost:27017 as the value
  3. Clone repository from https://github.com/yongjiajun/pp-car-share to your desired folder.
  4. To compile the backend code, run npm install in backend/.
  5. To compile the frontend code, run npm install in frontend/.

To run

  1. To make Google Maps API work, export the variable REACT_APP_API_KEY with your Google Maps API key as the value in your environment.
  2. Make sure MongoDB URI is set up as mentioned above.
  3. To start the backend server, run npm install in backend/.To start the frontend server, run npm install in frontend/.

Uninstallation

  1. Stop the backend and frontend servers if they are still running.
  2. Remove the folder containing the repository files and compiled source code.

Code Structure

  • backend/ contains code for Express.js and also code for maintaining mongodb connection.

    • api/ contains code for REST APIs, separated by models.
      • controllers/ contains code for model db controllers.
      • models/ contains code/schema for models.
      • routes/ contains code for routing urls to controllers.
    • app.js contains code for Express.js configs such as routings, mongodb connection, CORS handling, etc.
    • app_server.js contains code for managing Express.js core configs such as listening port and http/s protocol.
  • frontend/ contains code for React.js for the frontend of the web application

pp-car-share's People

Contributors

alexwitedja avatar davidd-code avatar dependabot[bot] avatar yongjiajun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pp-car-share's Issues

Add car model

Summary

To add car db model with the following attributes:

  • ID (of course)
  • Make
  • Seats
  • BodyType
  • Location/coordinates (thoughts?)
  • NumberPlate
  • Colour
  • CostPerHour
  • FuelType
  • TotalDistance ??
  • CurrentBookingID (nullable: if not null = car has been booked, direct access to Booking object using id)

Thoughts and anything to add?
@davidd-code @alexwitedja

Add booking model

Summary

To add booking db model with the following fields:

  • ID
  • UserID
  • CarID
  • Datetime booked
  • Datetime start
  • Datetime end
  • Cost
  • Pickup location
  • Drop location
  • Distance ??
  • Status

Thoughts and anything to add?
@davidd-code @alexwitedja

I was thinking of add-ons or extra costs such as toll charges, but I think it's too unnecessary lol.

Create Car Form Validation

All of the dropdown boxes in the Create Car form show a default value, but the actual value that is saved in the react state is empty until the user selects a different option from the default value. This means that if a staff or admin wants to add a new car to the database, if they want to create a car with the body type "Sedan", then they have to select a different option first. In this case it would involve clicking the drop down box, changing the body type to either MPV, Hatch, Sports or Ute and then selecting the same field again and selecting Sedan after.

Implement booking system

Checklist:

  • Search for available cars at a given time range
  • Filter available cars with specified attributes
  • View booking details before confirmation
  • Create bookings
  • Test search/filter cars features with active bookings

Adding api key

Can you please let me know where to add the created api key.

Error:Unhandled Rejection (TypeError): Cannot read property 'geometry' of undefined

Fix booking dates timezone offset

Date objects get saved in UTC time in mongodb by default, but then we need to implement an offset when obtaining from the database.

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.