Skip to content

quintushr/book-library

Repository files navigation

📚 Book Scanner

A modern, responsive web application for scanning book barcodes, retrieving book information, and building your personal library.

Book Scanner App

✨ Features

  • Barcode Scanning: Scan book barcodes using your device's camera
  • Book Information: Retrieve detailed book information from Google Books API
  • Personal Library: Save books to your personal library
  • Responsive Design: Works on desktop, tablet, and mobile devices
  • Modern UI: Clean, minimalist interface with Tailwind CSS

🛠️ Technologies

🚀 Getting Started

Prerequisites

  • Node.js (v16 or later)
  • npm or yarn
  • Appwrite account

Setup Appwrite

  1. Create an Appwrite project
  2. Create a database
  3. Create a collection with the following attributes:
    • title (string)
    • authors (string[])
    • description (string)
    • publishedDate (string)
    • thumbnail (string)
    • isbn (string)
  4. Set appropriate read/write permissions for your collection

Environment Variables

Create a .env file in the root directory with the following variables:

NUXT_PUBLIC_APPWRITE_PROJECT_ID=your-project-id
NUXT_PUBLIC_APPWRITE_DATABASE_ID=your-database-id
NUXT_PUBLIC_APPWRITE_COLLECTION_ID=your-collection-id

Installation

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

📱 Usage

  1. Allow camera access when prompted
  2. Position a book's barcode within the camera view
  3. Once scanned, book information will be displayed
  4. Click "Add to Library" to save the book to your personal collection
  5. View all your saved books in the "My Library" section

🚀 Deployment

Deploying with Nixpacks

This project is configured to be deployed using Nixpacks, which automatically creates optimized Docker images.

  1. Make sure you have Nixpacks installed:

    curl -sSL https://nixpacks.com/install.sh | bash
  2. Build your application with Nixpacks:

    nixpacks build . --name book-scanner
  3. Run the built image:

    docker run -p 3000:3000 book-scanner

Environment Variables for Production

Make sure to set the following environment variables in your production environment:

NODE_ENV=production
NUXT_PUBLIC_APPWRITE_PROJECT_ID=your-project-id
NUXT_PUBLIC_APPWRITE_DATABASE_ID=your-database-id
NUXT_PUBLIC_APPWRITE_COLLECTION_ID=your-collection-id

📝 License

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

🙏 Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published