Git Product home page Git Product logo

rdmd's Introduction

NodeJS Booking App

An appointment booking client application made using Node JS, Firebase for Login, React framework and Bootstrap for Styling. This application makes use of the Google Calendar API to create appointment timeslots on Google Calender through the server.

Requirements:

  • Node ✔️
  • Server App ✔️

Application contents:

api

  • apibooking.js - A folder containing an instance of axios to make XMLHttpRequests from the browser.

components

  • Form.js - Our main form for data input, it renders the timeslot.js depending on the date selected from the react-calendar. Uses apibooking.js post method "/book" to post the appointment to the server, after which it refreshes the date upon submit. On each date change the data is updated through the react useState hook. Users logged in Email address is sent through the api call as well as an additional message available to be put through the input field. On a successful message from the server a success message is displayed for a few seconds on the FE. Styled with Bootstrap.
  • Header.js Styled header with logout button to signout from Firebase
  • TimeSlot.js - Provides functionality, checking the date passed to it and making a call through the apibooking.js get method "/timeslots" to check available times from the servers, renders the returned data with a function to adjust the timezone since server serves UTC data
  • styles.css - Contains .react-calendar__navigation background color

App Working Directory

  • App.js - Contains the placement for the router and all routes using react-router-dom wrapped with AuthProvider to have global user state managment
  • Auth.js - Provides a global state hook for user managment with onAuthStateChanged and react useState
  • configfb.json - config.json file used with firebase. Generated for a firebase web project
  • Home.js - Main page of our App containing conditional rendering for either serving the login and signup links or the actual main page of the App
  • index.js - Root of the application, instances the App
  • Login.js - Login page. Using firebases signInWithEmailAndPassword has redirecting to the main page in case currentUser gets logged in. Styled with Bootstrap.
  • SignUp.js - Sign in page. Using firebases createUserWithEmailAndPassword has redirecting to the main page in case currentUser gets logged in. Styled with Bootstrap.
  • styles.css - Sets margins to 0 for unwanted spacing

Installation and Usage

Instructions:

  1. setup the Server following the server Readme.md
  2. npm install
  3. npm start

Usage:

  1. Register or login using your email
  2. Select a date, select one of the available time slots. click the book button.
  3. Check your server Calendar API google account to see the appointment

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.