Skip to content

hackclub/cac-demo

Repository files navigation

cac-demo

A set of slides created for Hack Club's talk at the 2025 Congressional App Challenge's #HouseOfCode.

These slides are accessible and previewable by anyone, but controllable by one person (set the environment variable NEXT_PUBLIC_AUTHORISED_USER to their GitHub username). Sign in by clicking the inconspicuous GitHub logo.

The slide that the authorised user/'admin' is on dictates how the sent-in text messages are processed. Unauthorised users can still navigate between each slide.

Between sessions, switch out the database URL then re-seed it using bun prisma db seed.

Development

Twilio

  1. Create a Twilio account and obtain a phone number for use. Set the NEXT_PUBLIC_PHONE_NUMBER variable to this phone number.
  2. Head to this page, select your phone number, and head to Webhook > Messaging Configuration.
  3. Under a message comes in, add a URL at which your site is publicly accessible in the field. Additionally, set the webhook to HTTP POST.

GitHub OAuth

  1. Create a GitHub 0Auth App.
  2. Copy the provided Client ID and Client Secret for your .env file.

General

  1. Clone the repository.

    git clone https://github.com/hackclub/cac-demo && cd cac-demo
    
  2. Install dependencies. (install bun)

    bun install 
    
  3. Configure a Postgres database - add the connection URL to your .env file.

  4. Seed the database with the slide contents.

    prompt refers to the text that should appear in the top box. directive refers to the directions provided to the AI in response to how to parse text messages sent in answer to the current active prompt. current refers to the slide which should be first. I'm not actually sure why this is here, but it's false by default. wordcloud refers to whether the slide should have a wordcloud active. True by default.

    bun prisma db seed
    
  5. Start the development server, as well your Ngrok instance and visit your Ngrok URL in the browser.

    bun run dev
    

About

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •