Skip to content

Evian-Chen/second-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

second-reader

This is a second-hand book matching platform.

Tech Stack

  • Vue.js
  • ASP.NET
  • MSSQL
  • OCR (Tesseract)

Backend

set up

  1. install dependencies
dotnet restore
  1. activate service
dotnet watch run
  1. open swagger

visit the following url

https://second-reader.onrender.com/swagger/index.html

or if the local server isactivated, visit

http://localhost:5078/swagger/index.html

during Production, use a string (i.e. user_dev_001) as the bearer to test authorized endpoint

  1. prepare database

see ConnectionStrings in appsetting.json

OCR: Tesseract

  1. build and check output
cd /backend
dotnet build

then go to backend/bin/Debug/net8.0/tessdata/ to check if chi_tra.traineddata and eng.traineddata exist.

use the following path if needed:

var tessdataPath = Path.Combine(AppContext.BaseDirectory, "tessdata");
  1. test Tessetact

add images to test_images folder, and change the file name in program.cs where imagePath is defined

then run

dotnet watch run

the extracted text should be printed on the console

  1. test the endpoint

/api/books/isbn use OCR to extract ISBN of the uploaded image and call Google Books API to get the book information

when testing this endpoint, take the picture of the ISBN from the inside page. images of ISBN from inside page has a higher success rate than the one next to the barcode

Frontend

install dependencies

npm install
npm run dev

then visit: http://localhost:5173/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •