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
Copy file name to clipboardExpand all lines: web/public/content/docs/api-reference/functions/fetch.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ export const description = 'Enhanced fetch function with automatic request dedup
3
3
4
4
<PageHeadertitle="fetch" />
5
5
6
-
rari extends the native Web `fetch()` API with automatic request deduplication and caching. Use it in Server Components and Route Handlers to fetch data efficiently with built-in performance optimizations powered by Rust.
6
+
The native Web `fetch()` API is extended with automatic request deduplication and caching. Use it in Server Components and Route Handlers to fetch data efficiently with built-in performance optimizations powered by Rust.
7
7
8
8
## Import
9
9
@@ -60,7 +60,7 @@ Standard fetch options plus rari-specific caching options.
60
60
61
61
## Caching Options
62
62
63
-
rari extends the standard `fetch()` options with caching controls:
63
+
The standard `fetch()` options are extended with caching controls:
rari automatically deduplicates identical requests made during the same render pass. If multiple components request the same URL with the same options, only one network request is made.
121
+
Identical requests made during the same render pass are automatically deduplicated. If multiple components request the same URL with the same options, only one network request is made.
122
122
123
123
<CodeBlockfilename="src/app/page.tsx"language="tsx">{`async function UserProfile({ userId }: { userId: string }) {
124
124
// This fetch is deduplicated if called multiple times
@@ -403,7 +403,7 @@ After the revalidation period expires, the next request will fetch fresh data.
403
403
404
404
### Cache Storage
405
405
406
-
rari uses a two-tier caching system:
406
+
A two-tier caching system is used:
407
407
408
408
1.**Request deduplication**: Identical requests during the same render are deduplicated in memory
409
409
2.**LRU cache**: Successful responses are stored in a global LRU cache (max 1000 entries) with TTL support
Copy file name to clipboardExpand all lines: web/public/content/docs/getting-started.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ export default function Counter() {
152
152
153
153
## Using NPM Packages
154
154
155
-
rari's Rust runtime handles standard `node_modules` resolution — you can `import` from any npm package the same way you would in Node. Unlike most Rust-based JS runtimes, there are no URL imports or special npm specifiers. Your existing `package.json` workflow just works.
155
+
The Rust runtime handles standard `node_modules` resolution — you can `import` from any npm package the same way you would in Node. Unlike most Rust-based JS runtimes, there are no URL imports or special npm specifiers. Your existing `package.json` workflow just works.
Copy file name to clipboardExpand all lines: web/public/content/docs/getting-started/database.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ export const description = "Connect to databases in rari using Server Components
3
3
4
4
<PageHeadertitle="Database" />
5
5
6
-
rari's architecture makes database integration fast and straightforward. Server Components run on the server by default, giving you direct access to databases without API routes. Server Actions let you mutate data from the client while keeping your database credentials secure.
6
+
Database integration is fast and straightforward. Server Components run on the server by default, giving you direct access to databases without API routes. Server Actions let you mutate data from the client while keeping your database credentials secure.
7
7
8
-
## Why rari for Databases
8
+
## Why This Approach Works
9
9
10
10
rari's Rust runtime delivers exceptional performance for database-heavy applications:
rari supports any Node.js-compatible database client. Here are the most popular options:
41
+
Any Node.js-compatible database client works here. Here are the most popular options:
42
42
43
43
### Postgres Clients
44
44
@@ -446,7 +446,7 @@ export async function POST(request: Request) {
446
446
447
447
## Request Deduplication
448
448
449
-
rari automatically deduplicates identical `fetch()` requests made during the same render pass. If multiple components fetch the same URL with the same options, only one network request is made.
449
+
Identical `fetch()` requests made during the same render pass are automatically deduplicated. If multiple components fetch the same URL with the same options, only one network request is made.
450
450
451
451
For database queries and other async operations, use `React.cache()` to manually deduplicate calls:
452
452
@@ -690,7 +690,7 @@ if (duration > 100) {
690
690
691
691
## Other Databases
692
692
693
-
rari works with any database that has a Node.js client:
Copy file name to clipboardExpand all lines: web/public/content/docs/getting-started/deploying.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ export const description = 'Build and deploy your rari application to Railway, R
3
3
4
4
<PageHeadertitle="Deploying" />
5
5
6
-
rari applications run on a Rust server with an embedded V8 runtime. The deployment workflow is straightforward: build your app, then start the server.
6
+
Applications run on a Rust server with an embedded V8 runtime. The deployment workflow is straightforward: build your app, then start the server.
7
7
8
8
## Building for Production
9
9
@@ -74,11 +74,11 @@ If you have an existing `start` script, it's backed up to `start:original`.
74
74
4. Railway detects the configuration and deploys automatically
75
75
5. Generate a domain under Settings → Networking
76
76
77
-
rari auto-detects Railway via the `RAILWAY_ENVIRONMENT` environment variable and binds to `0.0.0.0` with the platform-assigned `PORT`.
77
+
Railway is auto-detected via the `RAILWAY_ENVIRONMENT` environment variable, and the server binds to `0.0.0.0` with the platform-assigned `PORT`.
78
78
79
79
### System Dependencies
80
80
81
-
rari's Rust runtime requires `libfontconfig1` for image and font rendering. On Railway, add this variable to your service:
81
+
The Rust runtime requires `libfontconfig1` for image and font rendering. On Railway, add this variable to your service:
82
82
83
83
| Variable | Value |
84
84
|---|---|
@@ -119,11 +119,11 @@ The same `package.json` changes apply as with Railway — `scripts.start`, `engi
119
119
4. Render auto-detects the `render.yaml` configuration
120
120
5. Click "Create Web Service"
121
121
122
-
rari auto-detects Render via the `RENDER` environment variable and binds to `0.0.0.0` with the platform-assigned `PORT`.
122
+
Render is auto-detected via the `RENDER` environment variable, and the server binds to `0.0.0.0` with the platform-assigned `PORT`.
123
123
124
124
### System Dependencies
125
125
126
-
rari's Rust runtime requires `libfontconfig1` for image and font rendering. Render's native Node.js runtime includes `libvips-dev`, which provides `libfontconfig1` as a transitive dependency — so this should work out of the box. If you run into font-related errors, switch to a [Docker deployment](https://render.com/docs/docker) and install `libfontconfig1` explicitly (see the [Self-Hosting](#self-hosting) Dockerfile below).
126
+
The Rust runtime requires `libfontconfig1` for image and font rendering. Render's native Node.js runtime includes `libvips-dev`, which provides `libfontconfig1` as a transitive dependency — so this should work out of the box. If you run into font-related errors, switch to a [Docker deployment](https://render.com/docs/docker) and install `libfontconfig1` explicitly (see the [Self-Hosting](#self-hosting) Dockerfile below).
127
127
128
128
## Self-Hosting
129
129
@@ -168,7 +168,7 @@ EXPOSE 3000
168
168
CMD ["npm", "start"]
169
169
`}</CodeBlock>
170
170
171
-
rari binds to `0.0.0.0` automatically on Railway and Render, but defaults to `127.0.0.1` elsewhere. For containerized or cloud deployments, make sure your networking layer routes traffic to the server's bound address and port.
171
+
The server binds to `0.0.0.0` automatically on Railway and Render, but defaults to `127.0.0.1` elsewhere. For containerized or cloud deployments, make sure your networking layer routes traffic to the server's bound address and port.
Copy file name to clipboardExpand all lines: web/public/content/docs/getting-started/links.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ export const description = 'Learn how navigation works in rari using standard HT
3
3
4
4
<PageHeadertitle="Links and Navigation" />
5
5
6
-
rari takes a different approach to navigation. Instead of requiring a special `<Link>` component, you use standard HTML `<a>` tags. The framework's client router automatically intercepts link clicks and performs client-side navigation — giving you the benefits of a single-page application without the API overhead.
6
+
Use standard HTML `<a>` tags for navigation. The client router automatically intercepts link clicks and performs client-side navigation — giving you the benefits of a single-page application without needing a special `<Link>` component or API overhead.
Copy file name to clipboardExpand all lines: web/public/content/docs/getting-started/metadata.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ export const description = 'Learn how to configure page metadata, SEO tags, Open
3
3
4
4
<PageHeadertitle="Metadata" />
5
5
6
-
rari provides a powerful metadata system for configuring page titles, descriptions, Open Graph tags, Twitter cards, and more. Metadata can be defined statically or generated dynamically based on route parameters.
6
+
Configure page titles, descriptions, Open Graph tags, Twitter cards, and more with a powerful metadata system. Define metadata statically or generate it dynamically based on route parameters.
Copy file name to clipboardExpand all lines: web/public/content/docs/getting-started/routing.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ export const description = 'Learn how file-based routing works in rari — pages
3
3
4
4
<PageHeadertitle="Routing" />
5
5
6
-
rari uses file-based routing. Your file structure inside `src/app/` becomes your URL structure. Add a `page.tsx` and you have a route. Add a `layout.tsx` and it wraps every page beneath it. No router config, no manifest files.
6
+
File-based routing means your file structure inside `src/app/` becomes your URL structure. Add a `page.tsx` and you have a route. Add a `layout.tsx` and it wraps every page beneath it. No router config, no manifest files.
0 commit comments