-
byMicropub is going to be a larger task than anticipated. As such I think I'll roll it out incrementally, expanding the capabilities of the micropub endpoint as Tanzawa can support them natively.
Today I managed to get my first post from Quill to Tanzawa!A first post to Tanzawa originating outside of Tanzawa! -
byAdded support for verifying and revoking tokens. One thing I like about API development vs regular page/form development is the inputs and outputs are clearly defined. You don't need to worry about things like layout or looks. It's either valid or it's not.
-
byWith the basic indie auth login flow working, the next couple of days will be dedicated of fully fleshing out apis to support revoking tokens (e.g. on logout ) and checking token validity.Β I added basic tests for the authentication -> access token call today, so I can be confident that while I make these changes, I won't break anything.
I also added Bearer token based authentication today, which I've plugged into my micropub endpoint stub. My goal is to have the full indieauth/micropub api ready for release by Friday, at least on a basic level.
Importing data from OwnYourSwarm like I want will require a few more models and planning because posts will need to support geo-coordinates and so forth. -
byWoohoo! First successful IndieAuth login with Tanzawa.Β πππ»
Tanzawa logged in to OwnYourSwarm -
byI got the IndieAuth authorization api working. Initially I had built it out using the rest_framework.authtoken. However I realized their models only allow one token per user.Β This would make integrating with multiple clients impossible, so I'm opting to generate / manage tokens myself.
I can almost complete a sign in with OwnYourSwarm. I think my token endpoint response is wrong, which is preventing it from completing. Hopefully tomorrow I can get the complete signin working so I can move on to the micropub endpoint.
I feel like I'm starting to break small bits here and there inadvertently . So perhaps before building out the micropub endpoint and potentially breaking more things, I should take a step back and start adding some unit tests for my apis. It'll cost me a day today, but save me days of headaches over the course of the project. -
byGot the start of the indieauth authorization flow working and the base models setup.
Indieauth auth screen -
byJust a small update today. I shipped the login screen I shared yesterday and planned out what I need to build to support IndieAuth. I think I can use DRF to help handle token generation and authentication using the token.
-
byWith webmentions working, next up I want to tackle support for check-ins. Currently I'm using OwnYourSwarm to backfeed my checkins to my main site and I'd like to continue doing so with Tanzawa.
Doing so requires that I add support for IndieAuth (so I can login using just my domain) and Micropub. I'm starting on the IndieAuth implementation, which means I need to actually start with a login page for users to authenticate (thus far I've been using the django admin).
This is what it's looking like so far. Something feels off in the design of it, but I can't quite place my finger on what it is.The base login form -
byYesterday when I shipped sending webmentions I ran into an error that didn't occur in development. Posting the webmention would work, but my response would timeout when trying to save content.
When updating a post you're supposed to send webmentions, update your content, then send webmentions again. As I'm trying to keep server requirements as simple as possible I'm doing all of the sending inline.
Looking at my logs what appeared to be happening was everything would just lock, then once my timeout occurred, I'd see my initial post request to Tanzawa come through, the timeout, and then Wordpress making a request to Tanzawa to retrieve it's mention.
This was happening because gunicorn only has 2 workers by default, which wasn't enough to handle processing a long request simultaneously with an incoming request. Increasing the workers from 2 to 4 solved the issue. -
byToday marks 1 month since I got the first instance of Tanzawa live. π
Today I shipped support for sending webmentions. So now when I link to a post, Tanzawa will send webmentions. It's all done inline, so there's now a slow-down when saving. I should do it in the background, but I'm not sure I want to introduce redis/celery and all that complexity quite yet (or ever?).A webmention from Tanzawa
I have a table you can view in the admin where you can see which posts sent which webmentions and if they were successful or not.
I also shipped a small update to webmention receiving. When an existing webmention is updated, I now also update how the webmention is displayed. In the case of an update, the comment must be re-moderated.
The final small "quality-of-life" update is when I save a post I now show a link in the success message to view the post.Small quality of life update