Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d77ffff
Merge pull request #190 from deta/client-side-sdk-direct-import
MaximilianHeidenreich Aug 29, 2023
a479d84
feat: main page layout
cristicretu Aug 30, 2023
e48f264
feat: footer
cristicretu Aug 30, 2023
c24e5b7
feat: main page
cristicretu Aug 30, 2023
a0f095e
save'
cristicretu Aug 30, 2023
8512cf9
new changelog post
xeust Aug 30, 2023
eb5a2e9
maxu quote
xeust Aug 30, 2023
870352d
maxu quote
xeust Aug 30, 2023
e7a32ee
rename
xeust Aug 30, 2023
7d87759
feat: theme
cristicretu Aug 30, 2023
d3063d4
change latest to 2.0.0
xeust Aug 30, 2023
be8c8b4
change language to js
xeust Aug 30, 2023
f965786
Merge branch 'staging' into client-sdk-changelog
xeust Aug 30, 2023
7c28be8
new post
cristicretu Aug 30, 2023
5548209
async fix
xeust Aug 30, 2023
0d3fb68
fixed blog post layout
MaximilianHeidenreich Aug 30, 2023
62a146b
Add docs TOC
MaximilianHeidenreich Aug 30, 2023
0ca780a
adds blur param
MaximilianHeidenreich Aug 30, 2023
0e78f4d
disables blur on blog pages
MaximilianHeidenreich Aug 30, 2023
3503816
fix article width
MaximilianHeidenreich Aug 30, 2023
0e73253
Merge remote-tracking branch 'origin/client-sdk-changelog' into merge…
MaximilianHeidenreich Aug 30, 2023
85b1884
update links
xeust Aug 30, 2023
a3d61fa
Merge remote-tracking branch 'origin/client-sdk-changelog' into merge…
MaximilianHeidenreich Aug 30, 2023
02cb299
adds post-16
MaximilianHeidenreich Aug 30, 2023
d8eda48
delete changelog post
MaximilianHeidenreich Aug 30, 2023
112192b
adds changelog topic to latest post
MaximilianHeidenreich Aug 30, 2023
f5bb3fe
tweak images
xeust Aug 30, 2023
92b444e
add video
xeust Aug 31, 2023
baf37d6
Merge branch 'staging' into merge-blog
xeust Aug 31, 2023
6f29b20
feedback
xeust Aug 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/pages/blog/introducing-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: ""
---

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/04/whats-next.webp" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/04/whats-next.webp" style="margin: auto;"/>
</div>
<br />

Expand All @@ -23,7 +23,7 @@ Deta Space is a new personal computer that lives in the cloud — a ‘personal
## Build it for yourself

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/04/build-yourself.webp" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/04/build-yourself.webp" style="margin: auto;"/>
</div>

As a developer, Space gives you your own environment to build, just like in Deta Cloud. Your Space is for you: to build, deploy, and use your ideas. But it packs a lot of new power.
Expand All @@ -33,7 +33,8 @@ As a developer, Space gives you your own environment to build, just like in Deta
We’ve brought some of the same friendly infrastructure to Space like [Deta Base](https://deta.space/docs/en/reference/base/about) and [Deta Drive](https://deta.space/docs/en/reference/drive/about). But now they’re a part of [Deta Collections](https://deta.space/manual/features/collections), a home for your data.

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/04/collections.png" style="max-width: 736px; margin: auto;"/>

<img src="/blog_assets/04/collections.png" style="margin: auto;"/>
</div>

As a part of the merge, we’ve created a tool to [easily migrate your Bases and Drives from Deta Cloud to Collections](https://deta.space/migration/guides/import-a-project) in Space.
Expand All @@ -42,7 +43,7 @@ As a part of the merge, we’ve created a tool to [easily migrate your Bases and
### Deta Micros: completely recharged

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/04/builder.png" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/04/builder.png" style="margin: auto;"/>
</div>

We’ve also upgraded the core experience around Deta Micros. We’ve completely refreshed them to support many more runtimes and frameworks. This includes frontend libraries like [React and Svelte](https://deta.space/docs/en/quickstart-guides/static), alongside their full-stack complements [Next.js](https://deta.space/docs/en/quickstart-guides/next) and [Nuxt](https://deta.space/docs/en/quickstart-guides/nuxt). Space also supports new backend languages like [Go](https://deta.space/docs/en/quickstart-guides/go), with [Rust](https://deta.space/docs/en/quickstart-guides/rust) coming soon. The community has also created templates for running a number of other languages like Deno, Crystal, Nim and Dart using our “custom” runtime feature.
Expand All @@ -57,7 +58,7 @@ As part of the upgrade, we’ve also completely redesigned and re-engineered our
But we’re most excited about two core new interaction components in the frontend, **Canvas,** and **Teletype**.

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/04/canvas.png" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/04/canvas.png" style="margin: auto;"/>
</div>

**Canvas** is your personal cloud’s homepage, where you can rearrange all your apps and projects. Soon you’ll be able to pin just about anything to Canvas – like a Collection, Base, or Drive – to personalize your experience even further.
Expand All @@ -67,7 +68,7 @@ But we’re most excited about two core new interaction components in the fronte
## See it run anywhere

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/04/run-it.webp" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/04/run-it.webp" style="margin: auto;"/>
</div>

Once you have an app that you’re happy with in your Space, you can click a button or send a command. From this point, Deta can run it anywhere, around the world, for anyone with an internet connection, in their own Space. Your app will keep running forever (as long as Space exists), with no work from you needed.
Expand Down
4 changes: 2 additions & 2 deletions src/pages/blog/merging-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "We have merged old and new Space into one."
---

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/230125-newspace.webp" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/230125-newspace.webp" style="margin: auto;"/>
</div>
<br />

Expand Down Expand Up @@ -37,7 +37,7 @@ Under the old system, a Space app was available under `alias.username.deta.app`.
You can see both the old and new domains for any Space app by clicking the `...` and then `Settings` from an app's card on your Space's Canvas:

<div style="display: flex; justify-content: center;"/>
<img src="/blog_assets/230125-old-domains.webp" style="max-width: 600px; margin: auto;"/>
<img src="/blog_assets/230125-old-domains.webp" style="margin: auto;"/>
</div>
<br />

Expand Down
8 changes: 4 additions & 4 deletions src/pages/blog/moving-to-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "We will be upgrading and merging Deta Cloud into Deta Space on Feb
---

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/03/01-moving-to-space.webp" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/03/01-moving-to-space.webp" style="margin: auto;"/>
</div>

Following [our motivation](https://deta.space/motivation/) for building [Deta Space](https://deta.space/) last week, we’d like to follow up with what this means for [Deta Cloud](https://deta.sh/).
Expand Down Expand Up @@ -49,14 +49,14 @@ It also includes a modifiable “custom” runtime engine, which the community h
The second most common request from our community is for a modernized User Interface. Here’s how the Deta Cloud UI looks:

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/03/02-cloud-ui.webp" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/03/02-cloud-ui.webp" style="margin: auto;"/>
</div>
<br />

And here’s Space:

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/03/03-space-ui.webp" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/03/03-space-ui.webp" style="margin: auto;"/>
</div>
<br />

Expand Down Expand Up @@ -87,7 +87,7 @@ The landing pages on [deta.sh](http://Deta.sh) and [web.deta.sh](http://web.Deta
We are creating a product for data on Space called Deta Collections. A Collection is similar to a Cloud Project with Bases and Drives, but without Micros. We’ll provide a tool where you’ll be able to automatically move a Deta Cloud Project to a “Collection” (but your Micros will remain in the old UI). Here’s how Collections looks:

<div style="display: flex; justify-content: center;">
<img src="/blog_assets/03/04-collections.png" style="max-width: 736px; margin: auto;"/>
<img src="/blog_assets/03/04-collections.png" style="margin: auto;"/>
</div>
<br />

Expand Down
43 changes: 26 additions & 17 deletions src/pages/blog/post-16.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,38 @@ title: "Browser SDK & more"
date: "30 Aug 2023"
layout: "@blogs"
description: "Great improvements for base fans & server haters alike."
topic: "changelog"
---

import Image from '@/components/Image.astro'

VIDEO HERE
For developers, much of the power of the [personal cloud](https://deta.space/docs/en/learn/what-is-pc) is the [auth model](https://deta.space/docs/en/build/fundamentals/the-space-runtime/authentication).

For developers, much of the power of Space and the [personal cloud](https://deta.space/docs/en/learn/what-is-pc) is the [auth model](https://deta.space/docs/en/build/fundamentals/the-space-runtime/authentication).
In Space you can build a personal app for yourself, and you can see it run for just about anyone in the world with an internet connection. No need to consider sign-in, sign-up, users, or data separation. The power of auth on the personal cloud is… not thinking about auth. Because it just works.

You can build a personal app for yourself, assuming you're the only user. As soon as you've done so, you can see it run for just about any user in the world with an internet connection. You don't think about sign-in, sign-up, users, data separation, and the like. The power of auth on the personal cloud is that you *don't* think about auth, it "just works".
From today—you can think even less. With version 2 of the Deta JavaScript SDK you can now use [Deta Base](https://deta.space/docs/en/build/fundamentals/data-storage#deta-base) or
[Deta Drive](https://deta.space/docs/en/build/fundamentals/data-storage#deta-drive) straight from your browser. So, for many apps, you can stop worrying about backends entirely.

However, in building a personal app that stores data using [Deta Base](https://deta.space/docs/en/build/fundamentals/data-storage#deta-base) or [Deta Drive](https://deta.space/docs/en/build/fundamentals/data-storage#deta-drive), you still need to create an entire backend, writing APIs that route user requests in the browser to the data in Base or Drive. This is a whole lot of drudgery, coming from the client needing to go through a backend [Micro](https://deta.space/docs/en/build/fundamentals/the-space-runtime/micros) to store and retrieve data. It also adds a lot of latency to user actions, as they are waiting on a backend Micro to respond (cough cough, cold starts).
Previously, when building a personal app, you needed to create an entire backend, writing APIs that routed user requests in the browser and back to the data in Base or Drive. That meant a whole lot of drudgery and clients having to go through a backend [Micro](https://deta.space/docs/en/build/fundamentals/the-space-runtime/micros) to store and retrieve data. It also added latency to user actions as they waited on a backend Micro to respond (cough cough, cold starts). For many apps, that’s in the past now.

From today, things will get a whole lot better in this regard (for many applications). That's because *you can now use Deta Base and Deta Drive straight from the browser*, with **version 2.0.0 of the Deta JavaScript SDK**. When you do, you *don't* have to think about backends.
Read on to discover how you can start living backend-worry free in v2.

## Deta JavaScript SDK v2

To get started using Deta Base or Drive in the browser, install the latest Deta SDK from npm (or yarn):
## Deta JavaScript SDK, v2

To get started using Deta Base or Drive in the browser install the latest Deta SDK from npm (or yarn):

```bash
npm install deta@latest
```

Alternatively, import it in your app from Space's CDN:
Or import it into your app from Spaces CDN:

```js
const deta = await import("https://cdn.deta.space/js/[email protected]/deta.mjs");
```

In either case, your app can start reading and writing data in the browser:

Now your app can start reading and writing data in the browser:

```js
const base = deta.Base('my-base');
Expand All @@ -48,20 +50,27 @@ console.log(await base.fetch());
console.log(await drive.list());
```

If your app is running on Deta Space it will just work. No need for keys or a backend. Just low latency personal applications. Check out [this repo](https://github.com/deta/todo-app) for an example app that uses the new SDK on the client.
If your app is running on Deta Space it will just work. No need for keys or a backend, Just low-latency personal applications. Check out [this repo](https://github.com/deta/todo-app) for an example app that uses the new SDK on the client.

Maxu, author of [PingBack](https://deta.space/discovery/@maximilianheidenreich/pingback) and Deta Team member, had this to say after getting his hands on an early release:
Deta Team member and author of [PingBack](https://deta.space/discovery/@maximilianheidenreich/pingback), Maxu, had this to say after getting his hands on an early release:
> *"Some ppl. try to avoid writing API routes and use React & Next.JS server components. I avoid both with the Browser SDK. Instant 10x."*

Checkout this tutorial from Deta CEO, Mustafa, using the Browser SDK to build a full app in a stingle HTML file:

<iframe width="560" height="315" src="https://www.youtube.com/embed/t1AuNWsLqa8?si=jYeeCp5hivguD8aE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

<br/>
<br/>
A few notes:
- The Browser SDK supports all the same methods and features as the existing SDK
- The Browser SDK will not work on [public Micros or Public Routes](https://deta.space/docs/en/build/fundamentals/the-space-runtime/authentication#public-micros-and-routes)
- The Browser SDK

## More Fun Things

### Base Sort Order

After many wishes and hacky hacks, we're pleased to share that you can now sort your Base items by `ascending` or `descending` key-order. Simply pass a `desc` value to any Fetch call ([docs](https://deta.space/docs/en/build/reference/sdk/types#fetchoptions)).
After persistent requests and hacky hacks, were pleased to share that you can now sort your Base items by ascending or descending key order. Simply pass a desc value to any Fetch call ([docs](https://deta.space/docs/en/build/reference/sdk/types#fetchoptions)).

With Python:
```py
Expand All @@ -76,11 +85,11 @@ const db= deta.Base('random-base');

db.fetch({desc: true})
```
*P.S: this works in the browser with the new SDK ;)*
*This works in the browser with the new SDK ;)*

If you check the key column in any [Base UI](https://deta.space/docs/en/use/your-data/guis#base-ui) view, you'll also notice a little toggle that gives you the same ability.
If you check the key column in any [Base UI](https://deta.space/docs/en/use/your-data/guis#base-ui) view, you'll also notice a toggle that gives you the same ability.

### Python SDK: Async Interactions with Base
### Python SDK: Async Base

We now have support asynchronous interactions with Deta Base in the Python SDK. See the "Python (async)" tab [in the docs for more](https://deta.space/docs/en/build/reference/sdk).

Expand All @@ -100,7 +109,7 @@ await db.close()
```


### Even More
### Even More Fixes
- Removed `detalib` from the JS SDK, which was causing a lot of errors: [more](https://github.com/deta/deta-javascript/pull/63/files)
- Pushed an error message fix in JS SDK: [more](https://github.com/deta/deta-javascript/pull/64/files)
- Fixed wrong exit code in the CLI: [more](https://github.com/deta/space-cli/pull/147/files)
Expand Down