Writing an awesome CLI with typescript

An overview of the tech stack Setting up the project & installing dependencies Quality of life: Typescript path alias imports with bun Quality of life: Prettier & package.json scripts File structure and separation of concerns The CLI menu - menu.ts The last run configuration from DB - db.ts Bringing it all together - main.ts Conclusion If you have ever wanted to build a Command Line Interface (short: CLI) in typescript, this post is for you!...

August 22, 2024 · 8 min · 1584 words · CodeCrusader
A wizard wielding powerful magic

Lucia-auth in T3-Stack

What is T3 Stack? Why Lucia-auth? How to add lucia-auth to NextJS >= 13 (App Router) Optional: How to setup Prisma on NixOS Installing lucia-auth dependencies Editing the schema Adding the basic lucia-auth functionality Adding lucia to TRPC - TRPCReactProvider Adding lucia-auth to TRPC - createTRPCContext Adding lucia-auth to TRPC - protectedProcedure Adding lucia-auth to TRPC - the auth router Conclusion - how to use lucia-auth with TRPC Developing web applications is my daily bread and butter....

August 9, 2024 · 11 min · 2131 words · CodeCrusader
A pixel art sunrise behind a giant boulder

Configuring Doom Emacs to be your Typescript IDE

For a while I struggled with using Emacs as a IDE for modern web-development. In other words, Typescript, prettier, .tsx files, etc. In the end it’s not hard, here is how I have my Doom configured: settings in the init.el First up, we have to make sure that we are using the power of a language server protocol (short lsp). The lsp is a client-server protocol where your IDE is getting all the type-hinting, Intellisense, auto-complete etc from....

August 4, 2024 · 3 min · 444 words · CodeCrusader
Pixel art cover image

My Linux Odyssey

Phase I: Discovering Linux Abandoning MacOS The first Linux desktop Distro hopping From Debian-base to Manjaro Gaming on Linux Phase II: Tiling windows and dotfiles Tiling window managers QTile Off the beaten path: Arco Linux Establishing dotfiles Phase III: Mastering Arch Daring Arch Learning how to solve problems Versioning packages Managing two systems Phase IV: Declaring reproducibility The final distro hop: NixOS Settling on NixOS Switching to Flakes Killer feature: Generations Phase V: Nix verstehen Flexing the nix muscles home-manager - declare the user-space hyprland & waybar - a modern environment nh - the nix helper stylix - theme everything MVP: Vimjoyer Epilog OpenSource, for me, really began with Linux....

July 27, 2024 · 15 min · 3102 words · CodeCrusader
A shining beacon of light beaming into the sky

How I published this blog post

Follow me on my journey on how this blog post was written and published. You may discover an amazing workflow to quickly bring your thoughts to the web as well. The basic setup with org-mode In the beginning there was darkness. Then, a fresh new .org file appears. The opensourceodyssey.org file, to be precise. Org or org-mode is a markdown syntax for Emacs. You can do a lot with it; such as: taking notes, tracking tasks, writing literal code files (like Jupyter notebooks for Python), and exporting to all kinds of other formats (like ....

July 18, 2024 · 4 min · 842 words · CodeCrusader
A ship docked at land

Touching base, or: reverting to the default

I’ve been using Doom Emacs for a few years now. After picking it up, the configuration and customization via a text file (the config.el) caught my interest. It allows the config to grow organically, be checked into git, be versioned, breaking changes can easily be reverted and transfering the exact config to a new system becomes a non-issue. As the yeas passed by, my config grew and grew. A lot of trial and error was still inside that I didn’t bother to clean up....

July 17, 2024 · 3 min · 427 words · CodeCrusader
Pyramids in an epic landscape

Building a timeless tech stack

When learning technology, I’ve tried to seek out projects that will be around for a long time. The origin story I used to be a Windows/MacOS user like you, but then I took an arrow to the knee. Windows was the default. What I - and probably you - grew up with. Not a concious choice, just a matter of fact. Then I “emanzipated” myself and “graduated” to MacOS. In the early 2010s, you were some kind of hipster if you used Apple....

July 16, 2024 · 4 min · 770 words · CodeCrusader
Hello world AI generated cover image

hello world

Call me C0d3Crusad3r. My odyssey into the seas of open source software started a few years ago. Now, I want to use this site as an outlet to document this journey. What to expect in this blog This blog is for computer adventurers that like to take ownership of their tech stack. Some things I try are pretty “niche”. Like, using Emacs, using Linux (NixOS, to be precise) and having a keyboard-oriented productivity flow....

July 15, 2024 · 2 min · 236 words · CodeCrusader