I AM IMMUTABLE! Blogging with IMIM

I’d like to share the latest incarnation of the IMIM blogging app on Autonomi. IMIM is shorthand for I’M IMmutable, as once your immutable blogs have been uploaded, you cannot be muted! :imp:

I’ll do a proper write up of how it all works, but I wanted to write a brief introduction and let folks have a play with it.


(Blog index with a mixture of media and etag caching)

In short, IMIM is an Angular app, built using Typescript, which expects an sn_httpd backend.

IMIM can read any public archive that you point it at. You don’t need to upload your own service, nor any Javascript or Typescript. You don’t need to worry about anyone leaching your hosting bandwidth. You just point it to your archive address, then let it render your Markdown files, complete with images and videos!

The easiest way to give it a spin is by grabbing the latest sn_httpd docker image (see here), starting a local container and taking a look at my test blog here.

Note that the IMIM app needs to run in /imim/, so it depends on a rudimentary/experimental DNS address. If you use the docker container, this is already setup, so it should resolve automatically.

So, fed up of reading my ancient articles? Why not try creating your own blog? Follow the following steps:

  1. Create a nice article written in Markdown.
  2. Save it to a folder (e.g. myblog), along with any images you’ve used.
  3. Upload the files to Autonomi as a public archive, e.g. ant file upload -p myblog.
  4. Save the address (e.g. 7ca488701eb318c05ecfea806245199f85d7987d5f73f7afea4a68b2437e5285), then use it as your IMIM blog URL, e.g. http://localhost:8080/imim/blog/7ca488701eb318c05ecfea806245199f85d7987d5f73f7afea4a68b2437e5285/.

There will be more to come, but I wanted to share this with everyone, so folks can put up their own blogs.

Feel free to poke around at the source code for my articles (it’s a public archive) for inspiration!

Limitations

  • To have dynamic blogs, they should resolve to a name. As registers aren’t working well and their replacement isn’t published in API form yet, we aren’t quite there yet. Once it is possible, I’ll update the code. Note that sn_httpd does the name resolution, currently.
  • Videos can only be mp4 files and they are slow due to the Autonomi API not directly supporting streaming, currently. However, they do load and you can play them!

If there are any questions, please post them here and I’ll do my best to answer them. I’ll also use this thread to let everyone know when there are new versions.

Links:

26 Likes

Im failing at this but its network errors rather than IMIM errors


Uploading file: "IMIM/mince.md"
Error: 
   0: Failed to upload file
   1: Failed to upload file
   2: Error occurred during payment.
   3: Cost error: MarketPriceError(ContractError(TransportError(Transport(Custom(reqwest::Error { kind: Request, url: "https://sepolia-rollup.arbitrum.io/rpc", source: hyper_util::client::legacy::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Try again" })) })))))
   4: Market price error: ContractError(TransportError(Transport(Custom(reqwest::Error { kind: Request, url: "https://sepolia-rollup.arbitrum.io/rpc", source: hyper_util::client::legacy::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Try again" })) }))))
   5: error sending request for url (https://sepolia-rollup.arbitrum.io/rpc)
   6: error sending request for url (https://sepolia-rollup.arbitrum.io/rpc)
   7: client error (Connect)
   8: dns error: failed to lookup address information: Try again
   9: failed to lookup address information: Try again

I’ll postt this + logs in the Discord support channel

Uploads are definitely a pain right now.

My best tips are:

  • buy a better router (Mikrotik etc)
  • try uploading the files in the directory one by one first, then upload the archive
  • lots of patience and retries…

I’m sure the team are on it, as it’s a pretty big issue.

I may try to add upload support to IMIM and sn_httpd too, but it may have similar issues atm.

5 Likes

This is amazing! Such exciting times, thank you for this.

7 Likes

For those who don’t frequent Discord, I’ve added a couple of recent articles/posts by the team into a blog too. Feels good to be dog fooding! :laughing:

http://localhost:8080/imim/blog/461a04f3ca5bda84a149912bd25ce5e9a55801dc3a00ffde10b934fc7c617f22

(Obviously, you need sn_httpd running on localhost:8080 for the link to work! :sweat_smile:)

8 Likes

Very nice. Looking forward to having a play with this!

4 Likes

Looks great :100:

1 Like

I’ve pushed more changes which include the following:

  • Adds fonts to dist to remove dependency on clear net
  • Updates styles for better formatting on mobile devices

Combined with the latest version of sn_httpd, it’s looking pretty good, IMO!

Note that the latest sn_httpd release brings a big caching performance boost and IMIM switches between pages cleanly. I can’t actually see the loading spinner anymore for pages I’ve seen before and it only flashes up for new ones too. I’m super pleased with that! :sunglasses:

Mobile screenshot:

16 Likes