Dad Joke Generator

A simple, cheerful web app that generates cheesy dad jokes using OpenAI's API.

Features

  • 🤖 AI-powered dad joke generation via OpenAI
  • 🎨 Clean, responsive design with TailwindCSS
  • âš¡ Fast and lightweight with Hono backend
  • 🔄 One-click joke generation

How it works

The app consists of:

Backend (backend/index.ts):

  • Hono server handling HTTP requests
  • /api/joke endpoint that calls OpenAI to generate dad jokes
  • Static file serving for frontend assets

Frontend (frontend/):

  • Simple HTML interface with a joke display and generate button
  • TypeScript client-side logic for fetching jokes
  • Responsive styling with TailwindCSS

Deployment

Deploy backend/index.ts as an HTTP val on Val Town. The OpenAI integration is automatically configured using Val Town's standard library.

Usage

  1. Click the "Generate Dad Joke" button
  2. Wait for the AI to generate a fresh dad joke
  3. Laugh (or groan) at the cheesy humor
  4. Repeat as needed!