Repository navigation
Development
| Folder | Contents |
|---|---|
backend/ |
FastAPI (Python 3.12+), SQLite, tests; app/engine/ slicer and scene, app/printers/ printer drivers |
frontend/ |
Web app (Svelte 5, Vite, three.js); texts in src/lib/locales/de.js and en.js
|
webapp/ |
nginx config and Dockerfile for the web app container |
apps/tauri/ |
Desktop app (Tauri 2), local mode, slicing on the device |
apps/android/ |
Android app (Java without Gradle) with Orca and Python |
mcp/ |
MCP server |
.github/workflows/ |
Docker images for GitHub Container Registry |
Code comments are mostly in German.
cd backend && python3.13 -m venv .venv && .venv/bin/pip install -r requirements-dev.txtcd backend && DATA_DIR=../.devdata \
ORCA_BIN="/Applications/Snapmaker Orca.app/Contents/MacOS/Snapmaker_Orca" \
ORCA_PROFILES="/Applications/Snapmaker Orca.app/Contents/Resources/profiles" \
.venv/bin/uvicorn app.main:app --port 8321 --reload --reload-dir appcd frontend && npm install && npm run devOn Linux, point ORCA_BIN and ORCA_PROFILES at an extracted Snapmaker Orca AppImage (AppRun and
resources/profiles).
Careful: a dev backend with real printers in its database connects to them. Bambu printers only accept a few MQTT connections. For testing, use a database with test printers on an unused address.
cd backend && .venv/bin/pytest -qcd frontend && npm testOne test checks that de.js and en.js have the same keys and placeholders.
Set your own app ID first. The source uses the placeholder com.example.plateful.
-
Mac:
PLATEFUL_APP_ID=io.github.yourname.plateful apps/tauri/local/build-mac.sh(web app + backend via PyInstaller, about 50 MB). The result is inapps/tauri/src-tauri/target/release/bundle/macos/Plateful.app. Copy it to/Applications.ORCA_BUNDLE=1builds Orca into the app. -
Android:
PLATEFUL_APP_ID=io.github.yourname.plateful apps/android/build.sh --install <device>buildsbuild/Plateful.apkand installs it via adb (for example over Wireless Debugging). The runtime (Orca, Python) is inapps/android/build/runtimeand is only rebuilt when needed. Back up the signing key~/.android/plateful.keystore; otherwise updates only install after uninstalling. RaisePLATEFUL_VERSION_CODEfor every release. -
Icons:
cd apps/tauri && npm run iconscreates all sizes fromdocs/icon-full-1024.png. The macOS icon comes fromdocs/icon-mac-1024.png.
- Update the version in
apps/tauri/package.json,apps/tauri/src-tauri/Cargo.tomlandapps/tauri/src-tauri/tauri.conf.json. - Tag
vX.Y.Zand push the tag. GitHub Actions buildsplateful-backendandplateful-webappand pushes them toghcr.io/<owner>/…with the tagsX.Y.Z,X.Yandlatest. - Build the Mac app and the APK and attach them to the GitHub release.
The backend calls the Snapmaker Orca CLI as a separate program. Each job gets its own working folder in
DATA_DIR/slices/<id>/ with the profiles, the project, the command and the log. At most SLICE_PARALLEL jobs run at
the same time.
-
Edited scenes: for each object, the web app sends
{src, m}(source and 3MF transform in bed coordinates).engine/scene.pywrites a 3MF from it (STL/OBJ) or replaces the build items in the project. Orca then runs without--arrange/--orient. -
Painting:
frontend/src/lib/painter.jskeeps a state per triangle and layer (color, supports, seam). Split triangles are stored as Orca subdivision trees (lib/paintTree.js). The slice job only sends what changed, gzip + Base64. The backend checks every tree and writes it aspaint_color/paint_supports/paint_seaminto the 3MF, encoded the same way as Orca. Orca drops paint in filaments it doesn't know, sofiles3d.grow_filamentsextends the filament lists of 3MF projects. -
Parts and height ranges are written to
Metadata/model_settings.configandMetadata/layer_config_ranges.xml. Orca quirks handled by Plateful:- a part must not reach below the bottom of the object, or Orca crashes,
- in Bambu projects, parts must be in the order negative → modifier → part,
- a height range always needs a layer height.
-
Mixed colors are written as
mixed_filament_definitions. Orca treats them as virtual filaments after the real ones. -
Cutting runs in the browser (
frontend/src/lib/cut.js), because the Orca CLI can't cut. -
Layer preview: the backend converts the G-code once into a compact binary file
(
GET /api/slices/{id}/layers.bin, format inbackend/app/engine/layers.py).
- The server prepares the job as usual (profiles, project, command), but sets the slice to
deviceinstead of starting Orca. - The web app fetches the package (
GET /api/slices/{id}/device-job), hands it to the app's built-in backend (POST http://127.0.0.1:<port>/api/device/slice) and uploads the result (POST …/device-result). - The server evaluates it like its own run. If the device doesn't answer, the web app reports it (
device-fail); after 15 minutes the server gives up on its own.
The device key the web app gets is SHA-256 of plateful-device:<start key>, so the page from the server never sees
the key for the local login.
The app starts the backend (backend/local_main.py) with a random key on 127.0.0.1 and opens
/api/auth/local?key=…. The first time, Plateful creates a local admin for this. The backend rejects requests with a
foreign host name (protection against DNS rebinding) and exits when the app exits.
- Snapmaker U1: Moonraker. Upload to
gcodes/plateful/, start with tool mapping (MAP_TABLE), still image from/server/webcams/list. - Bambu: MQTT 8883 and FTPS 990 with TLS. Camera on port 6000 (P1/A1, JPEG stream) or RTSPS 322 (X1C, ffmpeg turns it into JPEG frames).
- The backend keeps at most one connection per camera and shares the frames with all viewers
(
backend/app/cameras.py).
- Every writing API request needs the header
X-Plateful: 1(protection against forms from other sites). - Access keys are sent as
Authorization: Bearer plf_…. These requests don't needX-Plateful, and only the key counts, never the session cookie.
The wiki is its own Git repository (Plateful.wiki.git). Pages are Markdown files; spaces in the title become -
in the file name. _Sidebar.md is the navigation.
Using Plateful
- Getting Started
- Printers
- Printing
- Editing and Painting
- Profiles
- Library and Import
- Spools and Statistics
- Failure Detection and Notifications
- Apps
Running and developing