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
@@ -19,7 +19,7 @@ Working the conditions and conventions of each directory can get you with any ro
19
19
20
20
Before going into the Next.js specifics, let's first understand our goals with this project. Visualizing the mental model is an important step to ensure your user's data is switching hands as little as possible.
21
21
22
-
## Defining a Mental Model
22
+
## Defining a mental model
23
23
24
24
A diagram is probably the fastest way to visualizing a process. This is important to see if there aren't any redundant calls, or if any of those requests are chained in some condition. Chained requests are the grim reapers of perceived performance, we need to get those out of the way as soon as possible.
25
25
@@ -249,7 +249,7 @@ Finally, all code is in place to:
249
249
250
250
What we need now is a set of keys to effectively connect to those services in a secure way.
251
251
252
-
## Setup Environment Variables
252
+
## Configure environment variables
253
253
254
254
The environment variables `GITHUB_ID` and `GITHUB_SECRET` are provided by GitHub once you register an [OAuth App](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app). For your code to run properly you will need to have a `.env` (or `.env.local`) file looking like:
255
255
@@ -269,7 +269,7 @@ NEXTAUTH_SECRET=<a random secret string>
269
269
270
270
Finally, it's time to manage some data.
271
271
272
-
## Fetching User Data
272
+
## Fetching user data
273
273
274
274
There are a few ways with which you can provide secure access to routes in your Auth.js app. One is via the Auth.js middleware, this will redirect anyone without a `session` automatically to the login route you set up. This approach should work in both App Directory and Pages Directory.
275
275
@@ -279,7 +279,7 @@ Lastly, in the app directory, the best way is to use `getServerSession` method,
279
279
280
280
When working with React Server components, don't worry about firing multiple requests, it always hit the same endpoint and therefore Next.js will be able to deduplicate it, so there will only be one fetch request.
281
281
282
-
## Accessing User Specific Data
282
+
## Accessing user specific data
283
283
284
284
Once we got Auth setup, we can treat Row-Level Security (RLS) as an if/else statement. For example, take this contrived profile page:
In the above example, we are using the user's email as their unique identifier (or Primary Key). And we implemented a getter in a file named `db.server.ts`. Let's see how that looks like using the Xata SDK.
309
+
In the above example, we are using the user's email as their unique identifier (or primary key). And we implemented a getter in a file named `db.server.ts`. Let's see how that looks like using the Xata SDK.
@@ -26,7 +26,7 @@ Unlike tree branches, though, Git branches are capable of merging with another b
26
26
27
27

28
28
29
-
### Branching & Pull Requests
29
+
### Branching and pull requests
30
30
31
31
Another Git feature that goes hand-in-hand with branching to enhance the predictability of the development process is _pull requests_. It's especially powerful today because of how some tools in the Git ecosystem—like [GitHub](https://github.com/), [Bitbucket](https://bitbucket.org/product), and [GitLab](https://about.gitlab.com/)—have built additional functionality around pull requests to promote better collaboration among developers and continuous integration.
32
32
@@ -36,7 +36,7 @@ You can use PRs to not only review the code that is being pushed to the main bra
36
36
37
37
[Vercel](https://vercel.com/)'s [deploy preview](https://vercel.com/features/previews) feature is one of the latest tools that takes advantage of the branching and pull request mechanisms to extend the predictability Git offers beyond the code level.
38
38
39
-
### Deployment Previews with Vercel
39
+
### Deployment previews with Vercel
40
40
41
41
Vercel allows deploying websites directly from a Git repository hosted on GitHub, GitLab, or Bitbucket. Once you declare the repository's production branch, every time you commit changes to it through merging pull requests, Vercel automatically rebuilds and deploys the website to its platform.
@@ -29,9 +29,9 @@ So far, we had no way to make sure that links between pages were working and tha
29
29
position="center"
30
30
/>
31
31
32
-
This is fine, we all make mistakes, but let’s learn from this together!
32
+
This is fine! We all make mistakes, but let’s learn from this together!
33
33
34
-
## The Plan
34
+
## The plan
35
35
36
36
The first step is to list our requirements so we have our goal well defined. We want quick feedback if something gets broken, so we can fix it before merging to production. For that, we need to be able to run the docs consistently in different environments:
37
37
@@ -151,7 +151,7 @@ and another [link](/rest-api/delete)
151
151
152
152
That’s essentially all we need for a proof of concept (POC), we are now more confident that we should be able to extract every link from our documentation. Let’s try with some real data!
153
153
154
-
## The Real Deal
154
+
## The real deal
155
155
156
156
First, we need a way to load all our Markdown files. Luckily, [npm](https://www.notion.so/A-Journey-to-Bulletproof-Links-in-Documentation-f108c0ed0acd464bb1e6310519d19e37) already has a solution for us. 😀
157
157
@@ -203,7 +203,7 @@ And… it works! Not useful yet, but we are going in the right direction!
203
203
position="center"
204
204
/>
205
205
206
-
This is also a nice opportunity for us to see what links we actually have! And we can already spot some patterns that we need to deal with as external links (example: [`https://stackoverflow.com/questions/4423061/how-can-i-view-http-headers-in-google-chrome`](https://stackoverflow.com/questions/4423061/how-can-i-view-http-headers-in-google-chrome)) and links with anchors (example: `/cli/getting-started#code-generation`)
206
+
This is also a nice opportunity for us to see what links we actually have! We can already spot some patterns that we need to deal with as external links (example: [`https://stackoverflow.com/questions/4423061/how-can-i-view-http-headers-in-google-chrome`](https://stackoverflow.com/questions/4423061/how-can-i-view-http-headers-in-google-chrome)) and links with anchors (example: `/cli/getting-started#code-generation`)
207
207
208
208
First, let’s exclude external links, they are out of our scope since we’re not interested in _other people’s 404s._ We may add this later since we don’t want to link to broken content in the longer term, but for now **scope hammering keeps us focused**.
209
209
@@ -447,7 +447,7 @@ await unified()
447
447
});
448
448
```
449
449
450
-
## The Wrap Up
450
+
## The wrap-up
451
451
452
452
This is the final version (the one used in our actual documentation repository!)
@@ -34,13 +34,16 @@ All of Xata’s datetimes are saved and returned with the UTC timezone.
34
34
35
35
Xata has two main personas:
36
36
37
+
* Developers
38
+
* Low-code users
39
+
37
40
##### Developers
38
41
39
42
At it’s core, Xata is a database aimed at developers.
40
43
41
44
Developers are power users: They’re comfortable with not leaving their keyboard, they understand datetime strings, and, most of all, they love and respect the UTC timezone.
42
45
43
-
##### Lowcode users
46
+
##### Low-code users
44
47
45
48
Entrepreneurs, hackers, customer success, you name it.
@@ -30,4 +30,4 @@ You can find all published posts https://dev.to/hackmamba
30
30
31
31
These articles are great if you're looking for some good examples to get started with Xata. If you're looking to try Xata out as the year winds down, be sure to enter your app in the [Xata Challenge](https://xata.io/challenge)!
32
32
33
-
Come chat with us on [discord](https://xata.io/discord) if you have any questions or simply want to talk data.
33
+
Chat with us on [Discord](https://xata.io/discord) if you have any questions or simply want to talk data.
Copy file name to clipboardExpand all lines: hello-world.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Hello, world! Xata raises $5M for a new type of serverless database"
3
-
description: "If you haven't heard of us before, it's because we haven't launched yet. We're busy building the product, but we don't believe in stealth mode, so we'd rather talk to you about what we're building and why."
3
+
description: "Learn what Xata is and how it can revolutionize your development experience."
Copy file name to clipboardExpand all lines: how-to-fuzzy-search-with-xata.mdx
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "How to fuzzy search with Xata"
3
-
description: "Xata is a serverless database built on PostgreSQL with data automatically replicated to Elasticsearch. This opens a whole new world of possibilities when it comes to free text search. Deep dive into Queen Raae's favorite Xata feature, fuzzy search."
3
+
description: "Explore the world of free text search possibilities with Xata and take a deep dive into fuzzy search."
> **FYI:** The example code uses a Xata Worker using the Xata SDK + a React component using ReactQuery. However, you may use any type of server-side + client-side setup you are comfortable with.
30
30
31
-
## Fuzzy Search Is Enabled by Default
31
+
## Fuzzy search is enabled by default
32
32
33
33
Xata search functionality comes with the `fuzziness` param set to `1` by
34
34
default, letting the user make one typo, such as one wrong character
@@ -126,7 +126,7 @@ export default function App() {
126
126
Other possible levels of `fuzziness` are `0`, to disable it altogether, and `2`
127
127
to extend the allowed typo tolerance. Higher than `2` is not supported.
128
128
129
-
## Highlight the Relevant Text
129
+
## Highlight the relevant text
130
130
131
131
In addition to expecting a more forgiving search, users expect to know precisely
132
132
_why_ a result matches their search term. With a fuzzy search, that is even more
@@ -238,7 +238,7 @@ export default function App() {
238
238
}
239
239
```
240
240
241
-
## Search Playground
241
+
## Search playground
242
242
243
243
Xata even allows you to play around with search—no code needed—using the Search
244
244
Engine Playground.
@@ -255,7 +255,7 @@ coding.
255
255
position="center"
256
256
/>
257
257
258
-
## Where To Go From Here?
258
+
## Where to go from here?
259
259
260
260
I hope you are excited to dig into fuzzy search with Xata:
Copy file name to clipboardExpand all lines: jamstack-a-deep-dive.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Jamstack: a deep dive"
3
-
description: "This post is an in-depth look at the Jamstack, how it compares to other alternatives, and how Xata aims to complete it by providing a serverless database."
3
+
description: "Explore Jamstack, its alternatives, and how Xata complements it with a serverless database."
Copy file name to clipboardExpand all lines: new-starters.mdx
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: "New starter templates for Xata"
3
-
description: "To help in your journey with Xata, we are providing more and more starters! Today will be about SolidStart, Astro, and SvelteKit. Have fun!"
2
+
title: "Take a closer look at Xata's latest starter templates"
3
+
description: "Begin your Xata journey with our new starters - SolidStart, Astro, and SvelteKit."
Copy file name to clipboardExpand all lines: offsite-for-a-fully-remote-team.mdx
+16-11
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: "Offsite for our fully remote team"
3
-
description: "Last week we did our first Xata off-site, in Marbella, Spain. This is a photo-blog post about how it went and what we've learned from it. Warning: this post might make you hungry."
2
+
title: "Coming together to build Xata"
3
+
description: "Take a look at our photo-blog post about Xata's first off-site, featuring insights on our learnings."
Xata is a fully remote team with employees in Spain, Germany, Andorra, Belgium, and the US, with plans to add more countries soon. To compensate for our mostly Zoom-based work lives, we’re meeting in person a few times per year for an offsite in a nice location.
13
+
Xata is a fully remote team with employees located in Spain, Germany, Andorra, Belgium, and the US, and we have plans to expand to more countries soon. To make up for our primarily Zoom-based work culture, we arrange to meet in person several times per year at an offsite location.
14
14
15
-
Last week, we had our first such offsite in Marbella, Spain, and here is how we did it and what we have learned from it.
15
+
Last week, we had our first such offsite in Marbella, Spain, and here is how we did it and what we learned from it.
16
16
17
-
Fair warning: the photos in this post might make you hungry.
17
+
Warning: the photos in this post might make you hungry.
18
18
19
19
## Preparation
20
20
@@ -47,7 +47,8 @@ The game plan was:
47
47
48
48
Like in a conference where the most valuable track is the “hallway track”, more important than the agenda was what we discussed during breaks, during dinners, or simply on the bus. So we made sure the schedule had plenty of breathing air for us to know each other.
49
49
50
-
## Monday: arrivals
50
+
## Monday
51
+
### Arrivals
51
52
52
53
For many of us, this was the day that we met in person for the first time, despite working together for several months already. This made everyone very excited to meet each other. When we reached the hotel, the Xatafly — which is how we nicknamed our logo — was there to welcome us.
53
54
@@ -63,7 +64,8 @@ In the evening we had our first dinner with the whole team, and we learned quick
63
64
/>
64
65

65
66
66
-
## Tuesday: Team, strategy, and messaging
67
+
## Tuesday
68
+
### Team, strategy, and messaging
67
69
68
70
We started by discussing our [Series A](https://xata.io/blog/xata-series-a-announcement) announcement and what it means for our overall strategy. We then did a team retrospective which was a very open discussion and gave us a lot of food for thought. Speaking of food, the frequent “coffee breaks” included a lot more than coffee, more like a full buffet. It’s ok, we can diet the week after.
69
71
@@ -89,7 +91,8 @@ Dinner was again fabulous.
89
91
position="center"
90
92
/>
91
93
92
-
## Wednesday: Planning and roadmap
94
+
## Wednesday
95
+
### Planning and roadmap
93
96
94
97
A few brave people started the day early with a workout at the hotel gym. The rest of us found reasonable excuses to not do that.
95
98
@@ -117,7 +120,8 @@ In the evening, for a change, we cooked our own food! Our amazing teacher Jose s
117
120
position="center"
118
121
/>
119
122
120
-
## Thursday: Fun day
123
+
## Thursday
124
+
### Fun day
121
125
122
126
We started the day by walking down to the port of Marbella for a Catamaran trip. The water was choppy which means that we didn’t see dolphins as we were hoping but the waves kept us entertained.
123
127
@@ -132,7 +136,8 @@ After another delicious lunch, we visited Cueva del Tesoro and the beautiful cit
132
136
position="center"
133
137
/>
134
138
135
-
## Friday: travel back home
139
+
## Friday
140
+
### Travel back home
136
141
137
142
After dinner on Thursday evening, we hugged and said goodbye, because many of us had flights or trains early in the morning on Friday. Others could stay a bit more and enjoy the beautiful weather.
138
143
@@ -145,7 +150,7 @@ After dinner on Thursday evening, we hugged and said goodbye, because many of us
145
150
position="center"
146
151
/>
147
152
148
-
## Learnings and conclusions
153
+
## Takeaways and conclusions
149
154
150
155
- There was a lot of laughter during the off-site. Coming after the long pandemic and the associated social distancing, it reminded us just how important laughing together is.
151
156
- As a remote-first company, we do a lot of work async and in writing. Meeting each other for a few days did wonders in associating a friendly voice and tone with future written comments.
0 commit comments