Tech of Kavykhi.Cloud
Infrastructure
A Hetzner cloud server is used as a host for the backend application, database, and web server. The cloud server runs NixOS Linux distribution on OpenZFS. The backend application implements the main API and is written in Haskell. The database is PostgreSQL; it stores most of the metadata. The web server is nginx; it proxies the backend application, and serves static files of the frontend and documentation. Cloudflare proxies the cloud server.
Cloudflare Workers are used to host a serverless function implementing the storage API. The worker is written in Typescript, and shares some code with the frontend.
B2 Cloud Storage is used as object storage for user-uploaded artifacts. The Cloudflare worker proxies it to make it available to a user.
A command-line tool written in C++ is used by the backend for heavy artifact processing tasks.
Frontend is implemented in Typescript as a single-page application. It uses Solid.js reactive framework. Styling is implemented via plain CSS rules, encoded in SCSS for flexibility, without external CSS frameworks. The main font is Inter.
Build and deploy
The Haskell backend is built using Stack via haskell.nix. The parts written in Typescript (the frontend and the worker) are built with Parcel. The worker is deployed using OpenTofu. The whole build is orchestrated using Nix package manager.