speckle-server/README.md

154 строки
10 KiB
Markdown
Исходник Обычный вид История

2021-08-28 01:38:23 +03:00
<h1 align="center">
<img src="https://user-images.githubusercontent.com/2679513/131189167-18ea5fe1-c578-47f6-9785-3748178e4312.png" width="150px"/><br/>
2021-09-03 14:22:46 +03:00
Speckle | Server
</h1>
<h3 align="center">
Server and Web packages
</h3>
2021-08-28 01:38:23 +03:00
<p align="center"><b>Speckle</b> is data infrastructure for the AEC industry.</p><br/>
2020-03-27 00:45:24 +03:00
2021-08-28 01:38:23 +03:00
<p align="center"><a href="https://twitter.com/SpeckleSystems"><img src="https://img.shields.io/twitter/follow/SpeckleSystems?style=social" alt="Twitter Follow"></a> <a href="https://speckle.community"><img src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fspeckle.community&amp;style=flat-square&amp;logo=discourse&amp;logoColor=white" alt="Community forum users"></a> <a href="https://speckle.systems"><img src="https://img.shields.io/badge/https://-speckle.systems-royalblue?style=flat-square" alt="website"></a> <a href="https://speckle.guide/dev/"><img src="https://img.shields.io/badge/docs-speckle.guide-orange?style=flat-square&amp;logo=read-the-docs&amp;logoColor=white" alt="docs"></a></p>
<p align="center">
<a href="https://github.com/Speckle-Next/SpeckleServer/"><img src="https://circleci.com/gh/specklesystems/speckle-server.svg?style=svg&amp;circle-token=76eabd350ea243575cbb258b746ed3f471f7ac29" alt="Speckle-Next">
</a>
<a href="https://codecov.io/gh/specklesystems/speckle-server">
<img src="https://codecov.io/gh/specklesystems/speckle-server/branch/master/graph/badge.svg" alt="codecov">
</a>
<a href="https://results.pre-commit.ci/latest/github/specklesystems/speckle-server/main">
<img src="https://results.pre-commit.ci/badge/github/specklesystems/speckle-server/main.svg" alt="codecov">
</a>
</p>
2020-05-23 18:11:09 +03:00
2021-09-03 14:22:46 +03:00
# About Speckle
2020-05-23 18:11:09 +03:00
What is Speckle? Check our [![YouTube Video Views](https://img.shields.io/youtube/views/B9humiSpHzM?label=Speckle%20in%201%20minute%20video&style=social)](https://www.youtube.com/watch?v=B9humiSpHzM)
2020-03-27 00:45:24 +03:00
2021-08-28 01:39:05 +03:00
### Features
2020-03-27 01:08:11 +03:00
2021-08-28 01:39:05 +03:00
- **Object-based:** say goodbye to files! Speckle is the first object based platform for the AEC industry
- **Version control:** Speckle is the Git & Hub for geometry and BIM data
- **Collaboration:** share your designs collaborate with others
- **3D Viewer:** see your CAD and BIM models online, share and embed them anywhere
- **Interoperability:** get your CAD and BIM models into other software without exporting or importing
- **Real time:** get real time updates and notifications and changes
- **GraphQL API:** get what you need anywhere you want it
- **Webhooks:** the base for a automation and next-gen pipelines
- **Built for developers:** we are building Speckle with developers in mind and got tools for every stack
2022-03-22 16:59:07 +03:00
- **Built for the AEC industry:** Speckle connectors are plugins for the most common software used in the industry such as Revit, Rhino, Grasshopper, AutoCAD, Civil 3D, Excel, Unreal Engine, Unity, QGIS, Blender, ArchiCAD and more!
2020-03-27 01:08:11 +03:00
2021-08-28 01:39:05 +03:00
### Try Speckle now!
2020-07-22 14:39:57 +03:00
2021-08-28 01:38:23 +03:00
Give Speckle a try in no time by:
- [![speckle XYZ](https://img.shields.io/badge/https://-speckle.xyz-0069ff?style=flat-square&logo=hackthebox&logoColor=white)](https://speckle.xyz) ⇒ creating an account at
- [![create a droplet](https://img.shields.io/badge/Create%20a%20Droplet-0069ff?style=flat-square&logo=digitalocean&logoColor=white)](https://marketplace.digitalocean.com/apps/speckle-server?refcode=947a2b5d7dc1) ⇒ deploying an instance in 1 click
2021-08-28 01:39:05 +03:00
### Resources
2021-09-03 16:45:56 +03:00
- [![Community forum users](https://img.shields.io/badge/community-forum-green?style=for-the-badge&logo=discourse&logoColor=white)](https://speckle.community) for help, feature requests or just to hang with other speckle enthusiasts, check out our community forum!
- [![website](https://img.shields.io/badge/tutorials-speckle.systems-royalblue?style=for-the-badge&logo=youtube)](https://speckle.systems) our tutorials portal is full of resources to get you started using Speckle
- [![docs](https://img.shields.io/badge/docs-speckle.guide-orange?style=for-the-badge&logo=read-the-docs&logoColor=white)](https://speckle.guide/dev/) reference on almost any end-user and developer functionality
2021-09-03 14:22:46 +03:00
# Repo structure
2021-01-25 12:16:49 +03:00
2021-08-28 01:38:23 +03:00
This monorepo is the home of the Speckle v2 web packages:
2021-01-25 12:16:49 +03:00
- [`packages/server`](https://github.com/specklesystems/speckle-server/blob/main/packages/server): the Server, a nodejs app. Core external dependencies are a Redis and Postgresql db.
2021-08-28 01:46:54 +03:00
- [`packages/frontend`](https://github.com/specklesystems/speckle-server/blob/main/packages/frontend): the Frontend, a static Vue app.
- [`packages/viewer`](https://github.com/specklesystems/speckle-server/blob/main/packages/viewer): a threejs extension that allows you to display 3D data [![npm version](https://camo.githubusercontent.com/dc69232cc57b77de6554e752dd6dfc60ca0ecdfbe91bdfcbf7c7531a511ec200/68747470733a2f2f62616467652e667572792e696f2f6a732f253430737065636b6c652532467669657765722e737667)](https://www.npmjs.com/package/@speckle/viewer)
- [`packages/objectloader`](https://github.com/specklesystems/speckle-server/blob/main/packages/objectloader): a small js utility class that helps you stream an object and all its sub-components from the Speckle Server API. [![npm version](https://camo.githubusercontent.com/4d4f1e38ce50aaf11b4a3ad8e01ce3eaaa561dc5fd08febbae556f52f1d41097/68747470733a2f2f62616467652e667572792e696f2f6a732f253430737065636b6c652532466f626a6563746c6f616465722e737667)](https://www.npmjs.com/package/@speckle/objectloader)
2021-08-28 01:47:24 +03:00
- [`packages/preview-service`](https://github.com/specklesystems/speckle-server/blob/main/packages/preview-service): generates object previews for Speckle Objects headlessly. This package is meant to be called on by the server.
- [`packages/webhook-service`](https://github.com/specklesystems/speckle-server/tree/main/packages/webhook-service): making external webhook calls
- [`packages/fileimport-service`](https://github.com/specklesystems/speckle-server/tree/main/packages/fileimport-service): parsing and importing files
2021-08-28 01:46:54 +03:00
### Other repos
2021-05-14 19:41:28 +03:00
2021-08-28 01:38:23 +03:00
Make sure to also check and ⭐️ these other Speckle repositories:
2021-09-03 14:22:46 +03:00
- [`speckle-sharp`](https://github.com/specklesystems/speckle-sharp): .NET tooling, connectors and interoperability
- [`specklepy`](https://github.com/specklesystems/specklepy): Python SDK 🐍
- [`speckle-excel`](https://github.com/specklesystems/speckle-excel): Excel connector
- [`speckle-unity`](https://github.com/specklesystems/speckle-unity): Unity 3D connector
- [`speckle-blender`](https://github.com/specklesystems/speckle-blender): Blender connector
2022-07-23 22:10:58 +03:00
- [`speckle-unreal`](https://github.com/specklesystems/speckle-unreal): Unreal Engine connector
- [`speckle-qgis`](https://github.com/specklesystems/speckle-qgis): QGIS connector
2021-09-03 14:22:46 +03:00
- [`speckle-powerbi`](https://github.com/specklesystems/speckle-powerbi): PowerBi connector
2021-11-29 15:12:07 +03:00
- and more [connectors & tooling](https://github.com/specklesystems/)!
2021-08-28 01:39:05 +03:00
## Developing and Debugging
2021-08-28 01:39:05 +03:00
Have you checked our [dev docs](https://speckle.guide/dev/)?
We have a detailed section on [deploying a Speckle server](https://speckle.guide/dev/server-setup.html). To get started developing locally, you can see the [Local development environment](https://speckle.guide/dev/server-local-dev.html) page.
gergo/yarn (#753) * yarn first go * fix frontend build cache loader * yarn workspaces built server Docker * build(yarn): add workspaces plugin config * chore(package defs): clean package*.json -s * chore(gitignore): ignore yarn error log * build(yarn): update yarn lock * build(preview-service webpack): add extra resolved path to preview service webpack config because of yarn package hoisting, there are no package level node_modules folder anymore. * build(docker): update dockerignore with yarn specific configs * build(docker): update Dockerfiles for yarn workspaces utilization * ci(circleci): update server test job to yarn * ci(circle): disable cache restore * ci(circleci): trying the node orb yarn-run * ci(circleci): yarn-run again * ci(circleci): disable node orb * ci(circleci): change base node image for tests * ci(circleci): add yarn cache * ci(circleci): remove node install step * ci(circleci): add server specific cache archives * ci(circleci): test build and publish * ci(circleci): change npm auth method to suit yarn * ci(circleci): trying new builder image * ci(circleci): another base image, maybe this works * ci(circleci): force a specific docker engine version * ci(circleci): add yarn version plugin and its changes * ci(circleci): cleanup and remove temp branch config * chore(package defs): moving from npm run to yarn * explicitly specifying webpack4 as a frontend dep * chore(package defs): replace npm with yarn everywhere * docs(root readme): update with some yarn specific docs * chore(root workspace): update dev scripts and package lock * ci(circleci): enable package publish step with yarn Co-authored-by: Fabians <fabis94@live.com>
2022-05-19 20:53:07 +03:00
### TL;DR;
We're using yarn and its workspaces functionalities to manage the monorepo.
Make sure you are using nodejs 16+.
To get started, run:
`$ corepack enable`
`$ yarn`
`$ yarn build`
After this, you can use the scripts in the individual packages or run 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](https://code.visualstudio.com/docs/editor/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](https://github.com/johnsoncodehk/volar/discussions/471).
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](https://github.com/maildev/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="speckle@speckle.local"
EMAIL_HOST="localhost"
EMAIL_PORT="1025"
```
The web portal is available at `localhost:1080` and it's listening for mail on port `1025`.
2021-08-28 01:39:05 +03:00
### Contributing
2021-08-28 01:39:05 +03:00
Please make sure you read the [contribution guidelines](https://github.com/specklesystems/speckle-server/blob/main/CONTRIBUTING.md) for an overview of the best practices we try to follow.
2021-08-28 01:38:23 +03:00
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:
- [`pre-commit`](https://pre-commit.com/#install)
- [`hadolint`](https://github.com/hadolint/hadolint#install)
- [`shellcheck`](https://github.com/koalaman/shellcheck#installing)
- [`helm`](https://helm.sh/docs/intro/install/)
- 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.
gergo/yarn (#753) * yarn first go * fix frontend build cache loader * yarn workspaces built server Docker * build(yarn): add workspaces plugin config * chore(package defs): clean package*.json -s * chore(gitignore): ignore yarn error log * build(yarn): update yarn lock * build(preview-service webpack): add extra resolved path to preview service webpack config because of yarn package hoisting, there are no package level node_modules folder anymore. * build(docker): update dockerignore with yarn specific configs * build(docker): update Dockerfiles for yarn workspaces utilization * ci(circleci): update server test job to yarn * ci(circle): disable cache restore * ci(circleci): trying the node orb yarn-run * ci(circleci): yarn-run again * ci(circleci): disable node orb * ci(circleci): change base node image for tests * ci(circleci): add yarn cache * ci(circleci): remove node install step * ci(circleci): add server specific cache archives * ci(circleci): test build and publish * ci(circleci): change npm auth method to suit yarn * ci(circleci): trying new builder image * ci(circleci): another base image, maybe this works * ci(circleci): force a specific docker engine version * ci(circleci): add yarn version plugin and its changes * ci(circleci): cleanup and remove temp branch config * chore(package defs): moving from npm run to yarn * explicitly specifying webpack4 as a frontend dep * chore(package defs): replace npm with yarn everywhere * docs(root readme): update with some yarn specific docs * chore(root workspace): update dev scripts and package lock * ci(circleci): enable package publish step with yarn Co-authored-by: Fabians <fabis94@live.com>
2022-05-19 20:53:07 +03:00
- Please use the name of the package as the scope of your commit.
2020-04-20 18:56:13 +03:00
2021-08-28 01:39:05 +03:00
### Security
2021-05-23 18:27:04 +03:00
2021-08-28 01:38:23 +03:00
For any security vulnerabilities or concerns, please contact us directly at security[at]speckle.systems.
2021-05-23 18:27:04 +03:00
2021-08-28 01:39:05 +03:00
### License
2021-01-06 19:42:56 +03:00
2021-08-28 01:39:05 +03:00
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](mailto:hello@speckle.systems).