๐Ÿ–ผ๏ธ Farcaster Image Gallery Frames

September 12, 2025 ยท View on GitHub

Farcaster Image Gallery Frames

A powerful gallery application that allows users to create interactive image galleries that can be shared and viewed as Farcaster Frames. Users can upload multiple images, customize the gallery appearance, and share it as a Farcaster Frame that can be interacted with directly on the Farcaster (https://www.farcaster.xyz/) platform.

โœจ Features

  • Upload up to 5 images per gallery
  • Customize gallery appearance (title, button texts, frame size)
  • Interactive navigation between images
  • Generate shareable Farcaster Frame links
  • Responsive design for all devices
  • Fast and efficient image upload

๐Ÿš€ Live Demo

Check out the live demo at: https://frames-gallery.vercel.app/

๐Ÿ—๏ธ Project Structure

.
โ”œโ”€โ”€ app/                    # Next.js app directory
โ”‚   โ”œโ”€โ”€ gallery/            # Gallery pages
โ”‚   โ”‚   โ””โ”€โ”€ [id]/           # Dynamic route for individual galleries
โ”‚   โ”œโ”€โ”€ globals.css         # Global styles
โ”‚   โ””โ”€โ”€ layout.tsx          # Root layout
โ”œโ”€โ”€ components/             # Reusable components
โ”‚   โ”œโ”€โ”€ copy-button.tsx     # Copy to clipboard component
โ”‚   โ”œโ”€โ”€ create-gallery-form.tsx  # Form for creating galleries
โ”‚   โ”œโ”€โ”€ galleries.tsx       # Gallery display component
โ”‚   โ””โ”€โ”€ navbar.tsx          # Navigation bar
โ”œโ”€โ”€ pages/
โ”‚   โ”œโ”€โ”€ api/                # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ toggle.ts       # Toggle gallery state
โ”‚   โ”‚   โ”œโ”€โ”€ upload-gallery.ts # Handle gallery uploads
โ”‚   โ”‚   โ””โ”€โ”€ uploadthing.ts  # UploadThing configuration
โ”‚   โ””โ”€โ”€ share/              # Share pages
โ”‚       โ””โ”€โ”€ [id].tsx        # Shared gallery view
โ”œโ”€โ”€ public/                 # Static assets
โ”œโ”€โ”€ server/                 # Server-side utilities
โ”‚   โ””โ”€โ”€ uploadthing.ts      # File upload configuration
โ”œโ”€โ”€ utils/                  # Utility functions
โ”‚   โ”œโ”€โ”€ constants.ts        # Application constants
โ”‚   โ”œโ”€โ”€ lib.ts              # Helper functions
โ”‚   โ””โ”€โ”€ uploadthing.ts      # UploadThing client config
โ”œโ”€โ”€ .env.example           # Example environment variables
โ””โ”€โ”€ package.json           # Project dependencies

๐Ÿ› ๏ธ Tech Stack

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+ and Bun installed
  • A Vercel account for deployment
  • A Farcaster account (for testing frames)

Local Development

  1. Clone the repository

    git clone https://github.com/your-username/image-gallery-frame.git
    cd image-gallery-frame
    
  2. Install dependencies

    bun install
    
  3. Set up environment variables

    cp .env.example .env.local
    

    Then, update the .env.local file with your credentials:

    # UploadThing (https://uploadthing.com/)
    UPLOADTHING_SECRET=your_uploadthing_secret
    UPLOADTHING_APP_ID=your_uploadthing_app_id
    
    # Vercel KV (https://vercel.com/storage/kv)
    KV_URL=your_vercel_kv_url
    KV_REST_API_URL=your_vercel_kv_rest_url
    KV_REST_API_TOKEN=your_vercel_kv_rest_token
    KV_REST_API_READ_ONLY_TOKEN=your_vercel_kv_readonly_token
    
    # App URL (for generating shareable links)
    NEXT_PUBLIC_APP_URL=http://localhost:3000
    
    # Environment (development/production)
    NODE_ENV=development
    
  4. Run the development server

    bun run dev
    
  5. Open http://localhost:3000 in your browser

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.