from ScutterShadow419@lemmy.world to selfhosted@lemmy.world on 22 Jun 01:00
https://lemmy.world/post/48473944
RedMemo — a self-hosted Reddit front-end (Redlib’s UI, Go back end) that archives what it serves, so it keeps working when Reddit doesn’t.
Repo (Go + Postgres, AGPL-3.0): github.com/Meeks233/Redmemo
Live demo (/settings is TOTP-gated, treat as read-only): redmemo.meekslab.cc
Reddit`s funking constraints. Reddit caps each OAuth identity at ~100 API requests per 10 minutes, and IP-bans addresses that push too hard. The one mercy: media (images/video) is served from a CDN and doesn’t count against that quota — only the JSON posts/listing/comment calls do.
Why Redlib runs out. Stateless and unauthenticated — every page view is a fresh upstream hit with nothing kept. Each request pulls only a handful of posts, so the 100-call budget drains in minutes, and there’s no outbound rate limiting to pace it. Worse, it still ships a 2023-era official-app fingerprint; against an unchanged, years-old fingerprint, who else would Reddit block first?
Why RedMemo lasts. I supercharged everything.
- HR outbound rate-limit — Main gate for your poor API credits, sync with the dynamic ring at the topbar, which could help you easily estimate remaing credits.
- Control — 100 users rush to your instance, eveyone just clicks one link and your instance is completely disabled for 10mins…? Why couldn`t I just lockdown my instance and leave room for NP ? You can disable upstream service completely at env/settings. (env will persist)
- 5-layer NP (Natural Prefetch) — L1: main cycle (Pull 100 posts at once) , L2: media, L3: comments, L4 sub icon, L5 audio remux(under construction). I try my best to mimic real human behaviour and disperse those requests, so Redmemo just looks like a real user to Reddit.
- Archive — Reddit cant hack your homelab or vps to erase your records at Postgresql. What NP gets will come here and ready to serve.
- Scored cache — You could define cache size (like 1G at env), large and small media are run through a scoring function (LRU+Size) ; eviction is an incremental, low-IO sweep that drops the lowest-value items.
- Fresh fingerprint — Use the TLS fingerprint from reverse-engineering the official client and auto-derive the User-Agent from Reddit’s official-app release cadence, so it never goes stale. (However Android version is now pinned to 15)
It’s a derivative of Redlib/Libreddit, AGPL-3.0, not affiliated with Reddit.
To be honset, I used a lot of AI — Claude Code (4.6 through 4.8). But core codes were reviewed. The designs (NP, HR, the scored cache) are mine. If you could write better code, we will be very glad to see a new project inheriting from Redlib. Our beloved Redlib just lacks maintenance for almost 3 years, I just try to prolong its life. Anyway I`m just a college student using as much spare time as possible in the last 2 months just try to do something for community…😥
#selfhosted
threaded - newest
So as in slop?
Five layers of NP (Natural Prefetch), HR (the outbound rate-limit layer) and the caching/failover stack aren’t boilerplate — they’re original designs I built from scratch. The first demo did come together fast, sure, but what you don’t see behind it is two-plus months of testing, reverse-engineering how Reddit actually behaves, hunting down bugs, iterating, and writing a real test suite.
One concrete example: I wrote the cache-eviction logic myself. Small and large files are each run through a scoring function, and every cleanup pass consults that score to decide what to drop — done as a non-IO-intensive, incremental sweep instead of a blocking purge. That’s not something a one-shot prompt hands you; it came out of actually watching the thing misbehave under load and tuning it until it didn’t.
If you want to dig in, the commit history and the test suite are right there in the repo — happy to walk through any part of the design.
slop slop slop
Honestly I like the idea of your project but the writing style of your post is very grating.
That’s because it’s written by Claude, an LLM. It’s trained on corporate bullshit. The author seems to be a proper software engineer assisted by Claude Code which is OK in my book. They seem to be Chinese and translate everything into English with AI. Since I can’t read Chinese I can’t tell you whether the Chinese readme is also generated:
I wouldn’t call this project slop, as it clearly has a human touch and not completely written by AI it seems from a first glance at the code, but that’s the reason the writing sounds so “grating”: Chinese person feeding an LLM with idioms not present in English language.
Thx for that, I could write my own words anyway, I just thought it would be more native if I use cluade to translate … sorry for those grating words
Just so you know in the future it’d probably be better to write your post in chinese and then use deepl to translate it if you can’t write a good text in english. Might end up a tad stilted but people here would like it a lot more, since the text AI generates in english is both artificial (nobody talks like that) and annoying to read.
Hell, I’d love to see them try their hand at an explanation before the AI text vomit. As long as it’s mostly readable, I’d rather it be a bit stilted but honest rather than this crap.
Honest question: What would be the difference? DeepL uses AI language models and machine learning models for translation. I guess there would be a lack of em dashes so the text doesn’t offend delicate sensibilities.
Your demo instance seems unable to open any other subs.
Also it redirects to an archive path which is not how redlib works and makes me question how the sesmless response regardless of state is supposed to work.
Once it dumps me in the archive for whatever reason, don’t I have to go back manually? (Not that even seems possible right now)
Thats the designed behaviour, because expose your instance at public network and welcome anyone to open anything might quickly exhaust your poor oauth tokens’ use credits, which are just around 100 API requests per 10 mins.
So there is a main switch called “Disable upstream requests”, let that cloud svg besides searchbox to be grey and save your credits for NP archiving.
Anyway, if you host your own instance at homelab and turn that switch off, every sub is normal and free to browse.
Can you edit your post to be shorter and more concise and add an AI disclaimer about how much of your project is done with AI and in which capacity you use LLMs to write it?
the idea sounds interesting and its also similar to what ive considered making some time ago. but why tf did you mess it up with this ai slop wall of text? heck, i’d even understand if you used LLMs in the code due to lack of skills, i’m also not a good programmer and i’m sympathetic. but there’s really no reason for having this entire post written by an LLM.
it seems like their first language is chinese, and they can’t write well in english
Did you, though?
(Edit to add)
Okay, that was mean of me, I’m a little sorry. This is actually a really good idea, I’ve often been frustrated when using Redlib. But people have got to stop using LLMs to do this stuff! Use your own brain!
I understand that English isn’t your first language, and people can be jerks to anyone whose English isn’t perfect online. But when you reply to people with that distinctive LLM cadence, it comes across as disrespectful; what people think is, “Oh, you don’t even care enough to write your own response.”
If you reply using your own words, and explain that you’re still learning English, that helps a lot. Anyone who’s still rude to you after that, they never wanted to be helpful in the first place.
I hate that this is a necessary question now.