Iridium

A closed source private application to create documents for others to view.

Problem

I need a way to show people my private projects without publishing their entire source. I want to show them how I did it and what makes them interesting. Obsidian should remain my primary workspace for documenting everything privately and once I feel ready, I should be able publish parts of it onto Iridium.

Concept

The drawing below is a rough sketch I made showing how I want Iridium to look. I want /new (path) to be a very simple editor that supports markdown with a toolbar that sits up top. It shouldn't feel uncompleted but rather minimal, clean and well engineered.

image

The documents will all sit at a random slug and the site will be available at ir.eamonw.dev. All documents will always be public, this isn't meant to be a private document service as I use Obsidian for that.

image

I wanted the favicon to be something similar to the Stardew Valley Iridium Ingot. I obviously couldn't use the ingot itself due to copyright reasons.

Decisions

I decided to use React Router v7 for this and I've recently been trying out Drizzle versus Prisma so I will be using Drizzle and PostgreSQL for the database.

/new path will be guarded by my TinyAuth service I run so auth won't be a problem.

As seen in the concept, I was considering a gradient noise background but to match my new portfolio, I decided to go for a dark purple.

I was considering giving this project a landing page but I instead made it redirect to it's own public document (the one you are reading right now.)

For the favicon, I decided to browse for assets on itch.io. Eventually I came across a pack that looked amazing and would work but after purchasing it and taking a closer look at the license file in it, I wasn't allowed to use it as logo or trademark. They never stated this on the page itself but luckily the pack was cheap so I didn't think much of it. I started looking on opengameart.org until I eventually found a pack that was CC0 (public domain) and contained a stack of gold ingots grouped together. I wasn't planning on making a favicon myself but I ended up isolating one ingot, coloring it using the colors from Stardew Valley's Iridium Ingot and converting it to an SVG.

Now I also wanted to add images to documents so I settled on putting a lightweight S3 alongside it, RustFS.

I decided to add this to footer on all documents that sits above the copyright bar, "If you're interested in other projects I've made, checkout my portfolio!"

I wanted to be able to modify pages so I decided to scrap /new and make it so /edit without anything else would be the way to create new pages. To modify already existing pages you go to /edit/[id]. /new now redirects to /edit.

Now I also need an easy way of managing documents so I decided to make a page to do all of that, /list. You can view all of the documents there, search by title, delete and modify them.

I decided to drop the toolbar. I didn't think it was necessary. The save button now sits in the top right with a delete button.

To render markdown while editing I decided to use the @codemirror/* packages.

Result

The site is live at https://ir.eamonw.dev/, it redirects to this document. All documents have their own id, https://ir.eamonw.dev/[id] is where they sit. All documents require a title.

To create a document I go to https://ir.eamonw.dev/edit (or /new, it redirects to /edit) and it let's me type directly. Markdown is completely supported and rendered the way obsidian does while editing. I can edit documents by going to https://ir.eamonw.dev/edit/[id] and manage all of the documents at https://ir.eamonw.dev/list.

Once you save for the first time (on /edit) it creates and therefor also publishes the document. After saving you get redirected to the /edit version of the editor.

image

This is the favicon I ended up making: image I'm happy with how this project turned out and I hope you like it!