Show more

the more hardcore lynnesbian fans may note that fedibooks looks rather similar to curious greg (no not :greg:​, i mean cg.lynnesbian.space)

i did take inspiration from that design, which in turn took inspiration from mastodon's web UI. however, i made a few changes, most noticeably to the buttons, to give it its own unique identity. i also decided to go a little bit brutalist (and i really do mean a little bit) by leaving everything with sharp, square edges, flat colours, monotone icons, and so on.

who says programmers can't design frontends? :chloeblob:

Show thread

you may also notice that fedibooks used to be a different project. i've abandoned the old fedibooks and moved to this one instead. in retrospect, the old fedibooks concept was way too ambitious. it was around the time i was considering how to create a simple UI for displaying complex decision trees that i realised i was in too deep.

Show thread

why create fedibooks? (long) 

I've been working on ebooks bots for a long time. My first project, mstdn-ebooks, dates back to October 2018. It's a much less ambitious project than FediBooks, but maintaining and developing it has still been a formidable undertaking. It's changed a lot since the initial version, and has worked very well for a long time.

Using mstdn-ebooks is nowhere near as easy as using FediBooks. There's a long guide you'll need to follow, and you'll have to install some programs like Python and possibly Git to get working. It runs on your own computer, meaning that if you put it into sleep mode, it stops working. Updating it to the latest version is also your responsibility, and the error messages it gives aren't exactly user friendly.

To help with this issue, I decided to create a Patreon where I offered a $2.50 per month tier to host up to three bots for you. I would take care of configuration, maintenance, updating, et cetera. This worked pretty well up until recently.

A new change in Mastodon and Pleroma adds something called authenticated fetches. Reffered to as "authorised mode" by Mastodon, this new feature prevents unauthorised instances and programs from accessing the API. In other words, if instance A blocks instance B, then instance B won't be able to see instance A's public posts anymore. However, this also means mstdn-ebooks can't see your posts. This can be fixed, however, by requesting permission from instance B. So what's the problem?

I would need to ask every single person I run a bot for to click a link I send to them, and then send me back the authentication code they received. This is messy and annoying, and greatly tedious. Furthermore, mstdn-ebooks' code base is starting to show its age (I used to be even worse at programming, believe it or not), and I thought this gave me a good motivation to create a new project.

When FediBooks needs permission from instance B, all you need to do is click "authorise". No copy and pasting codes and sending them in a Patreon DM. This is much cleaner and easier for the end user, which is what this is all about!

FediBooks is one of the biggest projects I've ever taken on, and it's been wonderful working on it. I hope you enjoy it!

Show thread

hmm what if someone tries to make a bot that learns from someone with #NoBot in their profile

Show thread

when you ask me a question like "why pour all this time and energy into creating a free service" the answer always boils down to "i want to make people happy"

that's all there is to it really. my current dream job (not that i'm really capable of working) is a computer science lecturer, because i've seen how dry and boring compsci lectures are and i think i can do better. i want people to learn and have a good time doing it!

if i'm making other people happy, i'm almost always happy! i just need to remember to not let that get in the way of my own health.

Show thread

okay so i think this is what the database is gonna look like

yes this is an ERD what about it

Show thread

i just realised that i actually used a skill i learned at university today

holy shit

university taught me something i used in a real life scenario

Show thread

if you had have told past me that i would get so dedicated to a passion project that i made an ERD for it, i would say "really? fuck"

Show thread

hmm i could either work on more frontend stuff or try to convert this ERD into SQL

i might work on the SQL stuff since it's been a while :bunrainbow:

Show thread

known issue: fedibooks will stop working after 4,294,967,295 people connect their accounts

Show thread

looking over this SQL is writing is making me feel very Powerful

i could change fedibooks to only allow one user per instance and all it would take is a single word

i could cause privacy issues and wasted disk space by just deleting one rule

i could change a single column's data type and break pleroma compatibility

Show thread

i actually kinda like working with databases, i just don't like database theory

Show thread

i fixed up some of the issues with the entity relationship diagram and it's looking pretty solid now :chloeblob:

Show thread

fedibooks can store (2^64)-1 posts

that is a lot of posts!!

i'd probably run out of disk space before getting anywhere near running out of post IDs :blobbun:

Show thread

a difficult thing to determine is how high should i set the post length limit

my instance has it set to 65535 to ensure i never run into issues, masto defaults to 500, pleroma defaults to 5000

i guess this is supposed to be a microblogging platform so it doesn't make too much sense to allow them to be overly large, and that does technically expose me to some jerk filling my DB with posts that are gigabytes long

65535 it is :blobbuncoffee2:

Show thread

the frontend stuff is getting along well

as for the backend stuff, well, there's more SQL than python, and i haven't even hit 100 lines yet, so

Show thread

okay, the frontend stuff is getting close to being ready. when fedibooks first goes live, some features won't be ready yet. the basic stuff will all work just fine, though!

the backend stuff is gonna be a lot harder than the frontend, but i'll hopefully have it done before too long!

Show thread

also worth noting: the whole site works without javascript :blobcatfingerguns:

there are a few features that will require it, but so far it's 100% JS free

which is nice because i'm bad at JS

Show thread

i like javascript and i think it's important, but i also like avoiding it where possible to make everything as lightweight as possible

Show thread

what do you typically call the "@user@instan.ce" thing? i call it a handle

Show thread

one of the best parts of webdev is having to implement input validation on both the client and the server

Show thread

hmm i wonder how i implemented input sanitisation in my last project

...oh! i didn't!

well time to shut cg.lynnesbian.space down forever

Show thread

wait a minute never mind i overreacted it DOES sanitise inputs

phewwwwwwww

Show thread

okay curious greg is back up so you can use it again now

even though it's really buggy and shit

Show thread

the bot creation process is done now. it doesn't handle errors gracefully yet, but apart from that, it's ready!

this means you can now create a bot with fedibooks 0u0

now for the learning from posts part :blobbun:

Show thread

things are coming along very well! you can create a bot and add accounts for it to learn from. there's a few basic things left, and then it's on to the actual ebooks stuff - downloading and making posts!!

Show thread
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!