2d 3d bot chat cpp csharp demo docker game go gui java javascript k8s lib minecraft mod php proxy video web

Botkit
Thumbnail of Botkit

Source code:
github.com/razzie/botkit

Year: 2023 - 2024

Tags: bot go lib

A Telegram bot library designed to handle commands and dialogs. Both of these support replying with sticker, photo, video, audio, album or file (even files not directly uploaded by the bot). Dialogs are composed of one or more queries, which can be single choice, multi choice or file queries. In theory you could run multiple instances to help balance the load, as long as they share the same Redis database.

Broadcaster
Thumbnail of Broadcaster

Source code:
github.com/razzie/broadcaster

Year: 2023 - 2024

Tags: go lib

Broadcast messages from one channel to many, with timeouts, server sent events and much more. Zero external dependencies. Designed for scenarios when it’s unpractical to connect to the same event source using many parallel connections.

Commander
Thumbnail of Commander

Source code:
github.com/razzie/commander

Year: 2023 - 2024

Tags: bot go lib

Execute Go functions from CLI or from a chatbot. Register any function as a command, then supply a context variable and a string slice as input arguments. If the original function has Context parameter(s), the context variable will be passed, otherwise the arguments from the string slice will be converted using Sscanf. The function’s return values are converted into a []any slice and if any of these values is an error, it will be extracted into a separate error return value.

Json2Go
Thumbnail of Json2Go

Try it here:
json2go.razzie.cloud

Source code:
github.com/razzie/json2go

Year: 2023 - 2024

Tags: docker go web

A webapp that helps you write Go client libraries for JSON web APIs. One of my experiments required building a database that included data from many third party JSON web APIs. The process of deserializing data into manually crafted Go structs quickly got exhausting, so I had to come up with a solution. Json2Go is by no means perfect (it only looks at the fields of the first item of a JSON array), but it gets the job done. You can input a JSON or a URL that returns a JSON. Field names are automatically converted into camel case, stripped of unsupported characters and correctly annotated with the original name. The resulting generated structure is formatted and uses syntax highlighting.

Personal website

  • 2015 version

    The site made use of user friendly URLs (thanks to Apache web server’s mod_rewrite) and loaded pages dynamically via jQuery’s AJAX API. A server side PHP script automatically parsed the static HTML pages for sections, which could then be accessed individually by the user. It wasn’t very CPU friendly, but made it easy for me to add new content to the page without using a database. Later my Twitter feed was integrated as a news feed, using OAuth and Twitter’s API.

  • 2018 version

    Implemented in C# using NancyFX and a brand new design. It used Github API to list my latest open-source interests and contributions. Project data was stored in XML.

  • 2019 version

    Everything completely rewritten in Go. Data was still stored in XML files initially, but later all the content (including resume) was moved to a single yaml file, which was periodically updated directly from the repository.

  • 2024 version

    Completely rewritten everythign again, using Go + PicoCSS + HTMX stack. It supports light and dark themes (based on user preferences reported by the browser) and features HTMX boosted page loads and loading spinner. Project data is stored in individual yaml files, everything else is in HTML templates. It does not rely on third party feeds anymore.

RazCache
Thumbnail of RazCache

Source code:
github.com/razzie/razcache

Year: 2023 - 2024

Tags: go lib

A minimalist abstraction layer above Redis, Badger and a custom in-memory cache. As many of my self-hosted services rely on Redis for caching or data storage, I often had to fire up a local instance for manual testing. This process was too cumbersone for me, so I figured I could come up with a wrapper around Redis supporting the functionaly only I use the most, and during development it should mimic this functionality in-process. Supporting key expirations was a mandatory requirement, so the in-memory cache implements a “janitor” goroutine that cleans up these keys exactly when they expire, one at a time.

0x40 Hues
Thumbnail of 0x40 Hues

Try it here:
hues.razzie.cloud

Source code:
github.com/razzie/0x40hues

Year: 2023

Tags: docker go javascript web

I’ve come across Kepstin’s amazing 0x40hues project and caught myself listening to it a lot. After finding community resource packs to try, it quickly became troublesome to configure and run them. This motivated me to fork the project and after a great deal of refactoring, it now supports loading many respacks and on-the-fly configuration.

k8s-db-operator
Thumbnail of k8s-db-operator

Source code:
github.com/razzie/k8s-db-operator

Year: 2022 - 2023

Tags: docker go k8s

Kubernetes operator to provide access to shared PostgreSQL and Redis. It relies on the DatabaseClaim CRD, but unlike most other operators, this one only deploys Kubernetes secrets containing connection strings. Databases and Redis namespaces are not shared between dbclaims.

RazChess
Thumbnail of RazChess

Try it here:
chess.gorzsony.com
chess.razzie.cloud

Source code:
github.com/razzie/razchess

Year: 2022 - 2023

Tags: docker game go javascript web

I’ve had a sudden spark of interest in chess as of late 2022 and decided to build my own web chess app with focus on simplicity and ease of use. Also I didn’t want to waste time convincing friends to register to [insert your favorite chess platform here]. With RazChess you just visit the website, copy the link of the session and pass it to the person you want to play with. As weeks passed I kept adding new features like chess puzzles (mate in two steps), Fischer random (chess960) game, included chess openings encyclopedia, custom games and the ability to download your matches as GIFs. There is also Redis support to restore active games after a restart.

Beepboop
Thumbnail of Beepboop

Source code:
github.com/razzie/beepboop

Year: 2020 - 2022

Tags: go lib web

A lightweight webapp framework that powers Razbox. Most of the original code was taken from Razlink, but it has heavily evolved since. The core mechanic consists of registering pages (which are mostly a template + handler bundle) and returning view objects from inside the handlers. There are some utilities for session handling, access management and logging too, but this library is not suitable for production use.

Razvhost
Thumbnail of Razvhost

Source code:
github.com/razzie/razvhost

Year: 2020 - 2022

Tags: docker go proxy web

Virtual hosting/reverse proxy with TLS termination and automatic certificate management. It supports proxying, file/directory serving, redirection, accessing SFTP or S3 buckets, hosting PHP projects or even tailing log files. The configuration is loaded from a single file that contains simple hostname -> target rules, where even templates are supported (check readme in repo). Changes to the config files are detected and applied during runtime. It can even watch Docker containers with VIRTUAL_HOST and VIRTUAL_PORT environment variables and direct traffic to them (though it would’ve been better to check labels instead, but it didn’t cross my mind at the time).

Razbox
Thumbnail of Razbox

Source code:
github.com/razzie/razbox

Year: 2020 - 2021

Tags: docker go web

Super simple cloud file storage with almost zero configuration - powered by Beepboop Razbox stores all configuration and metadata in JSON files on the local filesystem and doesn’t rely on a relational database (though it has opt-in support for Redis caching). Each folder can contain a .razbox file (which can be generated by included tools) and the content is ready to be served. Read and write access to these folders can rely on separate passwords, so you can share read access only if you want. Subfolders are also supported and they inherit the read/write passwords, unless a .razbox file is generated for them. Uploaded files can have an arbitrary number of tags that allow filtering. Thumbnails are generated for media files (using ffmpeg for videos!), which are visible in gallery view. Some archive formats are also supported for read-only browsing. Individual files can be shared publicly, this making them readable without any password.

Riddle Solver
Thumbnail of Riddle Solver

Riddles:
The Jindosh Riddle

Download:
riddle-solver-gui.exe
riddle-solver-tui.exe

Source code:
github.com/razzie/riddle-solver

Component library:
github.com/razzie/razgio

Year: 2019 - 2021

Tags: go gui

Riddle Solver is a terminal app designed to solve Einstein’s 5 house riddle (also called zebra puzzles in general). I think I came across this kind of riddle playing Dishonored 2 first, as a third option to get inside a locked place. It was written by a fictional genius game character named Kirin Jindosh and it’s clearly based on Einstein’s five house riddle. It took me (sadly) at least 30 minutes to solve on paper, but it earned me an achievement. Fast forward 3 years, I had the random idea of implementing this riddle solver, which seemed like a simple way to sharpen my Golang skills. I was wrong. Coming up with the UI design and the solver algorithm caused me some sleepness nights, but I’m really proud of the result.

Geoip server
Thumbnail of Geoip server

Try it here:
geoip.razzie.cloud

Source code:
github.com/razzie/geoip-server

Year: 2020

Tags: docker go web

A web service that serves IP address geolocations in JSON format. Instead of relying on a local database it collects data from a (configurable) series of 3rd party providers, converting the results to a commom format. It supports provider fallbacks and caching.

Mediaserver
Thumbnail of Mediaserver

Source code:
github.com/razzie/mediaserver

Year: 2020

Tags: docker go web

A web service that fetches thumbnails with title from URLs. Originally planned to use it in a chat service to prevent the tracking of users by letting them download images directly.

Razproxy
Thumbnail of Razproxy

Source code:
github.com/razzie/razproxy

Year: 2020

Tags: go proxy web

SOCKS5 tunneled through TLS connection. The project consists of a custom server and client, which enable encrypted traffic between them. The client opens a SOCKS5 port locally which can be used by multiple applications (like web browsers) running in parallel.

S3proxy
Thumbnail of S3proxy

Source code:
github.com/razzie/s3proxy

Year: 2020

Tags: docker go

A super simple S3 proxy server that obfuscates file content before transmitting the request to the target. Obfuscation is done via a lookup table which is generated from a user provided key. Only signature v2 authentication is supported.

RazTracer
Thumbnail of RazTracer

Source code:
github.com/razzie/raztracer

Year: 2019

Tags: go