Skip to content

addyosmani/scan

Repository files navigation

πŸ“„ Scan

A modern, web-based document scanner built with React. Scan documents using your device's camera or upload existing images, process them for clarity, and convert them to PDF format.

✨ Features

  • πŸ“± Mobile-optimized interface
  • πŸ“Έ Capture documents using device camera
  • πŸ“€ Upload existing images
  • βœ‚οΈ Smart document cropping
  • πŸ”„ Portrait and landscape orientation support
  • πŸ“‘ Multi-page document support
  • πŸ” Image enhancement and processing
  • πŸ“‹ Page reordering capabilities
  • πŸ”Ž Full-screen preview mode
  • πŸ“ Export to PDF

πŸš€ Getting Started

Prerequisites

  • Node.js 18 or higher
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/addyosmani/scan.git
cd scan
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev

πŸ› οΈ Tech Stack

  • React - UI framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • Vite - Build tool
  • react-webcam - Camera access
  • react-easy-crop - Image cropping
  • jsPDF - PDF generation
  • Lucide React - Icons

πŸ“± Usage

  1. Capture or Upload

    • Click "Take Photo" to use your device's camera
    • Click "Upload Image" to select an existing image
  2. Crop and Adjust

    • Use the cropping tool to select the document area
    • Toggle between portrait and landscape orientation
    • Confirm or cancel the crop
  3. Manage Pages

    • Add multiple pages to create a multi-page document
    • Reorder pages using the arrow buttons
    • Preview pages in full screen
    • Delete unwanted pages
  4. Export

    • Click "Download PDF" to generate and download your document
    • Use "Reset" to start over

🀝 Contributing

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

  1. Fork the project
  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.

πŸ™ Acknowledgments

πŸ“§ Contact

Addy Osmani - @addyosmani

Project Link: https://github.com/addyosmani/scan