Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

EduardoOliveira/stLib

Repository files navigation

stLib

A platform that allows the viewing and management of 3d printing related projects and assets

This project has been migrated, you can now find it at https://github.com/Maker-Management-Platform/docs

Problem

Many of us hoard a tone of STL's from public sites, patreon and so forth. Keeping a tidy library easy to access and search proved difficult (at least for me).

Approach

The main goal is to achieve a self-hostable platform that work on top of the organization you already have, allowing you to have a nice overview of what you have collected so far.

Demo website

https://demo.knoker.eu/projects

Screenshots

Home page with filter by project name and tags

Home

Project Image galery

Images

3DView allows you to view multiple models of the project at once with zoom and pan controls

3DView

Slice files with print details

SliceDetails

Edit page

Edit

How to use

  • Download the latest release for your platform
  • Edit the config.toml
    • Change the library_path to the folder where you keep your stls
  • Run the binary files
  • Navigate to http://localhost:8000/projects on your browser
  • Since you don't have initialized projects please toggle the initialized button and the projects should start to appear.
  • Enter the project
    • Go to edit and save the projects to initialize it.
  • Have fun.
  • When something blows up please contact me on discord :)

configuration

port = 8000 # port to run the server on
library_path = "/library" # path to the stl library
max_render_workers = 5 # max number of workers to render the 3d model images in parallel shouldn't exceed the number of cpu cores
file_blacklist = [".potato",".example"] # list of files to ignore when searching for stl and assets files in the library_path
model_render_color = "#167DF0" # color to render the 3d model
model_background_color =  "#FFFFFF"  # color to render the 3d model background
thingiverse_token = "your_thingiverse_token" # thingiverse token to allow the import of thingiverse projects

docker-compose

---
version: "3.6"
services:
  stlib:
    image: ghcr.io/eduardooliveira/stlib:main
    container_name: stlib
    volumes:
      - ./library:/library
      - ./config.toml:/app/config.toml
    ports:
      - 8000:8000
    environment:
      - "THINGIVERSE_TOKEN=" # needed for the thingiverse download feature
      #- "PORT=8000"
      #- "LIBRARY_PATH=/library"
      #- "MAX_RENDER_WORKERS=5"
      #- "MODEL_RENDER_COLOR=#167DF0"
      #- "MODEL_BACKGROUND_COLOR=#FFFFFF"
      #- "LOG_PATH=./log" # If you wish to log to a file
    
    restart: unless-stopped

Discussion

Discord Shield

Join discord if you need any support https://discord.gg/SqxKE3Ve4Z

TODO Features

  • Facelift
  • Add klipper integration to send jobs to the printer
  • Add support for other slice formats
  • Add support for other slicers
  • Add detail to the slice view
  • Allow project creation and file upload
  • Allow slice upload directly from the slicer
  • Discover other files in the filesystem
  • Improve the 3DView
  • Allow model upload
  • Show slice settings (print time, speed, material)
  • Discover slice files in the filesystem
  • Allow default project image definition
  • Discover images in the library
  • Find projects in the filesystem
  • Render a static image of the models
  • Allow edition of the projects
  • Allow search by tags
  • Allow search by project name
  • Allow 3DView of the models
  • Allow multiple models in the 3DView

TODO Technical

  • Launch a demo instance
  • Build a docker image
  • Add a bounding box to the 3d objects to center the camera
  • Allow models to be set as image
  • Remove backend template rendering
  • Refactor endpoint files to match API
  • Cleanup static files
  • Host the Vue compiled files from the Echo Server
  • Add frontend configuration
  • Add a build & release system
  • Add backend configuration