/thaiclubhouse

Clubhouse Thailand Community Calendar

Primary LanguageJavaScript

Components

  • Backend worker

    • Written using Node.js
    • Fetches rooms and events from data sources (Facebook, Twitter, Google Forms)
    • Saves to data store
    • See: automation.js
  • Data store

  • Static site generator

    • Written using PHP
    • Generates a web page for each day
    • See gen.php
  • Operational scripts

    • Runs the backend, generates the static site, and uploads to Firebase Hosting
    • Runs periodically via cron
    • See cron.sh
  • Client-side JavaScript

Website development

Clone data repository

# Clone data repository
git clone https://github.com/clousehub/thaiclubhouse-data.git data

Install PHP CLI and composeer

Ubuntu

sudo apt install -y php-7.4 php7.4-mbstring composer

Mac MacOS has a default php version, so we need to run brew link and append the installed version to path.

brew install php@7.4 composer
brew link php@7.4
echo 'export PATH="/usr/local/opt/php@7.4/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc
echo 'export PATH="/usr/local/opt/php@7.4/sbin:$PATH"' >> ~/.zshrc # or ~/.bashrc

Install dependencies

composer install

Compile

php gen.php


Then open `public/index.html`