Previous Post

Futureporn March 2023 Update

Next Post
no preview
DESCRIPTION

If there's one thing I've learned from web development, It's that there are no easy jobs.

The idea for Futureporn was simple enough. Capture vods, save vods, serve vods. It's only three easy steps!

It works, but Futureporn is so slow. It's one of the longest open issues on my issue tracker and I've decided enough is enough. I think everyone who is generous enough to support the site deserves priority service. I want to drastically increase the streaming speed for them, so Futureporn isn't just an archive site, it's also the best VTuber hentai site in the galaxy.

I think I just came up with Futureporn's mission statement.

The best VTuber hentai site in the galaxy

Work-in-progress. Definitely. To be the best, I think the site needs all the VTuber models, not just Melody. But that is not the priority right now. Right now, I'm focused on creating reliable, automatic, speedy tech that makes expansion easy. And features. Futureporn lacks features that can really set it apart from the average video sharing site. More on features later.

The most exciting thing I've implemented this month is in pursuit of an upcoming patron-only IPFS gateway. I needed a way for viewers to be able to log in and prove that they are Patrons. I looked around, thought about creating a from-scratch integration. I asked ChatGPT what it thought of the problem of adding auth to an IPFS gateway, and it suggested some code which I later realized came from a Caddy plugin.

Caddyserver is a file server that's been all the rage lately. It's far simpler to operate Caddy than it is to operate some of the more popularly entrenched fileserver software out there.

Caddyserver has automatic SSL, which I'm super grateful for. In the past when I needed to host a website, I'd have to manually go through the multi-step process of generating a SSL certificate through a service such as LetsEncrypt. The certs would have to be downloaded, copied to the correct folder, and then manually renewed on a regular basis.

Caddyserver just takes care of that and I really love it. Also Caddy's config files are some of the most intuitive... This sounds like an ad for Caddyserver but I swear it's not LUL. I would love to be sponsored by a great tech stack though, that would really help me out!

Anyway, Caddyserver has a community plugin called caddy-security, a.k.a. authp. I took a look through that plugin's documentation and saw that they had OAuth support for many major providers like Google, Discord, Facebook, etc. There was no Patreon support, but I realized that there was easy generic OAuth integration. Perfect for what I needed!

Or so I thought.. I quickly realized that the generic OAuth support was insufficient for Patreon support. It lacked the ability to call Patreon's API in the very specific way that Patreon requires. I was reminded that there are no easy jobs.

That didn't stop me though. An authserver that pairs nicely with Caddyserver was my ideal solution, so I blazed forward and dug into caddy-security's source code.

This was my first time working with Golang and I was really confused by the syntax I was seeing. I'm most familiar with Javascript and Go was not that. Luckily, I have a really good pair programmer, ChatGPT, and I was able to ask it questions, copy-paste blocks of code and have it explain what the hecc the code was doing.

I'm really impressed by ChatGPT. It knows everything! I believe Tom Scott when he says AI going to change the world. I'm already developing the habit of consulting ChatGPT instead of searching DDG. In many cases, ChatGPT gives me just what I need.

With ChatGPT's help, I implemented first-class Patreon support in caddy-security. I'm proud of the work I did and I'm going to be contributing the code to the caddy-security project. I think it can help other creators out there who already use Caddyserver and want to put a paywall in front of their downloadable content.

Man.. this reminds me of the headlines I read a few years back about how Open Source has a funding problem. Why pay when you can get it for free? As a self-employed dev I feel this. One more reason to be grateful for Patreon!

I had a working prototype in a few days and I've been working on the final piece of the puzzle... frontend integration. This is proving very difficult, as there are so many moving parts in Futureporn's frontend setup.

I recently switched to Slinkity, a software package which gracefully combines Vite and Eleventy (11ty.) Vite is a software package that gracefully combines a development server with Rollup. Rollup is a software package that... Nevermind.. this rabbit hole probably doesn't end 😆

With the introduction of the patron-only IPFS gateway, I need a way for the video player to point to that IPFS gateway instead of the public IPFS gateway, ipfs.io. My solution is to use javascript to switch the src property of the video player on demand.

Futher, the next big feature I'm going to be adding to Futureporn is crowd-sourced tags. My idea for the best possible UI is to put tag input in the video player itself as a custom menu overlay. This way, a Futureporn video can be playing full-screen, and tags can be added without interrupting the viewing experience.

I have other ideas for features that can be built into the player itself. Controls for Lovense vibrator playback is one of those ideas.

I chose Slinkity because it's a good way to add React, Preact, Vue, or Svelte support to an 11ty generated site. I've been learning Slinkity's quirks, and fixing some of the things that broke when I migrated to it.

Shoutout to the science team members who reached out and reported the broken API endpoints that I did not catch! I used the downtime as a lesson and I updated status.futureporn.net to track those endpoints so I will know if they break again in the future.

Another thing I worked on recently was a new component to the ever-growing futureporn ecosystem. It's called render.service, and it's job is to find VODs in the database  which are missing a 240p encode. It downloads the VOD using IPFS, encodes a 240p version, creates a thumbnail, adds the 240p encode and thumbnail to IPFS via the cluster API, then it updates the db with the CID of each.

render.service runs slowly and was error prone. It took several iterations to get it to handle all possible errors without crashing. It's now crash resilient and chugging along, catching up on some missing 240p encodes and thumbnails.

Some interesting things I learned from building render.service is that it's not necessary to have a dependency on IPFS kubo in order to programmatically get content from IPFS. It's sufficient to make POST requests to an IPFS daemon and stream the response to disk. Curiously, that response is always in a TAR archive, even if specifically requesting that the content not be in an archive. It's either a documentation bug or a quirk of that API which the developers acknowledged, but probably aren't going to fix. Instead, I think it's suggested to use kubo, or ipget, which automatically handle the necessary untar.

By request of a fellow science team enjoyer, I started a Futureporn Discord server!

https://discord.gg/wrZQnK3M8z

Feel free to join. I am thinking the Discord server will be set up kinda like how ProjektMelody's server is set up-- Anyone who has been a patron at any point in time will have future access to the Discord server. But I don't know how to set that up just yet. It's going to take me some time to figure out.

That reminds me of ChatOps. I've been running a Minetest server for the past five months and one of the best things about it is that I can see what's going on without actually joining the game. I'm doing that using Matterbridge, which synchronizes the in-game chat with my chatroom on Matrix.

I'm dipping into to the concept of administrative tasks like kicking/banning disruptive players based on chat commands I type via Matrix. I think there is opportunity for similar functionality in Futureporn's Discord server. First thing that comes to mind is status updates of various Futureporn system components. For example, when a 240p encode is complete, a message could be automatically posted in a Discord notification channel. Might be useful, might be not. Just thinking aloud at this point.

Taking a step back, I want to list my priorities at the moment.

First is the patron-only IPFS gateway. My hope was to have this gateway ready today, but it is not. I still have to figure out how to seamlessly authenticate viewers via the frontend, persist the authorization for 30 days using a cookie, and switch the selected gateway from ipfs.io to gw.futureporn.net.

There may be no easy jobs, but I love every second of this process.

Speaking of the process! Last month I recall typing a lot about overworking. I've been doing much better at taking time for myself to relax and rest. I've even made morning walks a habit. Rain, snow or shine, I'm out there walking at 8AM and I'm noticing all sorts of things in my neighborhood that I never noticed before. The snow capped mountains in my area are beautiful this time of year, and the way the sun hits the hills really brings out nature's bounty. Mmm, bounty. I think that's a boob joke. 😂

Back on topic! Here are some notes I took during the past 30 days on things I wanted to bring up in this post.

  • feb 2023: switched from webpack to vite/rollup

I did a bunch of frontend tooling switches at the end of Feb. Utter hell lmao. Just kidding, it wasn't too bad, and I learned a lot. A big contributing factor of wanting to get away from Webpack was how much a pain in the ass font-awesome icons are to work with, if I want to use them without javascript. I am passionately opposed to flashes of unstyled content (FOUC) that is incredibly prevalent in the modern web. I think it's gross when I load a page and the font visibly switches to a different font a fraction of a second after it appears, or elements jump around the screen or resize as they finish loading.

I'm nitpicky like that. That reminds me, I had to temporarily use javascript/svg font-awesome, and that introduced a FOUC that I've since fixed in an unreleased patch... Coming soon!

  • feb 2023: migrated patreon.cjs to eleventy data format. no longer requires user intervention and caches responses for 1 day

Right! It was previously a pain in the ass to update patreon data displayed on Futureporn. I would have to run a script that would ask me to log in to patreon, and I'd have to click an OK button every time. Now, it's automatic and it's one step closer to my HumanOps goal.

  • feb 2023: created data/github.cjs which automatically renders Github issues tagged as "Goal" on the goal page. Open issue = incomplete goal. Closed issue = complete goal.
  • feb 2023: created videoSrcHash and video240Hash progress goals on the /goals page which automatically marks itself as completed when at 100%

Another super cool thing that I'm proud of! The list on Futureporn.net/goals is now automated, based on data that gets pulled in from https://github.com/insanity54/futureporn/issues This improvement also puts me closer to reaching my HumanOps goal. https://github.com/insanity54/futureporn/milestone/1

  • feb18 2023: realized video240Hashes were missing. fixed it with a migration script.

A glitch caused by human error during the migration from hacky markdown files to a proper Postgres database. So grateful for that database now!

  • feb 19 2023: realized /api/v1.json was broken, fixed it with rollup config

An oopsie during the migration from vanilla Eleventy to Slinkity. Slinkity discards everything not .html by default. All the .json files had to be added to a whitelist.

  • feb 23 2023: modified patreon data source so only patrons with "Username displayed on Futureporn.net" benefit will be displayed

A patron asked to be removed from the website, and I totally get that. The biggest challenge here was that I didn't want to create a blacklist in the code because the code is open source. Ended up using a blacklist that is ignored by source control.

  • feb 23 2023: added "Sneaky Supporter" tier @25/month and "Stealth Supporter" @3/month which does not have "Username displayed on Futureporn.net" benefit

I think this may need to be reworked again in the future. Maybe appearing on the site will become opt-in, rather than having a bunch of different tiers with privacy-focused benefits. This could be done on the website after a patron logs in with Patreon OAuth. Gotta ponder on this one some more.

  • feb 23 2023: fixed broken/outdated /feed/feed.xml

Another artifact of switching to Slinkity. Got it fixed so my Futureporn feed in fraidyc.at/ works again.

That's all I got for this update. As always, many thanks to my patrons. Futureporn could not exist without you! I'll continue giving this my all, so Futureporn can become the best VTuber hentai site in the galaxy!

@CJ_Clippy PATREON 6 favs
VIEWS1
FILES1 file
POSTEDMar 15, 2023
ARCHIVEDJun 10, 2026