PWA for making ad hoc room reservations easy in Google Workspace environment.

Related tags

React get-a-room
Overview

Get A Room!

More images in directory documentation/ui-and-architecture-images!

Project structure

The project is divided into frontend and backend folders which contain the corresponding npm projects and README.md:s. Remember to also check those README.md:s for development environment instructions etc.

Code formatting

To utilize code formatting on commit, run npm install in the project root folder

Setting up a new Google Cloud Environment and deployment

Here are instructions on setting up a new Google Cloud deployment environment i.e. if new staging or production environment is needed.

First a new project should be created to Google Cloud. Name for the project could be for example "get-a-room".

Next up "Container registry" and "Cloud Build API" should be enabled for this newly created project. These are used to storage and build the Cloud Run containers. Also remember to enable the Google Calendar API and Admin SDK API for the project from these URL:s:

https://console.cloud.google.com/marketplace/product/google/calendar-json.googleapis.com https://console.cloud.google.com/marketplace/product/google/admin.googleapis.com

Next up if you are using GitHub actions to deploy the project to this new environment, a new service account should be created for the newly created Google Cloud project. Service account is used to authenticate the GitHub actions, so automatic deployments are possible. Service account name could be for example "get-a-room" and the service account should be given these roles:

Cloud Run Admin Cloud Build Editor Cloud Build Service Account Viewer Service Account User

At this newly created service accounts page, go to "KEYS" -> "ADD KEY" -> "Create new key" -> "JSON" -> "Create". After downloading the key, its whole content should be saved as GitHub repository secret, so it can be accessed inside the GitHub actions worklow file .github/workflows/ci.yml and GitHub Actions have permission to use Google Cloud Build API and Cloud Runs. Secret name could be something like this: "GCR_SA_KEY_NEW_ENVIRONMENT_NAME".

After adding the service account key, next up the Google Clouds project ID should also be added as GitHub repository secret. Project ID probably looks something like this: "get-a-room-123456" and can be checked from Google Cloud. Naming convention on the ci.yml file for the project ID secrets is something like this: "GCR_PROJECT_NEW_ENVIRONMENT_NAME"

Now best way to find out where and how these env variables should be used inside the ci.yml file is to check how the existing variables are used. Existing Google project ID variables and service account keys are named something like this: "GCR_PROJECT*" and "GCR_SA_KEY*"

Now after these variables are setted up, a new deployment job should be created that uses these new variables. Deployment jobs reside inside file .github/workflows/ci.yml. You can check how the existing deployment jobs are created there (i.e. frontend-deploy-prod and backend-deploy-prod) and copy them and use these newly created GitHub secrets on them.

After new deployment jobs are created, you can run the pipeline. The pipeline builds the images and deploys them to the Cloud Runs. First time backend deploy to Cloud Run probably fails with errors that ENV variables are not set. ENV variables can be setted up at the backends Cloud Run page. Example on what ENV variables should be setted up to the backend Cloud Run can be found in file backend/.env.example In file backend/.env.example there is helpful comments on how to obtain these ENV variables.

Also new nginx.conf should be created for this new environment, you can check how the existing nginx.confs are created (i.e. frontend/.docker/.docker-prod/nginx.conf) Remember to change the "proxy_pass" address from this nginx.conf to point to this newly created environments Cloud Run backend. So the Nginx knows to route the /api paths traffic to the correct backend. Backends auto generated URL can be found at the Cloud Runs edit/information page.

After this you probably want to point some domain to this application. This can done by pointing the domain to the frontend/Nginx Cloud Run service. After the domain is pointed correctly, it should setted up also to the FRONTEND_URL and CALLBACK_URL ENV variables.

As a last thing, new OAuth 2.0 Client should be created in Google Cloud -> "APIs and services" -> "CREATE CREDENTIALS" -> "OAuth Client ID". Application type is "Web Application". Authorized JavaScript origins can be left empty. And to the "Authorised redirect URIs" this URL should be added: "https://yourdomainname.com/api/auth/google/callback" And of course remember to replace "yourdomainname" with the new domain name that was reserved for this application.

Now you should have a working GitHub actions deployment and a new environment!

You might also like...

React Google Analytics 4

React Google Analytics 4 Migrate from old react-ga // Simply replace `react-ga` with `react-ga4` import ReactGA from "react-ga"; import ReactGA from "

Dec 29, 2022

A Facebook Clone which built with reactJS. You can sign in with your Google Account and send realtime posts.

Facebook Clone with ReactJS A Facebook Clone application that you can sign in with your Google Account and send realtime posts. Facebook Clone Demo Li

Nov 25, 2022

How to submit HTML forms to Google Sheets. (Updated for 2021 Script Editor)

How to submit HTML forms to Google Sheets. (Updated for 2021 Script Editor)

Submit a HTML form to Google Sheets How to submit a simple HTML form to a Google Sheet using only HTML and JavaScript. Updated for Google Script Edito

Jan 6, 2023

Build Google 2.0 with Tailwind CSS & Next.js for Education Purpose..

Paradise of Creativity Parimal Nakrani This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server:

Dec 21, 2021

A node script that lists the cities on Santa's route from santatracker.google.com

Google Santa Route A script that lists the cities on Santa's route from santatracker.google.com based on the JSON containing all Santa's destinations.

Dec 24, 2021

Ember implementation of Google's Material Design

No longer maintained This project is no longer maintained. For an up-to-date material design project, please use Ember Paper. Ember-material-design Th

Mar 1, 2022

A web application which is a clone of Google keep. Made it by using react framework.

A web application which is a clone of Google keep. Made it by using react framework.

Oct 30, 2022

Youtube clone with react and google cloud youtube API😊🤘

Youtube clone with react and google cloud youtube API😊🤘

Getting Started with Create React App This project was bootstrapped with Create React App. UI / Demo Available Scripts In the project directory, you c

Apr 14, 2022

Note Port is a frontend clone of Google Keep. It uses localstorage to save your notes!

Note Port is a frontend clone of Google Keep. It uses localstorage to save your notes!

Note Port About Note Port is a frontend clone of Google Keep. It uses localstorage to save your notes! Tech Stack React Screenshots Things I want to a

Sep 10, 2022
Owner
null
A Workspace Web App powered by React and Node Js.

zc_main This is the Zuri Chat frontend built with ExpressJS (Backend) and React (Frontend) Getting Started. Make sure you have nodejs installed by run

Zuri Chat 189 Dec 14, 2022
automate your workspace version & publish by using conventional-changelog-commits

Lerna-Lite ?? Lerna-Lite is a super light version of the original Lerna About Lerna-Lite Why create this lib/fork? See it in Action README Badge Insta

Ghislain B. 307 Dec 24, 2022
automate your workspace version & publish by using conventional-changelog-commits

Lerna-Lite ?? Lerna-Lite is a super light version of the original Lerna About Lerna-Lite Why create this lib/fork? See it in Action README Badge Insta

Ghislain B. 129 May 8, 2022
A simple PWA to scan your EU digital COVID Certificate and generate a passbook from it

COVID-19 passbook Generator The aim of this project is to let a user scan a EU Digital COVID Certificate with their smartphone, and generate a passboo

Thibault Milan 129 Nov 11, 2022
Isolated React component development environment with a living style guide

Isolated React component development environment with a living style guide React Styleguidist is a component development environment with hot reloaded

Styleguidist 10.6k Jan 5, 2023
Grid-tool - Small tool that allows you to integrate a predefined or generated grid into your front-end development environment.

Grid tool Small tool that allows you to integrate a predefined or generated grid into your front-end development environment. Tool installation includ

hmongouachon 2 Jan 4, 2022
A react component helps bring Figma's Cursor Chat to your web applications in less than 3 minutes, making real-time collaboration anywhere

@yomo/react-cursor-chat ?? Introduction A react component helps bring Figma's Cursor Chat to your web applications in less than 3 minutes, making real

YoMo 84 Nov 17, 2022
A simple component for making elements draggable.

React Draggable Component A simple component for making elements draggable. Demo stackblitz Installation $ npm install drag-react # yarn add drag-reac

Haikel Fazzani 9 Sep 17, 2022
A set of React components implementing Google's Material Design specification with the power of CSS Modules

React Toolbox is a set of React components that implement Google's Material Design specification. It's powered by CSS Modules and harmoniously integra

React Toolbox 8.7k Dec 30, 2022
A Google Clone which built with ReactJS. You can click the demo and search whatever you want!

Google Clone with ReactJS A small web app that imitate the desktop web version of google site, you can search whatever you want. Google Clone Demo Lin

Özge Coşkun Gürsucu 36 Aug 14, 2022