Skip to content

Repository files navigation

Print Control

A cloud dashboard + print queue for a BIQU B1 SE Plus, deployed on Railway and driving OctoPrint on a Raspberry Pi at home. Upload g-code from anywhere, queue prints, watch temps/progress, pause/cancel, and get Discord notifications — without opening a port on your home router.

[B1 SE Plus] --USB--> [Raspberry Pi: OctoPi + cloudflared]
                              │  events out (started/done/failed/cancelled)
                              ▼
   [Railway: Next.js dashboard + API + Postgres queue]  ◀── maxsutton.dev/3dprinter
                              ▲
                              │  API calls in (upload, start, pause, temps)
                     Cloudflare Tunnel back to the Pi

Railway lives in the cloud and can't reach the Pi through a home router, so a Cloudflare Tunnel gives the backend a way in. The queue's source of truth is Railway Postgres — OctoPrint just executes whatever it's told and reports back.

Stack

  • Next.js 14 (App Router) — dashboard UI + API routes, served under basePath: /3dprinter
  • Prisma + PostgreSQL — the durable print queue
  • OctoPrint REST API — reached through the Cloudflare Tunnel
  • Background ticker (src/lib/ticker.ts) — safety net that re-dispatches the queue if a webhook is ever missed

Setup

Full hardware, OctoPi, Cloudflare Tunnel, and Railway deployment instructions are in SETUP.md.

Local development

npm install
cp .env.example .env   # fill in DATABASE_URL, OCTOPRINT_URL, secrets, etc.
npm run dev            # http://localhost:3000/3dprinter

API

All routes live under …/3dprinter/api and accept Authorization: Bearer $API_TOKEN for scripting (the inbound webhook uses a separate X-Webhook-Secret). See the API reference table in SETUP.md.

About

Cloud dashboard + print queue for a BIQU B1 SE Plus — Next.js on Railway driving OctoPrint on a Raspberry Pi via Cloudflare Tunnel

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages