Document Scanner Application
A simple document scanning application with Go backend and HTML/JavaScript frontend.
Project Structure
scanner/
├── backend/ # Go backend
│ └── main.go # Main Go server file
└── frontend/ # Frontend
└── index.html # Main HTML file
Getting Started
Prerequisites
- Go 1.16+ installed
Backend Setup
-
Navigate to the backend directory:
cd backend -
Run the Go server:
go run main.goThe server will start on port 8080.
Frontend Setup
- Simply open the
frontend/index.htmlfile in a web browser.
API Endpoints
The backend provides the following endpoints:
POST /scan/start: Starts a new scanning sessionPOST /scan/abort: Aborts the current scanning sessionGET /documents: Returns documents from the current session
Usage
- Open the frontend in your browser
- Click "Start Scanning" to begin scanning documents
- The documents will appear in the grid below as they are scanned
- Click "Abort Scanning" to stop the process at any time
- Click "Refresh Documents" to manually refresh the document list
Notes
This is a simplified simulation of document scanning. In a real-world application, you would need to:
- Integrate with actual scanning hardware
- Implement proper error handling
- Add authentication and security
- Add persistent storage for documents
Description
Languages
HTML
60.4%
Go
37.3%
Dockerfile
2.3%