Skip to content

JMixson/alt-text-generator

Repository files navigation

Alt-Gen - Image Alt Text Generator

A web application that uses AI to automatically generate descriptive alt text for images. Built with Next.js and the Vercel AI SDK and powered by Google Gemini AI.

Alt text

Features

  • Upload images in PNG, JPG, or JPEG format up to 10MB
  • AI-powered alt text generation using Google Gemini Flash
  • Real-time streaming of generated descriptions
  • Form validation with error handling
  • Toast notifications for user feedback

Built With

Next.js Vite Typscript Tailwindcss Vercel Google RHF Zod Shadcn

  • REACT - JavaScript library for building user interfaces
  • NEXT.JS - React framework for production
  • TYPESCRIPT - Typed superset of JavaScript
  • TAILWINDCSS - Utility-first CSS framework
  • VERCEL AI SDK - AI integration toolkit
  • GOOGLE GEMINI - AI model for image analysis
  • REACT HOOK FORM - Form validation library
  • ZOD - Schema validation
  • SHADCN/UI - UI component library
  • SONNER - Toast notification library

Installation

  1. Clone the repo
git clone https://github.com/yourusername/alt-gen.git
cd alt-gen
  1. Install packages
npm install
# or
yarn add
# or
pnpm install
# or
bun install
  1. Create a .env.local file in the root directory and add your Vercel AI Gateway API key:
AI_GATEWAY_API_KEY=your_api_key_here

To get an API key, visit the Vercel AI Gateway documentation.

Usage

To start the application, run:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 in your browser to use the application.

  1. Click the file input to select an image
  2. Choose a PNG, JPG, or JPEG image up to 10MB
  3. Click Submit
  4. Wait for the AI to generate the alt text
  5. Copy the generated description for use in your web projects

Environment Variables

The application requires the following environment variable:

  • AI_GATEWAY_API_KEY - Your Vercel AI Gateway API key for accessing Google Gemini AI

Learn More

To learn more about the technologies used in this project:

About

Get alt text for your image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors