Giter Club home page Giter Club logo

sd-researchlab-booking's Introduction

Research Lab Booking Service

This is a prototype service for booking the GDS Research Labs.

The service uses Google's resource calendars to check availability as well as create an event. The booking requests can be either AM, PM or a full day (AM + PM) slot. Requests can only be made 48hrs prior to the desired event. A user will need to register to use the service and only government or local government users can register, although they can submit a booking request on behalf of an external user.

Registration

Once a user registers (First name, last name, email, mobile phone & password) they will be sent a link to their email address which they will need to click on to verify their address. Once verified they will be directed through the normal sign in process.

Sign in

Users sign in with their email and password and then a security code is sent to their phone to complete sign in.

Sign in & register sessions can be set by an environment variable USER_TOKEN_EXPIRES and REG_TOKEN_EXPIRES

User area

Once a user has signed in they are able to see the status their booking requests as well as cancel and future bookings.

Research Lab booking

Once signed in a user is able to view availability and submit a booking request. You can only view 2 months into the future. This is a Google API limitation that only allows you to query 2 months worth of free/busy data.

Technology Stack

The service is a traditonal client server application using reactjs, nodejs and mongodb. The service is using graphql in both client and server using the Apollo graphql library. The prototype service is using Docker in both the development environment (for the server and databse) and for the build/dist environment. During development the client can be run in it's own process (yarn start) The application (server) uses an environment variable file server.env that will need to be created. The application (server) also uses a keys folder to store a *.pem file for Google access as well as RSA private and public keys for encrypting the jwt. You will need to create your own keys (or use environment variables). Client access is controlled via a jwt stored in the browser localStorage. Initial emails (for registration verification) and texts (security codes) are using the GDS Notify api.

The following environment variables will be needed:

MONGODB_URI=
REGISTER_LINK=
NOTIFY_REG_TEMPLATE_ID=
NOTIFY_LOGIN_MFA_TEMPLATE_ID=
NOTIFY_API_KEY=
GOOGLE_CUSTOMER_ID=
RESOURCE_TYPE=
BOOKING_DEFAULT_STATUS=
BOOKING_SEND_UPDATES=
TOKEN_ISSUER=
TOKEN_AUDIENCE=
TOKEN_ALGORITHM=
REG_TOKEN_EXPIRES=
USER_TOKEN_EXPIRES=

Tests

The tests are quite rudimentary at this stage.

The client tests are in the src folder. There is a test folder. Client tests can be run using the yarn test command.

The server tests are located in the root server folder and the tests can be run using yarn test.

sd-researchlab-booking's People

Contributors

adriandurran avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.