Development
How using Codex to build internal tools completely changed my workflow
Okay, the title may be a little “clickbaity”; however, discovering how useful internal tools can be, and how quickly I can build them, has massively improved my process.
Most of what I talk about in this article relates to internal tooling that helps with some of the workflows involved in adding or updating content on Grizzly Pumpkin, my freelance brand for website design and development, Laravel development, Statamic development, and more. If you’re in the UK and are looking for an experienced developer for your next project, get in touch!
There are a few key areas I find annoying to work on:
Converting images
Bulk renaming
Creating website mock-ups on devices
Creating OG social images
Automated website audit reports, mostly as a “because I could” experiment
Converting images
There are many tools out there that do this, so this isn’t anything revolutionary. However, I can never remember what to use, end up opening the top Google result, or open Affinity Designer/Photo and manually convert the files.
What I did instead was have Codex create a bulk resize/converter tool that also supports PDFs. This is great, as some of my clients require thumbnails of PDFs to be generated for document covers or page previews. I used to do this manually in Affinity Designer. Now, I upload the files to my tool, which is hosted on my internal network with no public access, configure the size, cropping method, output quality, and format, then just click Go.
A few seconds later, if that, I get a ZIP with all the resized or extracted images. They are mostly named how I want them, but if not, I can then put them into the bulk rename tool.
Bulk renamer
This is one I had quickly created. I know there is Bulk Rename Utility on Windows, along with various others, but since I was here, it would have been rude not to get something simple configured.
This one is really simple. I upload the files, set some basic rules such as replace, remove, number, etc., then hit export. I then get a ZIP with all the renamed files.
Mock-up generator
This is when I really started to see the value. For my own website, I want to be able to easily generate mock-ups of websites for thumbnails or showcase pages. Most of the templates out there are for Photoshop and don’t work particularly well in Affinity Designer/Photo, which I use. I’ve even tried manually recreating them and, while I can get close enough, it never feels quite right. Creating every mock-up manually is also a lot of work.
After a little bit of research, I found a mock-up screenshot API service with a very generous free tier. So I had a tool written that provides me with various options, such as:
Device: desktop, laptop, mobile, and laptop + mobile, which is a special combined version
Background colour: gradient, solid, or transparent
Crop option
Scale
Colour blend
I can then quickly enter the website URL, tick the devices I want, and set the background colours and scales. The system calls the API to fetch the images, stores them locally, and processes them using GD based on the settings I provide. If I want to play around with different settings, I can, since the device screenshots are cached locally and are not regenerated unless I request it.
Because this is hosted on my local network, on a home server, I store the results in an SQLite database and can go back to them in future to tweak them if I need to.
When I had this working well, it really made me realise the power of these tools for this purpose. These are not customer-facing or even public-facing tools. I don’t care how good or bad the code is; as long as it works, that’s fine.
OG images
Similar to mock-ups, OG images are another area where I had created my own templates. They were fine, but it was still taking time to generate them. Since I had already created a tool for the mock-ups, I moved on to these images.
Within a few hours, I had something that worked well for what I needed. It provides various options and preset saving in the SQLite DB, so I can have a number of presets for the projects I want to generate them for. It also exports in the formats I need: WebP, JPG, and PNG.
It also has a very simple layout. It was actually created fully locally too, so I get a live preview, and it doesn’t use the server to generate the images. I might explore enhancing the mock-up generator to do something similar, but for now it works fine.
All of these tools together are great, but I then decided to go a little over the top and see what else I could build.
Website audit
I sometimes receive requests from clients to audit their websites, or I want to audit my own. These are fairly straightforward. I have a list of things I check as a basic free check, and if I’m working on the project, I also have a more thorough list of SEO, performance, and other checks to make sure it has the best chance in search engines or, in today’s day and age, AI tools.
This is very much an experimental tool, and I may tweak it over time. But I effectively ended up with a tool that, given a website, will crawl a handful of pages, run around 100 checks on them, and send a screenshot to a cheap LLM to get an automated summary of how it thinks the design and usability are.
I was actually impressed with the results. It has scoring, which is mostly arbitrary, but I was impressed with how easy it was. Given all the tools online for quick “free website reports”, I actually ended up implementing many more checks than they offer, and for the most part, had very similar accuracy. Most of the checks are also based entirely on static analysis.
This is very much an experimental tool, and whether or not I use it depends on how reliable I can make it, which I suspect requires a bunch of tuning.
Conclusion
If you do a lot of repetitive tasks in your business or other projects, whether it’s creating different images, converting images, or something else, explore whether you can create some internal tools. It’s fairly easy, and since they’re internal and not public, you just have to end up with something that works. It doesn’t necessarily need to be perfect code.