You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -46,27 +46,128 @@ Open in your web browser at [localhost:5173](http://localhost:5173).
46
46
47
47
Lets change some data in Postgres and see the app instantly react.
48
48
49
-
Connect to Postgres using `psql`:
49
+
Arrange your windows so you can see the app running in your web browser and your terminal at the same time. Open the "Default" project page in the browser.
50
+
51
+
Then in your terminal, connect to Postgres using `psql`:
50
52
51
53
```shell
52
-
pnpm dev
54
+
pnpm psql
55
+
```
56
+
57
+
This will open the psql shell:
58
+
59
+
```
60
+
psql (17.4, server 17.6)
61
+
Type "help" for help.
62
+
63
+
electric=#
53
64
```
54
65
55
-
-[ ] connect to the DB using the DATABASE_URL in `.env`
56
-
-[ ] manually edit the data and see the app update
66
+
Update the project name:
67
+
68
+
```sql
69
+
UPDATE projects SET name ='Baz bam!';
70
+
```
71
+
72
+
Keep changing the project name. The app updates instantly in real-time — for all users.
57
73
58
74
### Develop the app
59
75
60
-
-[ ] change the code and see what happens
61
-
-[ ] load the AGENTS.md into your LLM and have it make changes
62
-
-[ ] see the blog post on developing with Electric and TanStack DB and the Interactive Guide to TanStack DB for a high level intro on the stack
63
-
-[ ] dive into the Tutorial for more in depth
76
+
The starter app is a fully-fledged [TanStack Start](https://tanstack.com/start) application with routing and auth, ready for you to build out into a real app.
77
+
78
+
#### Changing the code
79
+
80
+
Let's change the code and see what happens. Open a project page in your browser and add a few todos. Note that new todo items are sorted last, at the bottom of the list.
81
+
82
+
Open up the code for the project page in `src/routes/_authenticated/project/$projectId.tsx`. You can see the live query for the todo list towards the top of the `ProjectPage` component:
This queries the local TanStack DB `todoCollection` for todos that belong to the current project and sorts them by `created_at`. The default sort order is `asc`. Let's update the code to make that explicit.
Now, with the browser page open and visible, toggle the direction value between `asc` and `desc`:
115
+
116
+
```tsx
117
+
const direction ='desc'
118
+
```
119
+
120
+
You'll see the todo list re-ordering live in the page.
121
+
122
+
See the blog post introducing [developing with Electric and TanStack DB](/blog/2025/07/29/local-first-sync-with-tanstack-db) and the [Interactive Guide to TanStack DB](https://frontendatscale.com/blog/tanstack-db/) for a high level intro on the stack.
123
+
124
+
Dive into the [Tutorial](tutorial.md) for a more in-depth walkthrough of how to develop out a production-quality app with Electric and TanStack DB.
125
+
126
+
#### Using coding agents
127
+
128
+
The quickstart template ships with an `AGENTS.md` file. Load this into your LLM and have it make changes for you.
129
+
130
+
For example:
131
+
132
+
```
133
+
Read AGENTS.md. Sort the todo list on the project page alphabetically.
134
+
```
64
135
65
136
### Claim the resources
66
137
67
-
-[ ] claim the resources
138
+
The Postgres database and Electric sync service provisioned when you generated the app are temporary. They'll be scaled down automatically and then deleted in a few days time.
139
+
140
+
To continue using them, you can claim them. This allows you to create or sign-in to accounts with Electric Cloud (for the sync service) and Neon (for the database hosting) and move the resources into your accounts so you can manage and control them.
141
+
142
+
To claim the resources run:
143
+
144
+
```shell
145
+
pnpm claim
146
+
```
147
+
148
+
Follow the instructions in the your web browser.
149
+
150
+
### Deploy and share the app
151
+
152
+
To deploy your local app to [Netlify](https://tanstack.com/start/latest/docs/framework/react/hosting#what-is-netlify), run:
153
+
154
+
```sh
155
+
pnpm deploy
156
+
```
157
+
158
+
TanStack Start is designed to work with any hosting provider. See the [Hosting docs](https://tanstack.com/start/latest/docs/framework/react/hosting) for instructions.
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
so if you already have a hosting provider in mind, you can deploy your application there using the full-stack APIs provided by TanStack Start.
167
+
168
+
68
169
69
-
### Deploy and share
170
+
TanStack Start is a full-stack framework powered by TanStack Router. It provides a full-document SSR, streaming, server functions, bundling, and more. Thanks to Vite, it's ready to develop and deploy to any hosting provider or runtime you want!
0 commit comments