Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com
Open History to see the last commit

what-is-next.mdx

43 lines2.4 KB

1import {Link} from '@tanstack/react-router'
2import {
3 GHLink,
4 HighLightComponent,
5 OpenAPIRequestsPanelLink,
6 LinkToArticle
7} from '/src/components/tutorial'
8​
9## What's next?
10​
11You might still have a lot of questions.
12​
13What if you don't want to download all of your data at once, because your db is too big (tip: use the `on-demand` sync strategy)? How to do complex mutations on multiple collections at once and still have instant rollbacks (tip: use `createOptimisticAction`)? And probably many more.
14​
15### 📚 Useful resources
16I recommend checking out:
17- The official <a target="_blank" href="https://tanstack.com/db/latest/docs/quick-start">Quick Start</a> guide if you want to write some code yourself
18- The <a target="_blank" href="https://tlinz.com/discord">Discord channel</a> channel if you have questions
19​
20### 🛝 Play with this project
21​
22Until then, you can play with this project.
23​
24The source code is <a target="_blank" href="https://github.com/fulopkovacs/trytanstackdb.com">on GitHub</a>, and you can keep monitoring the requests in the <OpenAPIRequestsPanelLink>_API Requests_ panel</OpenAPIRequestsPanelLink>.
25​
26> Keep in mind that this project's architecture is a bit special.
27> We had some special constraints:
28> - the db had to be local to keep the project financially viable and secure
29> - but the API requests had to be observable (for educational purposes).
30> Thanks to these, we ended up having:
31> - a PGLite db on the client (a Postgres instance in WASM)
32> - a service worker that intercepts API requests and forwards them to the API routes that are defined locally (these API routes receive HTTP Requests and give HTTP Responses, just like a normal API would)
34> All of this architectural complexity is specific to this project, and not required by TanStack DB.
35​
36### 🔬 Deep Dive Articles
37​
38We have a growing list of deep dive articles that explore more complex topics (like the <LinkToArticle articleTitle="Query-driven sync">`on-demand` sync mode</LinkToArticle>). You can view them in the TOC on the left.
39​
40### 👋 Say hi
41If you liked this guide, please star (⭐) <a target="_blank" href="https://github.com/fulopkovacs/trytanstackdb.com/">the repo on GitHub</a>.
42​
43I want to make this guide the best resource for beginners to learn TanStack DB, so **if you have any feedback, please don't hold it in!** I'm <a target="_blank" href="https://x.com/notacheetah">@notacheetah</a> on X. 🫡