rayriffy-h
rayriffy-h copied to clipboard
how mangas uploaded/fetched
hello there, it's really amazing build and kudos to all the devs!
could anyone explain how mangas are fetched if it's build that way? or does it just pull it from a db?
In frontend, calling for data is handled by @rayriffy-h/fetch
(lib) exactly here which will make request to backend https://github.com/rayriffy/rayriffy-h/blob/252c4f02c06bf651df16d91bea3ae529f6ec75d5/apps/web-next/src/pages/g/%5Bid%5D.tsx#L55
The backend will return result from NH itself here. I'm doing this because NH API is quite unstable and have a chance that request may fail, plus I don't want to DDoS them as well. So, the solution is to make a some kind of reverse proxy and then gallery will be cached means when frontend calls for same gallery, result will return faster and not going to DDoS NH as well. tl;dr Edge Caching https://github.com/rayriffy/rayriffy-h/blob/252c4f02c06bf651df16d91bea3ae529f6ec75d5/apps/api/src/routes/v1/api/gallery/services/index.ts#L22