-
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
- Contains information about room and events
- Automatically generated by backend (above)
- See clousehub/thaiclubhouse-data repository
-
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
- Enhances the experience of using the app
- See public/js/index.js
# Clone data repository
git clone https://github.com/clousehub/thaiclubhouse-data.git data
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
composer install
php gen.php
Then open `public/index.html`