x44
- 5 Devlogs
- 32 Total hours
I am building a lightweight, DIY Vercel clone that spins up isolated Docker containers to build Git repos, streams the static assets to Cloudflare, and serves them globally.
I am building a lightweight, DIY Vercel clone that spins up isolated Docker containers to build Git repos, streams the static assets to Cloudflare, and serves them globally.
I finished the /new-project page and wrote some types.
While testing I found a major bug, that if a build request comes to the build-worker while a build is running then the output files gets overwritten, resulting in a broken deployment. I could fix it by having the outputs of the build on separate folders and uploading them one by one. But this approach wasn’t utilising the queues.
I will change the structure to something like this, [Github Webhook/Initial Deploy] -> [Control-plane] -> [Cloudflare Queue] -> [control-plane queue handler] -> this sends the build details to the build-worker after building it will update the status of the deployment. This was i don’t have to manage concurrency my self
I am spending a lot of time in styling. hope it looks good :?)
Just build the layout of the dashboard and created a new page for creating new projects[design inspired by cloudflare].
You might be thinking that this should not take 10 hours and you are right. My first thought was to not to create a new page but a dialog box. But the combobox I used for selecting repo was not registering the clicks, i was working with keyboard tho. After trying to debug a lot, I asked AI why it was not working as intended. Because I had both base-ui and radix-ui wasted 4 hours on it and ended up creating a new page altogether
/new-project pageconst getAuth = (ctx:Context) => {
const db = drizzle(ctx.env.DB, {schema})
const auth = betterAuth({database:drizzleAdapter(db, {provider:"sqlite",schema})})
return auth
}
If you have any suggestion please comment, and you can view the system architecture in the previous devlog[i am not yet sure about the subdomain routing part, so that is not drawn]. ✌️
This commit was a big one. The build-worker finally got a proper API layer, added Axum with an auth middleware so only authorized clients can trigger builds. The whole flow is now queue-driven: the worker pulls jobs from Cloudflare Queues, runs the Docker build, uploads output to R2, and acknowledges the message. Feels way more production ready.
Also spun up the monorepo structure properly. Added apps/control-plane (Cloudflare Worker), apps/website (Vite frontend), and packages/db-schema for shared types. pnpm workspaces are configured, root package.json has a dev:backend script. Basic .gitignore in place.
The most frustrating thing was that the Cloudflare Queue send function is not working. I’ve spent hours trying to debug it, messages aren’t showing up on the CF dashboard at all. The pull/ack endpoints seem fine, but pushing messages into the queue is a dead end. Hoping that actually deploying the control-plane worker might fix it,maybe it’s a local dev environment issue with wrangler. Either way, this is the main blocker right now. If anyone has hit this, I’d love to hear how you solved it.
Git commit: https://github.com/xxeisenberg/x44/commit/9b1669bd7e935043367ba32c2abadc1428f80596
I have built the docker image that will build the code and a rust program that will run the docker container and upload the build output to Cloudflare R2.