Inspired by Club Fair Attention Monopoly, I wanted to make a project to advertise Hack Club at club fairs, with a little more pizzazz.
It's a website meant to be run on a TV at club fairs, and when someone texts the number at the top with their name, their fortune will appear on-screen (don't worry, names are filtered)! Fortunes are generated by AI, and might be a little ominous >:)
If you end up using this at your club fair, send me a photo @ gusruben@protonmail.com!
- Clone the repo & install the dependencies with Bun:
git clone https://github.com/gusruben/fortune-phone.git
bun install
-
Make a Telnyx account, and add $2-$5 worth of credits.
-
"Buy" a number in the Telnyx portal.
-
Create a "messaging profile" for the number, and for the "Send a webhook to this URL" field, paste in
https://example.com/api/telnyx
or the equivalent for wherever you are running this.If you are not running this on a public server, trying using a tool like bore or ngrok to tunnel your server to the internet. For example,
bore local 5173 --to bore.pub --port 5678
would result in a URL ofhttp://bore.pub:5678/api/telnyx
. -
Lastly, select the number you bought and set the profile to the one you just created.
-
Obtain an API key for Claude OR ChatGPT, and load it with a few credits.
-
Add the API key and phone number to .env:
VITE_PHONE_NUMBER=+1 (234) 555-6789 # This can be in any format you want, it's only used for display
# Use either one of these, you only need one! I've been getting better results with Claude.
VITE_ANTHROPIC_API_KEY=sk-ant-XXXXXXXXXXXXX...
VITE_OPENAI_API_KEY=sk-proj-XXXXXXXXXXXXX...
- Done! The website should be fully functional!
This project is written in Svelte with Bun, and TailwindCSS for styling on the frontend. It uses Telnyx for SMS and Anthropic (Claude) or OpenAI (ChatGPT) for fortune generation.
This project was inspired by https://github.com/tmb/club-fair-attention-monopoly.