Available is a React-based web application designed to run in kiosk mode on a Raspberry Pi. It displays whether you are currently in a meeting or available by fetching data from your Google Calendar and displaying relevant GIFs using the Giphy API.
- Google Calendar Integration: Checks your Google Calendar for upcoming events and determines your availability.
- Giphy Integration: Displays GIFs from Giphy based on your availability status.
- Kiosk Mode: Designed to run full-screen on a Raspberry Pi in kiosk mode.
- Node.js and npm
- Google Account for Calendar API
- Giphy Account for API access
- Docker and VS Code (for using the development container)
git clone https://github.com/your-username/available.git
cd available
- Go to the Google Cloud Console.
- Create a new project.
- Enable the Google Calendar API for your project.
- Go to the Credentials section.
- Create OAuth 2.0 Client IDs credentials:
- Application type: Web application
- Authorized redirect URIs:
http://localhost
- Download the credentials JSON file and extract your Client ID.
- Sign up or log in to Giphy Developers.
- Create a new app.
- Copy the API Key provided by Giphy.
Create a .env
file in the root of the project with the following content:
VITE_GOOGLE_CLIENT_ID=your-google-client-id-here
VITE_GIPHY_API_KEY=your-giphy-api-key-here
Replace your-google-client-id-here
and your-giphy-api-key-here
with the actual keys obtained from Google and Giphy.
This project is configured to use a development container for a consistent development environment.
- Open the project in VS Code.
- Reopen the project in a Dev Container:
- Press
F1
, type "Remote-Containers: Reopen in Container" and select it.
- Press
- The container will automatically build and start, installing all dependencies.
If you prefer running the project locally:
-
Install dependencies:
npm install
-
Run the project:
npm run dev
-
Open your browser and navigate to
http://localhost:5147
to see the app in action.
-
Build the project:
npm run build
-
Serve the app using pm2:
sudo npm install -g pm2 pm2 serve dist 5000 --name "available" pm2 startup pm2 save
-
Set up Chromium in kiosk mode:
-
Edit the autostart file:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
-
Add the following lines:
@xset s off @xset -dpms @xset s noblank @chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost:5000
-
-
Reboot the Raspberry Pi:
sudo reboot
-
Your app should now automatically start in kiosk mode on boot.
Available by David Bates is licensed under CC BY 4.0