* feat(viewer-sandbox): Made a sandbox function that will only invoke the object-loader loading objects * first pass of creating an objectloader2 * updated build + added vitest * try to get viewer sandbox to use new code * sandbox type fix * refactor a bit * can download root * intermediate commit for downloader/caching queue * can download stuff! * refactor files * intro isBase and fix isString * move single download to downloader * fix download * PR feedback * some intermediate commit * do clean up and download better * clean up promises and linting * can generate values while downloading and caching * add a finish method * remove unused functions * remove asBase * add temporary docs * add more docs with mermaid * add more test models * add response validation * add tests and redo options * add test for download batch * fix downloader tests and change Item to have clearer Base items * add tests and refactor a little * use fetch in downloader as an option * use optional in-memory indexdb instead of monkey patching the global one * more refactors for options for objectloader2 * add tests for objectloader2 * adjust single download * benchmark loading and adjust ol2 batches * download more! * adjust to use hash privates * refactored again with renaming * cleanup * make setupCacheDb throw instead * use BatchedPool for downloads! * fix tests * adjust timings and add adaptive waiting * Only wait if queue wasn't empty and queue size was full * fix tests * fix file names and some private usage * fix interval and private usage * rename vars * use params for methods * fix params for constructors and tests * fix params for constructors and tests again * using dexie * faster settings but doesn't end well * fixed end, optimized and removed logs * fix tests * fix types? * update lock with WSL * add e2e small model test * fix/update yarn.lock * Remove unused eslint ignore to fix pre-commit * prettier fixes * fix real DB usage * rename methods to better match OL1 * rename methods to better match OL1 again * add extra header collection * add headers correctly * test getTotalObjectCount * feat(viewer-lib): Replaced old object loader with Adam's objectloder2 * fix(viewer-lib): Removed the old object loader. Removed unneeded pause time in speckle loader * Testing * only deferred if not downloaded....don't save everything * Lockfile * pool isn't adjustable, adjust download buckets, dexie read is faster * chore * fix(viewer-lib): Fixed compiler errors * fix getObject access with real indexeddb...adjust buffer for deferred access * Fix disposal and pausing * don't index item! * fix dockerfiles to use OL2 * fix Dockerfile * Fix dockerfile * defer correctly and use record to add/lookup/remove to * delete stuff correctly * chore(sandbox): Enabled viewer loading * use objects instead of arrays to avoid findIndex * remove extra count * add a found cache to avoid some db hits * order matters for deferment * move found map to deferment * change option numbers * 2 level cache with expiry * defer everything, use loader to track what is requested....expire only found items * add deferment disposal * oops mismerge * chore(sandbox): Default stream * Beta version of CachePump and CacheReader * Clean up initialization * More clean up * chore(objectloader2): Fixed CI compiler error * chore(objectloader2): Fixed prettier * add cachePump tests * add cacheReader tests * fixed more tests * fixed final tests * moving stuff around and lock return value * try to move stuff out of objectloader2 * use a factory * rename factory * formatting * eslist fixes * try allocating no strings * add comments * small refactor and add another test * fix deferment expiration and have test * use byte size for max memory cache size * fix deferment manager tests * use a set of keys to determine if the whole batch was gathered * saved comment * fix(viewer-sandbox): Fixed compiler error * remove extra disposal * simplify the error handling --------- Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com> Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com> Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>

Speckle | Server
Speckle is the first AEC data hub that connects with your favorite AEC tools. Speckle exists to overcome the challenges of working in a fragmented industry where communication, creative workflows, and the exchange of data are often hindered by siloed software and processes. It is here to make the industry better.
Server and Web packages
Repo structure
This monorepo is the home of the Speckle v2 web packages:
packages/server: the Server, a nodejs app. Core external dependencies are a Redis and Postgresql db.packages/frontend-2: the Frontend, a Nuxt/Vue app.packages/viewer: a threejs extension that allows you to display 3D datapackages/objectloader: a small js utility class that helps you stream an object and all its sub-components from the Speckle Server API.packages/preview-service: generates object previews for Speckle Objects headlessly. This package is meant to be called on by the server.packages/webhook-service: making external webhook callspackages/fileimport-service: parsing and importing files
Other repos
Make sure to also check and ⭐️ these other Speckle repositories:
speckle-sharp-connectors: .NET connectors and desktop UIspeckle-sharp-sdk: .NET SDK, tests, and Objectsspecklepy: Python SDK 🐍speckle-sketchup: Sketchup connectorspeckle-excel: Excel connectorspeckle-unity: Unity 3D connectorspeckle-blender: Blender connectorspeckle-unreal: Unreal Engine connectorspeckle-qgis: QGIS connectorspeckle-powerbi: PowerBi connector- and more connectors & tooling!
Developing and Debugging
Have you checked our dev docs?
We have a detailed section on deploying a Speckle server. To get started developing locally, you can see the Local development environment page.
TL;DR;
We're using yarn and its workspaces functionalities to manage the monorepo. Make sure you are using Node version 22. To get started, run:
corepack enableyarnyarn build
After this, you can use the scripts in the individual packages or run them all in dev mode:
yarn dev
For development you'll also want to run yarn dev:docker:up which will start up the docker containers you will need
to be able to run the apps on your machine.
IDE
The suggested IDE for working in this repo is VSCode, because the repo has special configs to improve the DX there (auto-format & auto-lint, recommended extensions etc.).
This repository relies on VSCode multi-root workspaces, so for the best DX and proper formatting/linting make sure you open the project using the workspace.code-workspace file instead of just opening the folder in VSCode.
Proper TypeScript support
To get proper TS support in standard TS files as well as Vue files, we rely on the Volar VSCode extension - not Vetur! When you open the workspace for the very first time, VSCode should already prompt you to install this extension. The default Volar setup can be quite resource intensive, however, because there end up being standard TS Language Server instances running as well as Vue TS Language server instances. To resolve this issue we rely on Volar's Take Over Mode.
Essentially, ensure you have Volar enabled, and the built in TypeScript and JavaScript Language Features extension disabled (for this workspace)!
Useful containers
Maildev
We have a Maildev container available that you can use to see all e-mails sent out from the app. Make sure your server .env file is configured properly to use it:
EMAIL=true
EMAIL_FROM="no-reply@example.org"
EMAIL_HOST="localhost"
EMAIL_PORT="1025"
The web portal is available at localhost:1080 and it's listening for mail on port 1025.
Minio (S3 storage)
Default credentials are: minioadmin:minioadmin
Main storage Web UI: http://localhost:9001/
Region1 storage Web UI: http://localhost:9021/
You can use the web UI to validate uploaded blobs
Contributing
Please make sure you read the contribution guidelines for an overview of the best practices we try to follow.
When pushing commits to this repo, please follow the following guidelines:
- When ready to commit, run
$ yarn cz& follow the prompts.
When committing to git, an automated script will run. This will check that your commit conforms to Speckle's guidelines.
-
To enable additional checks, you may wish to optionally install the following:
-
Please note that these additional checks will be run by Speckle's automated CI environment and non-conformances, if any, may prevent your Pull Request from being merged.
-
Please use the name of the package as the scope of your commit.
-
Note that
ggshieldrequires you to register an account and then authorise with GitGuardian before it can be used:ggshield auth login -
Then run to enable pre-commit. This will run on every commit you make:
pre-commit install
Security
For any security vulnerabilities or concerns, please contact us directly at security[at]speckle.systems.
License
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via email.