This project is a Go HTTP server that hosts an HTMX-based frontend for uploading PDF files and extracting invoice data using the Mindee API with the https://github.com/altafino/mindee-client package.
- Upload PDF invoices
- Extract data using Mindee API
- Display extracted data in a Tailwind CSS styled HTML page
- Go 1.21 or later
- Mindee API key
-
Clone the repository:
git clone https://github.com/altafino/testpdf.git cd testpdf -
Install dependencies:
go mod tidy -
Create a
.envfile in the project root and add your Mindee API key:MINDEE_API_KEY=your_api_key_here
-
Start the server:
go run main.go -
Open a web browser and navigate to
http://localhost:8080 -
Upload a PDF invoice and view the extracted data
main.go: Contains the main server logic and API endpointstemplates/index.html: The main page HTML templatetemplates/result.html: The result page HTML template displaying extracted data
- Go
- HTMX
- Tailwind CSS
- Mindee API
- altafino/mindee-client
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.