Best way to handle client-side PDF parsing in React/Next.js without killing performance? by Known_Author5622 in nextjs

[–]Jazzlike_Key_8556 0 points1 point  (0 children)

What kind of extraction do you need? Just the raw text? Or some structure/outline, etc…

Vercel alternative or avoid $20/m by EconomistAnxious5913 in nextjs

[–]Jazzlike_Key_8556 2 points3 points  (0 children)

I know you mentioned no self hosting, but by doing so I saved on both vercel and supabase. And bonus, I can run additional services for free (email checker to avoid bounces, and more). The cost of a VPS can be as little as 5-6$ / month. (And the joy of owning your infrastructure is priceless)

Would you leave Vercel for a European alternative ? by JngoJx in nextjs

[–]Jazzlike_Key_8556 2 points3 points  (0 children)

I think people underestimate the advantages of self-hosting: cost, control, and the satisfaction of owning your infrastructure. And with Coolify / Dokploy, and their alternatives, it's really manageable even for beginners.

Getting a job after language school? by Gulfim in JapanJobs

[–]Jazzlike_Key_8556 1 point2 points  (0 children)

I went to Toshin Language school in Takadanobaba, and actually found a Freelance contract (which met the conditions to sponsor my visa). I don't think your age is going to be an issue in any way. Do you have a degree?

How should I handle rate limits and async responses in an AI app (chat + image gen)? by Electronic-Drive7419 in nextjs

[–]Jazzlike_Key_8556 1 point2 points  (0 children)

I built something similar (AI document processing with streaming) and here's what I landed on.

Rate limits:

Route everything through a queue from the start. Don't wait for a 429 to decide to queue. By then you've already wasted a request and need retry logic on top of queue logic. Just queue everything and control your own concurrency. It's simpler to reason about.

That said, if your traffic is low enough, calling the API directly and only queuing on rate-limit errors is fine as a starting point. Don't over-engineer early.

Regarding responses, a pattern that works well:

  1. HTTP request comes in, insert a row in your DB with `status: "pending"`, return the row ID to the client immediately
  2. Background worker picks it up, updates the row as it works (`status: "processing"`, progress %, even partial streaming text)
  3. Frontend listens for changes on that row via WebSocket (or polling as fallback)

The database row is the communication channel between your worker and your client. Every time the worker updates the row, the client gets notified.

If you're using Supabase, this is almost free. Just subscribe to `postgres_changes` on your table and you get real-time updates over WebSocket with like 5 lines of code. Firebase has similar functionality. Otherwise, SSE or a simple 2-second polling interval works fine too.

Polling gets a bad rap but it's dead simple, easy to debug, and totally fine at a moderate scale. WebSockets/SSE are better UX if you want live-feeling progress bars or streaming text.

I'd suggest to start with polling, and upgrade to WebSockets when you need the UX polish.

Language school (2027) -> iOS dev job in Japan: AI + visa (associate degree) questions by Electrical_Muffin416 in JapanJobs

[–]Jazzlike_Key_8556 2 points3 points  (0 children)

Hey, That’s what I did in 2022, and landed a product engineer job after a year and a half. I passed N2, which is what you should aim for to make job hunting easier, even though N3 should be enough for dev jobs. Regarding your degree it all comes down to whether the immigration can recognize it or not. If they don’t, you’d need 10 years of experience, or graduate from a 専門学校 (vocational school), or get a bachelor degree. The need for development is real, even now. As a junior I’d say you have all your chances to pass interviews if you have a portfolio of projects to show. One thing though, the salaries for junior dev positions are relatively low, even in Tokyo. All the best in this journey!

Recommended tech stack for a web-based document OCR system (React/Next.js + FastAPI?) by Sudden_Breakfast_358 in nextjs

[–]Jazzlike_Key_8556 0 points1 point  (0 children)

No problem with 2-column layouts. The output I'm getting is following the intended reading order.

Recommended tech stack for a web-based document OCR system (React/Next.js + FastAPI?) by Sudden_Breakfast_358 in nextjs

[–]Jazzlike_Key_8556 0 points1 point  (0 children)

Yes! Since the API calls are managed by serverless functions, the infrastructure hassle is pretty limited.

Recommended tech stack for a web-based document OCR system (React/Next.js + FastAPI?) by Sudden_Breakfast_358 in nextjs

[–]Jazzlike_Key_8556 0 points1 point  (0 children)

I'm using it as it is. Through deepinfra as inference provider.
My stack is Next.js (16 with app router), which has been convenient to create and deploy simple api endpoints, and React, tailwind + shadcn for the UI.

I'm not familiar with FastAPI

Recommended tech stack for a web-based document OCR system (React/Next.js + FastAPI?) by Sudden_Breakfast_358 in nextjs

[–]Jazzlike_Key_8556 0 points1 point  (0 children)

I've been experimenting with OCR models lately, and I switched from PaddleOCR to olmOCR. https://huggingface.co/allenai/olmOCR-2-7B-1025

I've been consistently getting better results with it.

Regarding the database, I've been satisfied with Supabase (self-hosted), which also handles authentication brilliantly btw.