Best Tech Stack for a Web-Based Document OCR System?

February 7, 2026 3 answers
Asked by wheat-free weekend
I'm in the process of designing a web-based OCR system that will handle document uploads and manage OCR results. I need to set up the frontend, backend, database, and deployment environment. There will be two types of users: general users who upload documents and view the OCR results, and admins who will manage users and documents. I'm dealing with five types of documents, where two have different layouts requiring OCR for specific details like names and document types, while another follows a two-column key-value format (e.g., 'First Name: John') that should allow manual corrections of OCR results. I'm leaning towards using React.js with shadcn/ui for the frontend, as I'm most familiar with that. For the backend, I'm considering FastAPI for handling file uploads, authentication, and OCR processing, potentially using PaddleOCR. I have a few questions: Is React.js with shadcn/ui a suitable choice, or does Next.js offer distinct advantages? Is FastAPI good for an OCR-heavy workflow? Are there any known issues with deploying Next.js or React alongside FastAPI? And what database would be best for storing user info, document metadata, OCR results, and any corrections? I want to avoid any architectural mistakes that could hinder scaling or deployment. Thanks!

Answers

citron.pith
Just a heads up from my recent experience with OCR: large language models (LLMs) can be surprisingly effective for this. They have shown excellent performance, even on sometimes difficult text.

slantwise: What LLM did you use for your project? Did you need to fine-tune it?

Reply to this answer
!agar4pct
I've worked on several OCR projects for clients using AWS Textract. I typically upload documents to S3 buckets for processing. It streamlines things and takes care of some heavy lifting for you.

+!watercolor wash~: Did you have to fine-tune or train the model for specific documents?

Reply to this answer
+out for errands!
FastAPI is a great fit for your situation. One thing I'd recommend is looking into layout-aware models for handling key-value documents. For instance, PaddleOCR's PP-Structure module can extract table or key-value data effectively. As for the database, PostgreSQL with JSONB fields could work very well. You can store the raw OCR results as JSONB next to the corrected data, allowing for easy tracking of changes and retraining later if needed. Regarding React or Next.js, since youโ€™re using FastAPI as your backend, sticking with React and shadcn/ui might simplify things. Next.js could introduce unnecessary complexity with its own routing, which may conflict with FastAPI. On a deployment note, keep in mind that OCR models consume a lot of memory, so consider running your OCR processes in separate containers to avoid blocking your FastAPI responses.

wheat-free weekend: Thanks for the tips! I actually plan to integrate Redis and Celery for managing the OCR requests.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions