text
stringlengths
34
4.22k
embeddings
listlengths
768
768
```js export const APP_NAME = process.env.VUE_APP_SPECKLE_NAME export const SERVER_URL = process.env.VUE_APP_SERVER_URL export const TOKEN = `${APP_NAME}.AuthToken` export const REFRESH_TOKEN = `${APP_NAME}.RefreshToken` export const CHALLENGE = `${APP_NAME}.Challenge`
[ -0.18539971113204956, -0.2622222900390625, 0.11087363213300705, -0.026728074997663498, -0.25472453236579895, 0.8764894008636475, 0.17206917703151703, -0.026750000193715096, 0.6094154119491577, 0.7305917739868164, -0.9592511057853699, -0.5922268033027649, -0.16459877789020538, -0.0220651347...
// Redirects to the Speckle server authentication page, using a randomly generated challenge. Challenge will be stored to compare with when exchanging the access code. export function goToSpeckleAuthPage() { // Generate random challenge var challenge = Math.random() .toString(36) .substring(2,...
[ -0.08145027607679367, -0.32328641414642334, 0.31056419014930725, 0.057259105145931244, -0.13637897372245789, 0.39433273673057556, 0.23790541291236877, -0.22302672266960144, 0.568920373916626, 0.7720341682434082, -0.6627110242843628, -0.7392138838768005, -0.062167175114154816, 0.10784261673...
// Log out the current user. This removes the token/refreshToken pair. export function speckleLogOut() { // Remove both token and refreshToken from localStorage localStorage.removeItem(TOKEN) localStorage.removeItem(REFRESH_TOKEN) }
[ -0.26500454545021057, -0.5887309908866882, -0.02566039189696312, -0.18058697879314423, -0.8091806769371033, 0.9604844450950623, -0.06475730240345001, -0.4022858142852783, 0.6280535459518433, 1.0488346815109253, -0.447184294462204, -0.33585822582244873, -0.14755938947200775, -0.102070495486...
// Exchanges the provided access code with a token/refreshToken pair, and saves them to local storage. export async function exchangeAccessCode(accessCode) { var res = await fetch(`${SERVER_URL}/auth/token/`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.st...
[ -0.016385981813073158, -0.10142832249403, 0.11664525419473648, -0.0055039445869624615, -0.2061578631401062, 0.6000754237174988, 0.048551253974437714, 0.013557772152125835, 0.6296713948249817, 0.8159734010696411, -0.46269911527633667, -0.5732768774032593, 0.04378316178917885, 0.171399489045...
Since we're using `vuex` to manage the state of our application, we'll also add the redirect, exchange and logout logic as `actions`. We can then invoke them in any of our application components.
[ -0.145156130194664, -0.46548017859458923, 0.4854857325553894, -0.0902564600110054, -0.023626985028386116, -0.20899289846420288, 0.4851146638393402, -0.09860430657863617, 0.4532374143600464, 1.0501173734664917, -0.7328904271125793, -0.5156358480453491, 0.2859192490577698, -0.030631976202130...
Replace the contents of the file `src/store/index.js` with the following:
[ -0.018727164715528488, 0.09582892805337906, 0.21906909346580505, -0.0645061805844307, -0.3028618395328522, 0.8623709678649902, -0.058422576636075974, -0.16351385414600372, 1.2681504487991333, 0.514655590057373, -0.5398229360580444, -0.5519742369651794, -0.27977898716926575, 0.1126579269766...
import { exchangeAccessCode, getUserData, goToSpeckleAuthPage, speckleLogOut } from "@/speckleUtils"
[ -0.3886755406856537, -0.16240458190441132, 0.2150767743587494, -0.10861039906740189, 0.0747251808643341, 0.7690016031265259, 0.3052421808242798, -0.41578078269958496, 0.9397624135017395, 1.1148724555969238, -0.4137810468673706, -0.30570510029792786, -0.15469777584075928, -0.133950933814048...
export default new Vuex.Store({ state: {}, getters: {}, mutations: {}, actions: { logout(context) { // Wipe the state
[ -0.09954562783241272, -0.054242152720689774, 0.1369549185037613, -0.8064460754394531, -0.13398320972919464, -0.09468667954206467, 0.10873446613550186, 0.1548139750957489, 0.3776228725910187, 1.0014846324920654, -0.6580966114997864, -0.7026517987251282, -0.017816212028265, -0.00910489633679...
// Wipe the tokens speckleLogOut() }, exchangeAccessCode(context, accessCode) { // Here, we could save the tokens to the store if necessary. return exchangeAccessCode(accessCode) }, redirectToAuth() { // Use the speckleUtils redirect logic goToSpeckleAuthPage...
[ -0.12699028849601746, -0.20338797569274902, 0.002876637503504753, 0.22625675797462463, -0.4545987546443939, 0.18359269201755524, 0.08291422575712204, -0.058575183153152466, 0.7497159838676453, 1.0703678131103516, -0.4522936940193176, -0.6479218006134033, -0.05903695523738861, -0.0783732533...
We can now use these actions in any component by calling `this.$store.dispatch(ACTION_NAME, ...params)`.
[ 0.05505344644188881, -0.4206121265888214, 0.43493029475212097, 0.26835691928863525, -0.3090827763080597, -0.5470744967460632, 0.5401005744934082, 0.016547398641705513, 0.6089261174201965, 1.1678224802017212, -0.8994885087013245, -0.7055517435073853, 0.23317460715770721, -0.0698001533746719...
In your `App.vue` file, replace it's contents with the following:
[ -0.2791939675807953, -0.1984589695930481, -0.01880650781095028, -0.1321403682231903, -0.5027335286140442, 0.7279794812202454, 0.32659393548965454, -0.0023063209373503923, 0.8891385197639465, 1.0452852249145508, -0.4754329323768616, -0.71260005235672, -0.38990646600723267, -0.18502314388751...
```vue <template lang="html"> <v-app> <v-app-bar app color="primary" dark> <div class="d-flex align-center"> <v-img alt="Speckle Logo" class="shrink mr-2" contain :src="require(`@/assets/img.png`)" transition="scale-transition" w...
[ -0.7037507891654968, -0.18862773478031158, 0.25875335931777954, -0.06873448938131332, -0.42284542322158813, 0.5997461080551147, 0.31601420044898987, -0.09261216223239899, 0.766323983669281, 0.15603652596473694, -1.0684354305267334, -0.38308003544807434, -0.3289421796798706, -0.205895438790...
<v-btn outlined v-if="!isAuthenticated" @click="$store.dispatch('redirectToAuth')" > <span>Login with Speckle</span> </v-btn> <v-btn outlined v-else @click="$store.dispatch('logout')"> Log out </v-btn> </v-app-bar>
[ -0.053891438990831375, -0.5664682984352112, 0.3611139953136444, -0.04330459237098694, -0.23266737163066864, 0.5772032141685486, 0.19149330258369446, -0.05908910185098648, 0.9363601803779602, 0.5552432537078857, -1.0184276103973389, -0.9029875993728638, -0.2169102430343628, 0.05550255626440...
<v-main> <!-- <router-view /> --> </v-main> </v-app> </template>
[ -0.9722762107849121, -0.15559791028499603, 0.4628399610519409, -0.20321744680404663, -0.2075897753238678, 0.22787818312644958, 0.6430055499076843, 0.3635001480579376, 0.885227382183075, 1.1076633930206299, -0.6468832492828369, -0.6461327075958252, -0.25494134426116943, -0.3887043297290802,...
<script> export default { name: "App", computed: { isAuthenticated() { return false } } } </script> ``` :::
[ -0.12246442586183548, -0.5455917119979858, 0.3213247060775757, -0.1419554203748703, -0.35138970613479614, 0.6196499466896057, 0.33109861612319946, 0.20895014703273773, 0.7731745839118958, 1.057781457901001, -0.6623948216438293, -1.2709637880325317, -0.2740340530872345, -0.06407900154590607...
If you are following this step by step and not working with a clone of the final code, you should now add the image referenced in the code above to the `src/assets/img.png` path. You can grab just that file [here](https://raw.githubusercontent.com/specklesystems/speckle-demo-app/master/src/assets/img.png). :::
[ -0.45965519547462463, 0.301264226436615, 0.3227122724056244, 0.21696363389492035, -0.7483024001121521, 0.7245248556137085, 0.19961832463741302, -0.24571239948272705, 0.9458991885185242, 0.6615322828292847, -0.4943820834159851, -0.29168954491615295, -0.5355709791183472, -0.2501172721385956,...
Notice there's an `isAuthenticated` computed property that defaults to `false` for now (we'll update it later). There's also a pair of `v-btn` buttons linked to this boolean value. When there is no user authenticated, we'll show the login button, and when there is a user authenticated, we'll show the Log Out button.
[ -0.10420860350131989, -0.7627445459365845, 0.4302665591239929, -0.27430862188339233, -0.2003554403781891, 0.3371136784553528, 0.4860694408416748, -0.2736242711544037, 0.4910014867782593, 0.7956560254096985, -0.7443626523017883, -0.6083069443702698, -0.3213917016983032, -0.08424491435289383...
Each is bound to the actions in the store we created earlier.
[ 0.17393618822097778, -0.09494335949420929, 0.5987086892127991, -0.14279699325561523, 0.2957195043563843, -0.19352425634860992, 0.33719485998153687, -0.5270490050315857, 0.5403335690498352, 1.183382511138916, -0.91551274061203, -0.18261326849460602, -0.093902587890625, 0.08552813529968262, ...
```html <v-btn outlined v-if="!isAuthenticated" @click="$store.dispatch('redirectToAuth')" > <span>Login with Speckle</span> </v-btn> <v-btn outlined v-else @click="$store.dispatch('logout')"> Log out </v-btn> ```
[ 0.0043324134312570095, -0.6115548014640808, 0.37593647837638855, 0.024398235604166985, -0.23879866302013397, 0.5329967737197876, 0.06534557044506073, -0.024721501395106316, 0.9001731276512146, 0.36255359649658203, -1.0271137952804565, -0.9383605122566223, -0.22206680476665497, 0.0946515575...
At this point in time, your App should display only a menu bar with the title and the Log In button.
[ -0.07429584860801697, -0.1810304969549179, 0.6934844851493835, 0.39949798583984375, -0.6204558610916138, 0.9067054986953735, 0.32997673749923706, -0.1774105429649353, 0.6595155596733093, 0.8962546586990356, -0.8742958307266235, -0.5463835000991821, -0.04642130434513092, 0.06829728186130524...
Now press the Log In button, follow the steps in the server and allow the app to access your data. This will take you back to `http://localhost:8080`. But notice the url will now contain a trailing `?access_code=YOUR_ACCESS_CODE`, we can now edit our `src/router/index.js` file to exchange the access code whenever it fi...
[ -0.2834964692592621, -0.3093867897987366, 0.26205459237098694, -0.12896011769771576, -0.03204309195280075, 0.7892256379127502, 0.34713518619537354, 0.06041278317570686, 0.7235811948776245, 0.9008470773696899, -0.7020384073257446, -0.621412456035614, 0.17750106751918793, 0.13854862749576569...
In order to exchange the access code automatically whenever it is provided in the url, we're going to use one of `vue-router`'s features. `vue-router` is the plugin that handles url routes in your app, it also parses query values and url parameters so you won't have to.
[ -0.3308553695678711, -0.31721746921539307, 0.30720269680023193, 0.2131015658378601, -0.16512730717658997, -0.039457980543375015, 0.6057581901550293, -0.15683309733867645, 0.21894967555999756, 0.6889855265617371, -0.8035173416137695, -0.3998638093471527, 0.003504100488498807, 0.147379502654...
We can implement a `beforeEach` handler, that will allow us to run some code right before each page is loaded in our app. At this point, we'll check if it contains an access code and if so, exchange it.
[ -0.6452667713165283, 0.27853384613990784, 0.4525245130062103, 0.1947779804468155, 0.10033773630857468, -0.03073764033615589, 0.6820555925369263, -0.41348302364349365, 0.3359927535057068, 1.00684654712677, -0.746454119682312, -0.4213809669017792, -0.025581952184438705, -0.07612725347280502,...
Open your `src/router/index.js` file and add this code right above the `export default router` line.
[ -0.6724883913993835, 0.44901779294013977, 0.11203528940677643, -0.3997892737388611, -0.23210866749286652, 0.4169125556945801, 0.46443668007850647, 0.41148412227630615, 1.1057666540145874, 0.7587327361106873, -0.6057140827178955, -0.7514564394950867, 0.1353670060634613, -0.02207077108323574...
```js // This import can go at the top of the file import store from '@/store'
[ -0.20395545661449432, -0.2263139933347702, 0.42396146059036255, 0.11283201724290848, 0.16636407375335693, 1.1615370512008667, 0.18802106380462646, -0.15570639073848724, 0.5514107346534729, 0.614447295665741, -0.6754581928253174, -0.726266086101532, -0.2726800739765167, 0.0456310510635376, ...
router.beforeEach(async (to, from, next) => { if (to.query.access_code) { // If the route contains an access code, exchange it try { await store.dispatch("exchangeAccessCode", to.query.access_code) } catch (err) { console.warn("exchange failed", err) } // Whatever happens, go h...
[ 0.08483761548995972, -0.0711822360754013, 0.2645252048969269, 0.2227555513381958, 0.0953383594751358, 0.3158748149871826, 0.3639845550060272, -0.09391710162162781, 0.5527570247650146, 0.603961169719696, -0.9079590439796448, -0.6192638278007507, -0.4659753739833832, -0.16007748246192932, ...
Now, press the Log In button again, allow the app to access your account and wait for the redirect to the app. Once it's done, you should have 2 variables stored in `localStorage`: `Speckle Demo App.AuthToken` and `Speckle Demo App.RefreshToken`
[ -0.3165479898452759, -0.0878569632768631, 0.25003835558891296, 0.26509973406791687, -0.4645201563835144, 0.6980596780776978, 0.10517461597919464, -0.1282469779253006, 0.7826250791549683, 0.8194578289985657, -0.28270477056503296, -0.11708329617977142, -0.2569202780723572, 0.1569910496473312...
At this point, we've managed to save our authentication token but our app still cannot discern if your users are authenticated or not (remember the `isAuthenticated` computed property in `App.vue`). We'll add this on the next step.
[ -0.2109188586473465, -0.28941968083381653, 0.25720861554145813, 0.11066243052482605, 0.06729806959629059, 0.4926060438156128, 0.5039871335029602, -0.05963125452399254, 0.597096860408783, 0.7598740458488464, -0.4828655421733856, -0.4660547077655792, -0.31338706612586975, 0.11665128171443939...
In order for our app to know **who** we are, it needs to fetch our user's data. The best place to fetch, and store, this data, is in our `store`.
[ -0.841825544834137, 0.05862252786755562, 0.2545904517173767, -0.1321984976530075, -0.023054316639900208, 0.20703770220279694, 0.22023843228816986, -0.6915102601051331, 0.23661407828330994, 0.50656658411026, -0.7262519598007202, -0.4517453610897064, -0.10264454036951065, -0.0096256593242287...
Add the following function to our `speckleQueries.js` file. This is the graphQL query that will fetch the user and server info.
[ -0.4409863352775574, -0.41561704874038696, 0.07101237773895264, -0.3310491442680359, -0.150675967335701, 0.8912975192070007, 0.19776137173175812, -0.41796573996543884, 1.0361067056655884, 1.2019860744476318, -0.6636162996292114, -0.8086522817611694, -0.23747263848781586, -0.140185505151748...
```js export const userInfoQuery = () => `query { user { name }, serverInfo { name company } }` ```
[ -0.1357329785823822, -0.23208585381507874, 0.10152536630630493, -0.5711894035339355, -0.20220711827278137, 0.7054935693740845, -0.0300237238407135, -0.09639286994934082, 0.6000658869743347, 1.0517685413360596, -0.8217778205871582, -1.0109288692474365, 0.024308040738105774, 0.06827776134014...
Add this to the `src/speckleUtils.js` file. Remember to import `userInfoQuery`.
[ -0.40544867515563965, 0.6690232157707214, 0.08732733875513077, 0.7029731869697571, -0.3124659061431885, 0.9148005247116089, 0.13602659106254578, -0.49322712421417236, 0.9972132444381714, 0.9519268870353699, -0.45576050877571106, -0.7101186513900757, -0.11313925683498383, -0.040764756500720...
// Calls the GraphQL endpoint of the Speckle server with a specific query. export async function speckleFetch(query) { let token = localStorage.getItem(TOKEN) if (token) try { var res = await fetch(`${SERVER_URL}/graphql`, { method: "POST", headers: { Authorization: "Bear...
[ -0.2925739586353302, -0.45097804069519043, 0.07105350494384766, -0.13526180386543274, -0.33480438590049744, 1.0293141603469849, 0.14704036712646484, -0.319253534078598, 0.9776496291160583, 0.7290889024734497, -0.6142370700836182, -0.8473619818687439, -0.19866344332695007, 0.158934131264686...
// Fetch the current user data using the userInfoQuery export const getUserData = () => speckleFetch(userInfoQuery()) ```
[ -0.3730334937572479, -0.07320795953273773, -0.07883626967668533, -0.4727257490158081, -0.6346935629844666, 0.951304018497467, 0.10747938603162766, -0.2336137443780899, 0.7487245798110962, 1.1446495056152344, -0.6242381930351257, -0.5938887000083923, 0.07734814286231995, -0.0079038897529244...
Replace the contents of your `src/store/index.js` with the following code:
[ -0.019005000591278076, 0.10386655479669571, 0.18570370972156525, 0.0008335657767020166, -0.18914470076560974, 0.9532575011253357, -0.023739809170365334, -0.10272129625082016, 1.2212485074996948, 0.5194730162620544, -0.7517558336257935, -0.6653450727462769, -0.187798872590065, 0.02250523492...
import { exchangeAccessCode, getStreamCommits, getUserData, goToSpeckleAuthPage, speckleLogOut } from "@/speckleUtils"
[ -0.3634796440601349, -0.2203812301158905, 0.19655077159404755, -0.20097799599170685, -0.037164948880672455, 0.796879768371582, 0.20255671441555023, -0.4966588616371155, 1.023553729057312, 1.1458289623260498, -0.4568355083465576, -0.2517046630382538, -0.46159979701042175, -0.014224293641746...
export default new Vuex.Store({ state: { user: null, serverInfo: null }, getters: { isAuthenticated: state => state.user != null }, mutations: { setUser(state, user) { state.user = user }, setServerInfo(state, info) { state.serverInfo = info } }, act...
[ 0.14357875287532806, -0.061962731182575226, 0.10965123027563095, -0.2547253370285034, -0.03149726614356041, 0.3477776348590851, 0.10312072932720184, 0.05138624832034111, 0.5455235242843628, 0.8640798926353455, -0.6569278240203857, -0.7369319200515747, -0.06076323240995407, 0.25108051300048...
Now, in the `App.vue` file, modify the `isAuthenticated` computed property as shown:
[ -0.0436665378510952, -0.3079529106616974, 0.10014673322439194, -0.0010693238582462072, -0.12044833600521088, 0.39808014035224915, 0.4111327528953552, -0.14217935502529144, 0.8627409338951111, 1.234490990638733, -0.39565959572792053, -0.5787772536277771, -0.4004342257976532, -0.176370829343...
```js isAuthenticated() { return this.$store.getters.isAuthenticated } ```
[ 0.49885615706443787, -0.16711197793483734, 0.3208886682987213, 0.08026781678199768, 0.10397219657897949, 0.6039226651191711, 0.22541245818138123, -0.07980167120695114, 0.5464634895324707, 0.9232942461967468, -0.8058508634567261, -0.6920023560523987, -0.4670315384864807, 0.0633629560470581,...
Also, in the `template` section, add the following on top of the Login/Logout buttons
[ -0.682553231716156, 0.025590205565094948, 0.2988804876804352, -0.16192559897899628, -0.5062169432640076, 0.7106990218162537, 0.21509325504302979, 0.09066610783338547, 0.5784261226654053, 0.5489604473114014, -0.38213911652565, -0.6931300759315491, -0.18938441574573517, -0.27301833033561707,...
```html <div v-if="isAuthenticated"> Welcome <b>{{ $store.state.user.name }}</b> ! You are connected to <b> {{ $store.state.serverInfo.company }}'s <em>{{ $store.state.serverInfo.name }}</em> </b> </div>
[ -0.1525479555130005, -0.44559353590011597, 0.6097632050514221, -0.36844971776008606, -0.13315242528915405, 0.6213928461074829, 0.3509964346885681, -0.0045977807603776455, 0.7036353349685669, 0.42823532223701477, -1.0968480110168457, -0.8087440729141235, -0.3470958173274994, 0.2182869613170...
The only thing left to do is to also tell the `router` to check the `user` on every page change. For this, modify the `beforeEach` implementation by adding an `else` clause to our previous condition
[ -0.4384438991546631, -0.06960377842187881, 0.46674853563308716, -0.2958657443523407, -0.18925906717777252, -0.10902294516563416, 0.34113648533821106, -0.1003919392824173, 0.30824679136276245, 1.034724473953247, -0.7554780840873718, -0.27310094237327576, -0.41586020588874817, -0.02079044282...
```js router.beforeEach(async (to, from, next) => { if (to.query.access_code) { // If the route contains an access code, exchange it try { await store.dispatch("exchangeAccessCode", to.query.access_code) } catch (err) { console.warn("exchange failed", err) } // Whatever happen...
[ 0.19660675525665283, -0.12332148849964142, 0.3001708984375, 0.03456064686179161, 0.22351443767547607, 0.44477322697639465, 0.25698232650756836, -0.08916779607534409, 0.5167746543884277, 0.6781171560287476, -0.9290567636489868, -0.7494956254959106, -0.39775708317756653, -0.04246500506997108...
That should do it! Now, if you refresh the page you should see a welcome message with your user name and the server name you connected to, as well as the `Log Out` button:
[ -0.6618360280990601, -0.38537871837615967, 0.26386409997940063, -0.318315327167511, -0.26965606212615967, 0.6256605386734009, 0.006272609811276197, -0.15608304738998413, 0.8669263124465942, 0.8095837831497192, -1.2951802015304565, -0.30432701110839844, -0.15345200896263123, 0.1890860944986...
Now that we have access to our user and server data in our app, and also distinguish when a user is logged in or not, we can start fetching other info from our server. Let's start with a **stream search** field. The selected stream will also be stored in `vuex`, so we'll also add the appropriate state props, methods an...
[ -0.4994141757488251, -0.26280733942985535, 0.4866889715194702, -0.5669883489608765, -0.22613990306854248, 0.31176480650901794, 0.39370858669281006, -0.5456183552742004, 0.5494104027748108, 0.9836376905441284, -0.6888507008552551, -0.23840495944023132, -0.13095226883888245, -0.1118192449212...
```js export const streamSearchQuery = search => `query { streams(query: "${search}") { totalCount cursor items { id name updatedAt } } }` ```
[ 0.058667849749326706, -0.4249002933502197, 0.33022642135620117, -0.3822762966156006, -0.43946146965026855, 0.7593962550163269, 0.1443723440170288, 0.3131304979324341, 1.07632315158844, 0.4445899426937103, -0.6289735436439514, -0.6438004374504089, -0.6522371768951416, -0.008982253260910511,...
Then add the following function to `speckleUtils.js`. We'll use it to fetch the search results in our `SpeckleSearch` component (2 steps below)
[ -0.6037083268165588, 0.1584150642156601, 0.4124410152435303, 0.17545557022094727, -0.5777665376663208, 0.46269726753234863, 0.20795457065105438, -0.32858604192733765, 1.1665948629379272, 0.6640294194221497, -0.6243894696235657, -0.6345780491828918, -0.2530977129936218, -0.2368822544813156,...
```js // Update the import to include the streamSearchQuery import { userInfoQuery, streamSearchQuery } from "@/speckleQueries"
[ -0.22036007046699524, 0.6941957473754883, 0.2579958736896515, 0.03512720763683319, 0.06285864859819412, 1.0970802307128906, 0.13248330354690552, -0.4777553081512451, 0.9949289560317993, 0.8652104139328003, -0.5658555030822754, -0.3324451148509979, -0.20731300115585327, -0.02075784094631672...
Modify `src/store/index.js` as shown in the following code block. We've just added a `currentStream` property to the state, a `setCurrentStream` mutation and two actions, `handleStreamSelection` and `clearStreamSelection`. This will allow us to save the user selection in our app state.
[ -0.5266807675361633, -0.03086089715361595, 0.20910519361495972, -0.41905808448791504, -0.03901701048016548, 0.383832722902298, -0.05113668739795685, 0.02654959261417389, 1.090130090713501, 0.9385350346565247, -0.7124031186103821, -0.3042754828929901, -0.180311918258667, 0.04012761637568474...
import { exchangeAccessCode, getUserData, goToSpeckleAuthPage, speckleLogOut } from "@/speckleUtils"
[ -0.3886755406856537, -0.16240458190441132, 0.2150767743587494, -0.10861039906740189, 0.0747251808643341, 0.7690016031265259, 0.3052421808242798, -0.41578078269958496, 0.9397624135017395, 1.1148724555969238, -0.4137810468673706, -0.30570510029792786, -0.15469777584075928, -0.133950933814048...
export default new Vuex.Store({ state: { user: null, serverInfo: null, currentStream: null, }, getters: { isAuthenticated: state => state.user != null }, mutations: { setUser(state, user) { state.user = user }, setServerInfo(state, info) { state.serverInfo...
[ 0.02123848907649517, -0.018682800233364105, 0.165953129529953, -0.23108656704425812, -0.15262694656848907, 0.4014669358730316, 0.09284626692533493, 0.010232463479042053, 0.5578382611274719, 0.8988886475563049, -0.6458065509796143, -0.684198260307312, -0.18753257393836975, 0.265527158975601...
Now we'll create a new component called `StreamSearch.vue` to handle all the search UI in one place.
[ -0.437712162733078, -0.2342328578233719, 0.5203685760498047, -0.14813776314258575, -0.22240883111953735, 0.09363595396280289, 0.603473424911499, 0.12401412427425385, 1.159610629081726, 0.7529959678649902, -0.9562656879425049, -0.3997748792171478, -0.3195306956768036, -0.41697561740875244, ...
```vue <template> <v-autocomplete v-model="selectedSearchResult" :items="streams.items" :search-input.sync="search" no-filter counter="2" rounded filled dense flat hide-no-data hide-details placeholder="Streams Search" item-text="name" item-value...
[ -0.44009602069854736, -0.21371757984161377, 0.38989925384521484, -0.3233173191547394, -0.37085098028182983, 0.2568669319152832, 0.341573566198349, 0.12056300789117813, 0.7919077277183533, 0.3137233257293701, -0.861455500125885, -0.5112839937210083, -0.5262256860733032, -0.0737534761428833,...
<script> import { debounce } from "debounce" import { searchStreams } from "@/speckleUtils" import { TimeAgo } from 'vue2-timeago'
[ -0.22987806797027588, 0.005333662498742342, 0.22347332537174225, 0.11929567158222198, -0.4568498432636261, 0.8992754817008972, 0.6022465229034424, -0.3578822910785675, 0.8346604108810425, 0.5302931666374207, -0.5237628817558289, -0.41021132469177246, -0.628634512424469, -0.3996324837207794...
export default { name: "StreamSearch", data: () => ({ search: "", streams: { items: [] }, selectedSearchResult: null }), components: { TimeAgo }, watch: { selectedSearchResult(val) { this.search = "" this.streams.items = [] if (val) this.$emit("selected", val) ...
[ -0.03157035633921623, -0.24237437546253204, 0.7296048998832703, -0.600822925567627, -0.5708996057510376, 0.7141935229301453, 0.15795549750328064, 0.21703830361366272, 0.7255731225013733, 0.517535388469696, -0.9916468858718872, -0.7719704508781433, -0.7639130353927612, -0.21353650093078613,...
Create also a simple `WelcomeView.vue` to show to our non-authenticated users.
[ -0.42719757556915283, 0.11385428160429001, 0.24561934173107147, -0.04173552617430687, -0.4794459640979767, 0.2446822226047516, 0.7293610572814941, -0.21187828481197357, 1.0313724279403687, 0.9749206900596619, -0.7151912450790405, -0.7637376189231873, -0.4420713782310486, -0.070907816290855...
```vue <template lang="html"> <v-container fill-height fluid class="home flex-column justify-center align-center primary--text" > <h1>Welcome to the Speckle Demo App!</h1> <h3>This app part of our developer guides</h3> <p>Please log in to access you Speckle data.</p> </v-containe...
[ -0.49875953793525696, -0.16348351538181305, 0.26046252250671387, 0.17079128324985504, -0.43527689576148987, 0.5194105505943298, 0.23136182129383087, 0.1084565818309784, 0.8305985331535339, 0.47534480690956116, -0.8025615215301514, -0.8932971358299255, -0.42537251114845276, -0.3416481614112...
```vue <template lang="html"> <WelcomeView v-if="!$store.getters.isAuthenticated" /> <v-container v-else class="home pa-6"> <stream-search @selected="$store.dispatch('handleStreamSelection', $event)" /> <h2 class="pt-6 primary--text"> <span v-if="selectedStream"> {{ selected...
[ -0.46417608857154846, -0.36452099680900574, 0.4327227771282196, -0.14767654240131378, -0.4856480062007904, 0.07068440318107605, 0.2350408285856247, -0.09507952630519867, 0.5964614748954773, 0.5996925234794617, -0.9054657220840454, -0.5219325423240662, -0.514615535736084, 0.0360899753868579...
export default { name: "HomeView", components: { WelcomeView, StreamSearch }, data: () => { return { serverUrl: process.env.VUE_APP_SERVER_URL } }, methods: {}, computed: { selectedStream: function() { return this.$store.state.currentStream } } } </script> ```
[ -0.2157515585422516, -0.0076825558207929134, 0.30549660325050354, -0.6436977982521057, -0.44742298126220703, 0.6422218084335327, 0.002664189552888274, 0.5709816217422485, 0.6575736403465271, 1.0244942903518677, -0.8267444372177124, -0.8528228402137756, -0.1963822990655899, -0.1599324643611...
In `App.vue` there is a commented line referencing the `<router-view/>`. Uncomment it.
[ -0.46671023964881897, -0.1822185218334198, 0.06025387719273567, -0.33659565448760986, -0.45138075947761536, 0.41720280051231384, 0.6864939332008362, 0.11000645905733109, 0.6809687614440918, 1.163594126701355, -0.8625195622444153, -0.30375030636787415, -0.26839661598205566, -0.2231646776199...
After making these changes, your app should display a welcome message when not logged in and the search bar and selection text when logged in.
[ -0.3716879189014435, 0.02301853336393833, 0.6665167808532715, 0.040245674550533295, -0.4353921711444855, 0.6903702020645142, 0.0406467579305172, -0.4850606620311737, 1.3385783433914185, 0.9034013152122498, -0.8216972947120667, -0.27785080671310425, -0.5587705373764038, 0.424080491065979, ...
Introducing some text into the search bar should display a list of results in a dropdown. Selecting one of the result items will change the selection text from `No stream selected` to display the selected Stream name and id, as well as 2 buttons. The first one will take you to the stream page in the server, while the s...
[ -0.83484947681427, -0.5618099570274353, 0.5931842923164368, -0.31436842679977417, -0.5421685576438904, 0.5033068060874939, 0.06152300164103508, -0.21132566034793854, 1.2121427059173584, 0.6694527864456177, -0.8469971418380737, -0.195280522108078, -0.4486488699913025, 0.11623536795377731, ...
So far, we've managed to authenticate with our Speckle server, fetch user and server information and search for available streams, as well as storing the results in our app state.
[ -0.7263530492782593, -0.1124386340379715, 0.5231940150260925, -0.2895609736442566, -0.14860907196998596, 0.7247341275215149, 0.2460767924785614, -0.5787829160690308, 0.9795147180557251, 0.6588349938392639, -0.4125796854496002, -0.27545467019081116, -0.1560506671667099, 0.10116441547870636,...
Now, let's use our `selectedStream` to display a table with all it's commits, as well as some data associated with each commit. Since the commit list can be rather large, we'll be adding basic pagination functionality to the table.
[ -0.6428937315940857, -0.5714109539985657, 0.891897439956665, -0.12347947806119919, -0.8219114542007446, 0.11520974338054657, -0.026594216004014015, -0.005767159163951874, 1.1885474920272827, 1.059241771697998, -0.6347275972366333, -0.6222400069236755, -0.46678364276885986, -0.1371094733476...
For that, we'll need to fetch the commit data associated with the stream, modify our `store/index.js` to hold that new data, and add a table view with a column filter on `Home.vue`
[ -0.31071680784225464, -0.3771234154701233, 0.4087707996368408, -0.538963794708252, -0.5036793351173401, 0.45056724548339844, 0.1906460076570511, -0.04979243874549866, 1.1427868604660034, 1.1647948026657104, -0.6810165643692017, -0.9709460139274597, -0.42934244871139526, -0.1417029350996017...
Let's start by adding a new query function to our `speckleQueries.js`
[ -0.6937603950500488, -0.05390983074903488, 0.46907952427864075, 0.27880504727363586, -0.5058788657188416, 0.45478156208992004, 0.028521552681922913, -0.38525086641311646, 1.1431541442871094, 1.0548145771026611, -0.5775445699691772, -0.7503207921981812, -0.3559911251068115, -0.3362298905849...
```js export const streamCommitsQuery = (streamId, itemsPerPage, cursor) => `query { stream(id: "${streamId}"){ commits(limit: ${itemsPerPage}, cursor: ${ cursor ? '"' + cursor + '"' : null }) { totalCount cursor items{ id message branchName ...
[ 0.00802861712872982, -0.5556884407997131, 0.4036823511123657, -0.12126916646957397, -0.5199506282806396, 0.541031539440155, 0.09396517276763916, 0.09563396126031876, 1.0815114974975586, 0.845867931842804, -0.751400351524353, -0.7946721315383911, -0.5690131187438965, -0.1105329617857933, ...
And add the following to `speckleUtils.js` (remember to import the `streamCommitsQuery`)
[ -0.3728688359260559, 0.4585827887058258, 0.026360157877206802, 0.6333452463150024, -0.37224093079566956, 0.6870011687278748, 0.06520114839076996, -0.6573059558868408, 1.1956990957260132, 0.8104349374771118, -0.5717247724533081, -0.3382640779018402, -0.555321216583252, -0.4806423783302307, ...
```js export const getStreamCommits = (streamId, itemsPerPage, cursor) => speckleFetch(streamCommitsQuery(streamId, itemsPerPage, cursor)) ```
[ -0.2950308322906494, -0.16887019574642181, 0.06772466003894806, -0.14416983723640442, -0.5430952906608582, 0.6643201112747192, 0.03322865441441536, -0.3176333010196686, 0.8101120591163635, 0.6650329828262329, -0.6898481249809265, -0.5354968309402466, -0.606633186340332, -0.2135941982269287...
Notice that the query has a `cursor`. This is used to get successive _pages_ of the commits list. There is a current limitation with the cursor, as it only allows to go _forward_ in pages, not backward. To fix this, we'll keep track of these values in our store so we can have pagination going forward (we'll also keep t...
[ -0.2915954887866974, -0.9424638748168945, 0.5203642249107361, 0.0653160959482193, -0.3991672098636627, 0.03815075755119324, 0.08807028830051422, -0.04383011907339096, 0.4268479645252228, 0.9407112002372742, -0.8677978515625, -0.40184634923934937, -0.2630939185619354, 0.18166649341583252, ...
Now, there's quite a bit of modifications in the `store/index.js` file. I've highlighted the changes in the code block, but feel free to replace the whole content for the one bellow.
[ -0.35441088676452637, -0.22583569586277008, 0.1933126002550125, -0.06740635633468628, -0.10638640075922012, 0.23062841594219208, -0.07828682661056519, -0.7309748530387878, 0.985589325428009, 0.7939159870147705, -0.5163400173187256, -0.6551623940467834, -0.1903134435415268, 0.33969506621360...
We basically need modify the state to be able to:
[ -0.06023881956934929, -0.5342452526092529, 0.3763362765312195, -0.07814943045377731, -0.6365939378738403, -0.03063005954027176, -0.0874485969543457, -0.22520709037780762, 0.5912749171257019, 0.8975819945335388, -0.3514610826969147, 0.08832836151123047, -0.49561113119125366, 0.0544938854873...
- Store the `latestCommits` data, a list of `previousCursors` and a list of `tableOptions` for the table visualization. - Add mutations to modify individually each of these state properties (note that `previousCursors` is a list, so we added two mutations: one to push a new value and another to replace the entire list...
[ -0.38151201605796814, -0.6348868608474731, 0.21029971539974213, -0.41583263874053955, -0.3438968062400818, 0.1277930736541748, 0.07046475261449814, 0.08081284910440445, 0.8275704383850098, 1.0150552988052368, -0.4294249713420868, -0.5485456585884094, -0.4270283579826355, -0.126957699656486...
import { APP_NAME, exchangeAccessCode, getStreamCommits, getUserData, goToSpeckleAuthPage, speckleLogOut } from "@/speckleUtils"
[ -0.349673330783844, -0.3261910080909729, 0.2624605894088745, -0.13866689801216125, 0.10140475630760193, 0.8241538405418396, 0.20908662676811218, -0.4050169587135315, 0.9253166913986206, 1.0320422649383545, -0.45266973972320557, -0.3353028893470764, -0.3341420888900757, -0.05296365916728973...
export default new Vuex.Store({ state: { user: null, serverInfo: null, currentStream: null, latestCommits: null, previousCursors: [null], tableOptions: null }, getters: { isAuthenticated: state => state.user != null }, mutations: { setUser(state, user) { sta...
[ -0.049061816185712814, -0.1357279121875763, 0.27491047978401184, -0.29402971267700195, -0.15913359820842743, 0.4907653331756592, 0.037832457572221756, -0.07832268625497818, 0.6217518448829651, 0.8511555194854736, -0.7187046408653259, -0.6673773527145386, -0.2218354046344757, 0.224096328020...
The `Home.vue` also requires some major additions, so I've highlighted the changes in the code block, but just as the step below, feel free to replace the entire content if you're playing it fast and loose!
[ -0.46945542097091675, -0.6384282112121582, 0.14345814287662506, 0.4267538785934448, -0.38817641139030457, 0.237859845161438, -0.019405169412493706, -0.38094383478164673, 0.2904938757419586, 0.8817886114120483, -0.617363691329956, -0.6709948778152466, -0.49758180975914, -0.1804528683423996,...
- Add a new `div` for the table view containing a `v-select` and a `v-data-table`. - The `v-select` allows to select the available keys to display as table columns - The `v-data-table` does all the table UI magic so we don't have to. - Add several computed properties: - `commits` and `previousCursors` to fetc...
[ -0.5974069833755493, -0.42159584164619446, 0.41257643699645996, -0.21005553007125854, -0.37386345863342285, 0.10826712846755981, 0.18754738569259644, 0.07001565396785736, 0.7458398342132568, 1.0893993377685547, -0.562369704246521, -0.6544865965843201, 0.1514568328857422, -0.441583871841430...
```vue <template lang="html"> <WelcomeView v-if="!$store.getters.isAuthenticated" /> <v-container v-else class="home pa-6"> <stream-search @selected="$store.dispatch('handleStreamSelection', $event)" /> <h2 class="pt-6 primary--text"> <span v-if="selectedStream"> {{ selected...
[ -0.47574013471603394, -0.3634735643863678, 0.41498398780822754, -0.14668992161750793, -0.5004270672798157, 0.08049745112657547, 0.22954103350639343, -0.11129283159971237, 0.592970609664917, 0.6008985042572021, -0.89573073387146, -0.5014615058898926, -0.5223835706710815, 0.04418351128697395...
<div class="pt-6"> <v-select v-model="selectedKeys" :items="availableKeys" chips label="Select data to display" multiple ></v-select> <h3 class="pa-2 primary--text">Stream commits:</h3> <v-data-table :loading="loading" :heade...
[ -0.4289999306201935, -0.4274269938468933, 0.5210447907447815, -0.19894953072071075, -0.6488339304924011, 0.3602873384952545, 0.30576443672180176, 0.053737297654151917, 0.6367212533950806, 0.6239804625511169, -0.8502246737480164, -0.5974797010421753, -0.6709280014038086, -0.1562185734510421...
export default { name: "HomeView", components: { WelcomeView, StreamSearch }, data: () => { return { loading: false, options: { itemsPerPage: 5 }, serverUrl: process.env.VUE_APP_SERVER_URL, selectedKeys: ["id", "message", "branchName", "authorName"] } },...
[ -0.11548428237438202, -0.2058837115764618, 0.5801313519477844, -0.35700690746307373, -0.26981791853904724, 0.6199025511741638, 0.04503906890749931, 0.18067039549350739, 0.5492016077041626, 0.8635991811752319, -0.922671914100647, -0.7897799015045166, -0.25711551308631897, -0.128581792116165...
That should cover all the changes needed! Go ahead to [http://localhost:8080](https://localhost:8080). If logged in, your app should be looking like this 👇🏼
[ -0.6097841858863831, -0.3729734718799591, 0.3448295593261719, 0.6734350323677063, -0.3959270417690277, 0.2836569547653198, 0.26929226517677307, -0.3349572718143463, 0.9801022410392761, 1.0815274715423584, -0.2464025914669037, -0.5653495192527771, -0.19280581176280975, 0.16716812551021576, ...
Our app seems to be working fine, but there's still a small adjustment that we can do to make things better. If, for any reason, a user reloads the page, they will loose their current stream selection + commit results, which is annoying. Let's fix that!
[ -0.2641335725784302, -0.3092055916786194, 0.38579586148262024, 0.07323601841926575, -0.45516273379325867, 0.2440079152584076, -0.30059611797332764, -0.41398048400878906, 0.9241295456886292, 0.7477589249610901, -0.5445562601089478, -0.19791410863399506, -0.6053078174591064, 0.09169027954339...
Thankfully, we only need to modify the `store/index.js` file slightly to make this happen. We already installed `vuex-persist`, the plugin that will do all the heavy lifting for us.
[ -0.32740047574043274, 0.14522616565227509, 0.5994423031806946, 0.07535669952630997, -0.1677657961845398, 0.40268340706825256, 0.07388898730278015, -0.12983492016792297, 0.8995701670646667, 0.7216294407844543, -0.4398965537548065, -0.7337853312492371, 0.08037581294775009, 0.1715182214975357...
then create an instance (you'll need to import `APP_NAME` from `speckleUtils.js`) that uses `localStorage`. We could also use `sessionStorage`, which would be deleted at the end of the session.
[ -0.3456599712371826, -0.33074939250946045, 0.4723256230354309, -0.07023207098245621, -0.1642293930053711, 0.7080439925193787, -0.06953687965869904, -0.28844183683395386, 0.718185305595398, 0.6796683073043823, -0.27550163865089417, -0.35964635014533997, 0.2771475613117218, -0.13042560219764...
```js const vuexLocal = new VuexPersistence({ storage: window.localStorage, key: `${APP_NAME}.vuex` }) ```
[ 0.0988304391503334, -0.2974759638309479, 0.3219600021839142, -0.32999444007873535, 0.05819845199584961, 0.7987654805183411, -0.037612393498420715, -0.05075797811150551, 0.5567601323127747, 0.4771662652492523, -0.31938785314559937, -0.8027656674385071, 0.011271022260189056, -0.1126316562294...
and that's it! Your app should now persist the app state across page refresh. 🚀
[ -0.04448321461677551, -0.08454560488462448, 0.41165831685066223, 0.9035236835479736, -0.1837242692708969, 0.05834381282329559, -0.22150136530399323, -0.022308504208922386, 1.054445743560791, 0.5180026292800903, -0.24352814257144928, -0.44645392894744873, 0.11055565625429153, -0.28188294172...
Now that we have our app up and running locally, there's just one last thing to do: deploy it!
[ -0.7234084010124207, -0.07032536715269089, 0.7632926106452942, 0.5294460654258728, -0.2623722553253174, -0.2191179394721985, 0.0659777820110321, 0.18138405680656433, 0.5858448147773743, 1.1904206275939941, -0.3957705497741699, -0.5023818612098694, 0.28739917278289795, -0.203770250082016, ...
We'll be using Netlify for this guide, but you could also as easily use Heroku, or any other platforms that supports web-app s like Vue.js out of the box.
[ -0.6684445738792419, -0.45629554986953735, 0.05608702823519707, 0.46478626132011414, -0.32216405868530273, -0.09158927947282791, -0.12224531918764114, -0.17413568496704102, 0.7112908959388733, 0.8021091222763062, -0.9257171750068665, -0.5062131285667419, -0.09198763221502304, 0.06878782063...
First, you'll need a GitHub account to push your app's repo to, and a Netlify account. If you haven't got a netlify account yet, you can log in with your GitHub account, which will make your life easier.
[ -0.613699734210968, -0.10416620969772339, -0.0638032928109169, 0.3299511671066284, -0.19608300924301147, 0.6064445376396179, 0.24013319611549377, -0.2471034824848175, 0.6068286299705505, 0.8825570940971375, -0.589604914188385, -0.23260527849197388, -0.6392488479614258, 0.04450114816427231,...
1. Go to your Netlify's dashboard and find the `New site from Git` button ![New site from git button](./img/apps-guide/app-guide-netlify-new-site.png) 2. Follow the steps as shown: 1. ![Step 1](./img/apps-guide/app-guide-netlify-new-site-2.png) 2. ![Step 2](./img/apps-guide/app-guide-netlify-new-site-3.png...
[ -0.9813053011894226, -0.2761841118335724, 0.08068406581878662, 0.2990540862083435, -0.29574936628341675, 0.5303058624267578, -0.09816766530275345, 0.05880134925246239, 0.9096299409866333, 0.8509323596954346, -0.5308048725128174, -0.3643110990524292, -0.3769887387752533, 0.22014294564723969...
That's it! If you visit your netlify url, you should see your app running smoothly!
[ -0.5578114986419678, -0.553791344165802, -0.015260410495102406, 0.8717167377471924, -0.589518129825592, -0.1571335345506668, -0.0856776013970375, -0.22579440474510193, 0.6918481588363647, 0.8623916506767273, -0.8009952306747437, -0.5751312375068665, -0.3345108926296234, 0.21873882412910461...
We've covered quite a lot on this guide, but this was only a small example of interacting with Speckle streams and commits. Expanding on this further can move onto using the Speckle Viewer, fetch the data inside commits, receive notifications from the server, and more!
[ -0.41770389676094055, -0.5257488489151001, 0.7317768335342407, 0.021324699744582176, -0.5507837533950806, 0.1623276323080063, -0.0030050112400203943, -0.6048451066017151, 0.8276709318161011, 0.9775871634483337, -0.733120322227478, -0.3805668354034424, -0.3279230296611786, -0.26948475837707...
You can find the entire code for this guide [in this repository.](https://github.com/specklesystems/speckle-demo-app)
[ -0.3500308394432068, -0.26395437121391296, 0.7021440863609314, 0.491392582654953, -0.5992426872253418, -0.046812575310468674, 0.08138822764158249, -0.008825366385281086, 0.7316202521324158, 0.8019260764122009, -0.6502231955528259, -0.6690874099731445, 0.009577169083058834, -0.4062375128269...
If you find any issues with this guide, or the apps code, feel free to report them on our [Community Forum](https://speckle.community) or directly on the app's GitHub repo. Wherever it feels more appropriate. # Architecture
[ -0.3710499405860901, -0.07382238656282425, 0.40939298272132874, 0.7470993995666504, -0.4016462564468384, -0.15965044498443604, 0.14624075591564178, -0.35392478108406067, 0.6863174438476562, 0.6367421746253967, -0.3999919593334198, -0.7270947694778442, -0.4137655198574066, -0.21503981947898...
By reading this post you will get a comprehensive understanding of the low level **fundamentals** of Speckle. You'll be ready to make the most out of what Speckle has to offer.
[ -0.4603853225708008, -0.8496272563934326, 0.6620660424232483, 0.34592828154563904, -0.30283528566360474, 0.4716798961162567, 0.16971568763256073, -0.7704984545707703, 0.5124105215072632, 0.7822692394256592, -0.3692018389701843, -0.4388860762119293, -0.3857453465461731, -0.7276889681816101,...
You will know how you could create your own backend to Speckle, how data flows and how you can control those flows, how data is stored, as well as how applications interact with Speckle and can use it as a data persistence framework.
[ -0.7252758741378784, -0.36501187086105347, 0.6340997219085693, 0.21292105317115784, 0.1767500787973404, 0.23489882051944733, 0.367879182100296, -0.6450859308242798, 0.6374146938323975, 0.9626967906951904, -0.7864400148391724, -0.5162399411201477, -0.19249004125595093, -0.5429173111915588, ...
Speckle is the open source data platform built for the AEC industry. What does this platform do? Put simply, Speckle consists of a set of infrastructural components needed to **store** and **retrieve** data.
[ -0.4854835867881775, -0.36855947971343994, 0.3711877167224884, 0.25062060356140137, -0.28310731053352356, 0.539206862449646, 0.3395353853702545, -0.6200966835021973, 0.9060885310173035, 0.8072570562362671, -0.24854594469070435, -0.7232636213302612, -0.15923620760440826, -0.3728791773319244...
Some of these applications are authoring tools - such as Revit and Rhino - and other applications are SPA web apps, other more fully fledged backend apps - including scripts, serverless functions, etc.
[ -0.5404970645904541, -0.5743367671966553, 0.25960585474967957, 0.3962433934211731, 0.4785429835319519, 0.27096623182296753, 0.5908501148223877, -0.369480699300766, 0.5250470638275146, 1.153052806854248, -1.0796226263046265, -0.2893468141555786, 0.21978174149990082, 0.2651192545890808, -0...
These applications, in order to talk to each other and make sense of the data they are consuming, need to speak a common language. The design and principles of this common language are centred around **composability** and **extensibility,** and **not** around **completeness**. This makes Speckle much more approachable ...
[ -0.7560585141181946, -0.09752027690410614, 0.6115407347679138, 0.6618346571922302, -0.4144897162914276, 0.449632853269577, -0.25137531757354736, -1.2721502780914307, 0.38265201449394226, 0.5498400926589966, -0.13755224645137787, -0.5628602504730225, -0.22849693894386292, -0.097889065742492...
[Here's an article](/dev/base) through how we implemented this approach in our .NET SDK.
[ -0.8083449006080627, -0.4386962354183197, 0.45196300745010376, 0.18413904309272766, -0.5409857034683228, 0.3370490074157715, 0.5088302493095398, -0.32107099890708923, 0.8298037648200989, 0.6481644511222839, -0.7232451438903809, -0.7464970350265503, 0.10945022106170654, -0.14729471504688263...