Brickheart

How I got started developing

: Written by a human with AI assistance.

After some research I found cloudflare.com sold domain names at near cost and provided a generous allowance on the free plan for a static website. After paying for my domain I set up email forwarding and the subdomains.

You can upload HTML files directly or deploy the site via Github. I chose Github as I wanted to include a webGL app on the site and it would be simpler to do it all the same way. As a test I installed the docs example from https://github.com/PolymerLabs/brick-viewer. THis also set me down the path of doing the whole project in Typescipt.

Creating git repos

In the end I set-up 5 repos on github for this project. I wanted clean seperation between the components of the project, so they could be developed independantly. The code for putting it all together into a deployed website I kept seperately as a private repo.

public ldraw-lite (cut down LDraw library based on part size and usage frequency) lplace (spacial programming language to manipulate LDraw parts) lframe (forked from brick-viewer, to display .mpd files) brickheart (which combines all three elements into a web app that works offline)

private brickheart-web/ ├── site/ → brickheart.org (multiligual /en/ etc.) ├── app/ → app.brickheart.org (WebGL editor) ├── dev/ → dev.brickheart.org (blog, roadmap) └── shared/ → common files (not deployed)

Install nvm (https://github.com/nvm-sh/nvm#installing-and-updating)

I am using Ubuntu on my development machine so I needed install some development tools. sudo apt update sudo apt install -y git curl build-essential curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash

nvm install --lts node -v && npm -v

VS Code

sudo snap install code --classic

Configure Git

sudo apt install git sudo apt install gh git config --global user.name "Your Name" git config --global user.email "you@example.com" git config --global init.defaultBranch main

Create the project from the terminal

mkdir -p ~/brickheart-web && cd ~/brickheart-web npm create vite@latest app -- --template vanilla-ts cd app npm install npm run dev (live loading project) npm run build (produce dist folder)

CloudFlare Deployment

New Application Pick git repo Put a wrangler.jsonc inside site/ and point at the build folder:

wrangler.jsonc { "name": "brickheart-web", "compatibility_date": "2026-10-01", "assets": { "directory": "./dist" } }

Change Deploy command to npx wrangler deploy --config site/wrangler.jsonc

After first deployemnt, you can attach a custom domain from the worker page and then add to wrangler.jsonc:

"workers_dev": false, "preview_urls": false