Please, turn your phone in landscape mode
Reddinx: A reddit indexer
Β Search your favorite subreddit with Algolia
Who am I?
Tim Carry
Full-Stack Engineer at
Previously at
@
pixelastic
Tim Carry

Used to work here

Actually, used to co-organize this event, so very happy to be able to be part of it again

I also love to gather a bunch of friends, sit around and play Dungeons & Dragons

As the gamemaster, I like to create stories to engage my players

Have them in fantastic locations, like in a flying city, in the heart of a volcano or a haunted manor

Great way to spark the imagination is to have a map to share

reddit.com/r/dndmaps πŸ’Ž
Free
Updated daily
Amateur and pro quality
Great source of inspiration
reddit.com/search πŸ’©
Slow
No typo tolerance
Frustrating to use
Visually cluttered results
api.reddit.com πŸ€–
api.reddit.com/api/info/
?
id
=
t3_
hvjxtn
{ "id": "hvjxtn", "title": "Dragonship - A living forest dragon pirate ship - Made in Inkarnate - 44 x 33", "permalink": "/r/dndmaps/comments/hvjxtn/dragonship_a_living_forest_dragon_pirate_ship/", "thumbnail": "https://b.thumbs.redditmedia.com/9psU-VI15Vf2AnWG6cJ5SA6djUKoPY4a_IlYo09_9MU.jpg", "created": 1595408294.0, "score": 116, "subreddit": "dndmaps", "author": "crashgem", "ups": 116, }
Β 
πŸ’Ž
Great data
-
πŸ’©
Crappy Search
+
πŸ€–
Available API
=
πŸ”Ž
Algolia Project
3 major steps
Fetching the
initial
data
Keeping data
fresh
Building the
search UI
1. Fetching the initial data
api.reddit.com
Details of a post
History of a subreddit
api.pushshift.io
Details of a post
History of a subreddit
data β”œβ”€β”€ 2017 β”‚Β Β  β”œβ”€β”€ 01 β”‚Β Β  β”œβ”€β”€ 02 β”‚Β Β  β”œβ”€β”€ 03 β”‚ β”‚ β”œβ”€β”€ t3_6a0f2s.json β”‚ β”‚ β”œβ”€β”€ t3_6a0o4n.json β”‚ β”‚ β”œβ”€β”€ t3_6a7au5.json β”‚ β”‚ β”œβ”€β”€ t3_6aex01.json β”‚ β”‚ β”œβ”€β”€ t3_6aype2.json β”‚ β”‚ β”œβ”€β”€ t3_6azfnv.json β”‚ β”‚ β”œβ”€β”€ t3_6b6zev.json β”‚ β”‚ β”œβ”€β”€ t3_6bbdis.json β”‚ β”‚ └── t3_6bj0y9.json β”‚Β Β  β”œβ”€β”€ 04 β”‚Β Β  β”œβ”€β”€ 05 β”‚Β Β  β”œβ”€β”€ 06 β”‚Β Β  β”œβ”€β”€ 07 β”‚Β Β  β”œβ”€β”€ 08 β”‚Β Β  β”œβ”€β”€ 09 β”‚Β Β  β”œβ”€β”€ 10 β”‚Β Β  β”œβ”€β”€ 11 β”‚Β Β  └── 12 β”œβ”€β”€ 2018 β”‚Β Β  β”œβ”€β”€ 01 β”‚Β Β  β”œβ”€β”€ 02 β”‚Β Β  β”œβ”€β”€ 03 β”‚Β Β  β”œβ”€β”€ 04 β”‚Β Β  β”œβ”€β”€ 05
{ "id": "t3_hvjxtn", "title": "Dragonship - A living forest dragon pirate ship - Made in Inkarnate - 44 x 33", "url": "https://www.reddit.com/r/dndmaps/comments/hvjxtn/dragonship_a_living_forest_dragon_pirate_ship/", "author": { "id": "t2_c5ezw", "name": "crashgem" }, "picture": { "full": "https://preview.redd.it/42epgdrp4bc51.jpg?auto=webp&s=515cbdf60a128fbfae0e7c191b60e2b737988a92", "preview": "https://preview.redd.it/42epgdrp4bc51.jpg?width=640&crop=smart&auto=webp&s=cf1bb269ef5c065da05242b79bc263a4d00553e8", "thumbnail": "https://b.thumbs.redditmedia.com/9psU-VI15Vf2AnWG6cJ5SA6djUKoPY4a_IlYo09_9MU.jpg" }, "score": { "comments": 4, "downs": 0, "ratio": 1, "ups": 110, "value": 110 }, "tags": ["Vessel"], }
2. Keeping data fresh
Frequency
How often do you want to update the data?
Every day
Quantity
How far back do you want to update the data?
Up to 7 days
3. Building the Search UI
Infinite scroll
Masonry effect
3. Building the Search UI: Infinite Scroll
// Javascript
widgets.infiniteHits()
IntersectionObserver()
3. Building the Search UI: Masonry effect
/* CSS */
grid-auto-rows: 10px
grid-row-end: span
???
// Javascript
onHeightChange()
Open-Source
// Load it as an npm module const reddinx = require('reddinx'); // Pick any subreddit const subredditName = 'dndmaps'; // Fetch initial data await reddinx.initial(subredditName); // Keep data fresh await reddinx.incremental(subredditName);