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.
- 🖼️ 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
- Frontend: Next.js 14, React 19, TypeScript, Tailwind CSS
- UI Components: Radix UI, shadcn/ui
- OCR: OCR.space API
- Deployment: Vercel
- Node.js 18+ and npm/yarn/pnpm
- OCR.space API key (get it from OCR.space)
-
Clone the repository
git clone https://github.com/yourusername/snaptext.git cd snaptext -
Install dependencies
npm install # or yarn # or pnpm install
-
Create a
.env.localfile and add your environment variables:OCR_SPACE_API_KEY=your_ocr_space_api_key_here NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Start the development server:
npm run dev # or yarn dev # or pnpm dev
-
Open http://localhost:3000 in your browser
-
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_KEYto the environment variables - Click "Deploy"
-
Your app will be live at
https://your-project-name.vercel.app
| 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 |
This project is licensed under the MIT License - see the LICENSE file for details.