Skip to content

finos/calendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2aadd26 · Feb 28, 2025
Feb 25, 2025
Apr 2, 2024
Dec 10, 2024
Dec 12, 2024
Feb 28, 2025
Feb 7, 2025
Sep 7, 2023
Sep 7, 2023
Sep 7, 2023
Sep 7, 2023
Feb 7, 2025
Dec 5, 2023
Dec 5, 2023
Dec 10, 2024
Jan 9, 2025
Feb 7, 2025
Feb 25, 2025
Feb 25, 2025
Oct 4, 2023

Repository files navigation

FINOS Calendar

This code builds the page hosted on https://calendar.finos.org , which is also embedded on https://www.finos.org/calendar , in order to provide a fully hosted solution that shows all events in the FINOS Community (Google) Calendar that can be correctly visualised also behind a corporate firewall.

A Github action runs periodically to fetch events using Google APIs (see src/googleapi2events.js) and renders out a JSON file in dist/events.json.

The calendar is visualized in HTML using React and FullCalendar.

Prerequisites

  • Node.js, npm and GPG(/GNUPG) installed on your machine.

Getting Started

  1. Clone the repository:
git clone https://github.com/finos/calendar.git
cd calendar
  1. Download calendar-service-account.json into the project's root folder.

In order to use the Google Calendar API you will need to follow these 5 steps to generate the necessary credentials for a Service Account. Once you have the credentials store them in the root folder of the project in a file named calendar-service-account.json.

Encrypting Google Service Account key

gpg --symmetric --cipher-algo AES256 calendar-service-account.json

:::note FINOS-Specific

Following this procedure creates the file calendar-service-account.json.gpg which can be safely committed to the repository. The decryption key for the checked-in version of this file can be found in the FINOS 1 Password folder.

:::

Decrypting Google Service Account key

gpg --decrypt calendar-service-account.json.gpg > calendar-service-account.json

Creating An Environment Variable for the Google Service Account Key

export GOOGLE_APPLICATION_CREDENTIALS=`cat calendar-service-account.json````

This will be used by Gatsby's endpoints for the Google Calendar API.

Install the dependencies:

npm install

Import events from Google API

Create a new directory named dist in the root directory and run :

npm run get-events

Copy events.json from dist to root directory.

Run development server (Gatsby)

npm start

Open browser to http://localhost:8000/.

Live environment

https://calendar.finos.org is served by Github Pages and deployed by the build.yml Github Action.

Tests

Tests are implemented using testing-library/react and vitest.

npm run test