a grimy little media feed app for reddit where you pick your subs, scroll forever, save what you like.
built with next.js + react + typescript, all client-side.
- pulls media posts from
old.reddit.com/r/<subs>using your selected sort + filters - supports images, videos, and gallery posts (with prev/next nav in modal)
- infinite scroll feed with swr pagination
- lets you save favorites and view them on
/favorites - lets you manage subs and sub templates on
/settings - persists your settings/data locally (zustand + persist middleware)
- supports theme switching (
dark,light,oled) - supports import/export for full app data and template-only backups
/main feed/settingssubs, templates, filters, playback, display, feed, backup controls/favoritessaved posts grid
pnpm install
pnpm devthen open http://localhost:3000.
Reddit's public JSON endpoints need a logged-in session, and a browser will not send that session cookie to a page on a different origin. The app therefore reads Reddit through a small local Chrome extension that performs the request with your own session.
- Load the
extension/folder as an unpacked extension (chrome://extensions, enable Developer mode). - Copy its ID, then set Data Source to
BRIDGE EXTENSIONand paste the ID on/settings. - Click TEST CONNECTION.
The extension allows localhost, 127.0.0.1 and gripsession.vercel.app, so it
works against both the dev server and the deployment. See
extension/README.md for the message API, for adding
another origin, and for troubleshooting. JSONP (ANONYMOUS) remains selectable
for logged-out browsing, but Reddit will reject most requests on it.
pnpm devstart dev serverpnpm buildproduction buildpnpm startrun production buildpnpm lintrun eslint
global store is in src/lib/store.ts:
persisted slices:
- favorites
- subs
- templates
- settings
- viewed items
- fetcher lives in
src/lib/parsers/reddit.ts - uses
old.reddit.comjson listings (hot,new,top) - transport depends on
settings.dataSource: the bridge extension or anonymous JSONP - applies media filters before items hit the UI
- skips unsupported links and malformed posts instead of crashing the whole page
- failures are thrown as
FeedErrorwith a code, so the feed can name the cause (missing extension, not logged in, rate limited) instead of a generic error - reddit can rate-limit (
429), so the UI retries a bit and then shows an error state
- this app is client-rendered and currently only wired to reddit as a source.
- the bridge extension must be reloaded after any change to
extension/. - if all subs are disabled/removed, home feed will be empty until you enable/add some.
- import/export expects json produced by this app.
- installable on android chrome, ios safari (add to home screen), and desktop chromium.
- service worker caches app shell + recently viewed feed/media for read-only offline use.
- offline fallback route is available at
/offline. - in development, service workers are automatically unregistered to avoid stale caches.