Skip to content

SnapText is a modern web application built with React that leverages OCR (Optical Character Recognition) technology to extract text from uploaded images. It features client-side image optimization for efficient processing and a user-friendly interface for seamless text extraction.

License

Notifications You must be signed in to change notification settings

ravvdevv/SnapText

Repository files navigation

SnapText - Image to Text Extractor

SnapText is a modern web application that extracts text from images using OCR (Optical Character Recognition) technology. Built with Next.js, TypeScript, and Tailwind CSS, it provides a clean and intuitive interface for converting images to editable text.

Features

  • 🖼️ Upload images via drag & drop or file browser
  • ✨ Modern, responsive UI with dark/light mode
  • 📋 Copy extracted text to clipboard with one click
  • 🚀 Serverless architecture for optimal performance
  • 🔒 Secure API key handling

Tech Stack

  • Frontend: Next.js 14, React 19, TypeScript, Tailwind CSS
  • UI Components: Radix UI, shadcn/ui
  • OCR: OCR.space API
  • Deployment: Vercel

Getting Started

Prerequisites

  • Node.js 18+ and npm/yarn/pnpm
  • OCR.space API key (get it from OCR.space)

Local Development

  1. Clone the repository

    git clone https://github.com/yourusername/snaptext.git
    cd snaptext
  2. Install dependencies

    npm install
    # or
    yarn
    # or
    pnpm install
  3. Create a .env.local file and add your environment variables:

    OCR_SPACE_API_KEY=your_ocr_space_api_key_here
    NEXT_PUBLIC_APP_URL=http://localhost:3000
  4. Start the development server:

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  5. Open http://localhost:3000 in your browser

Deployment

Vercel

Deploy with Vercel

  1. Click the "Deploy" button above or:

    • Push your code to a GitHub/GitLab/Bitbucket repository
    • Import the repository to Vercel
    • Add your OCR_SPACE_API_KEY to the environment variables
    • Click "Deploy"
  2. Your app will be live at https://your-project-name.vercel.app

Environment Variables

Variable Description Required
OCR_SPACE_API_KEY Your OCR.space API key Yes
NEXT_PUBLIC_APP_URL The base URL of your app (e.g., https://yourapp.vercel.app) Yes
NODE_ENV Environment (development/production) No

License

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

About

SnapText is a modern web application built with React that leverages OCR (Optical Character Recognition) technology to extract text from uploaded images. It features client-side image optimization for efficient processing and a user-friendly interface for seamless text extraction.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published