Skip to content

Commit 6705af9

Browse files
committed
chore: add typesense search (#2764)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent d0fc1c8 commit 6705af9

File tree

17 files changed

+837
-715
lines changed

17 files changed

+837
-715
lines changed

site/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
},
1717
"browserslist": "defaults, not ie <= 11",
1818
"dependencies": {
19-
"@algolia/autocomplete-js": "^1.17.4",
2019
"@fortawesome/fontawesome-svg-core": "^6.5.2",
2120
"@fortawesome/free-brands-svg-icons": "^6.5.2",
2221
"@fortawesome/free-solid-svg-icons": "^6.5.2",
@@ -38,7 +37,6 @@
3837
"@tailwindcss/typography": "^0.5.8",
3938
"@types/json-schema": "^7.0.15",
4039
"acorn": "^8.8.1",
41-
"algoliasearch": "^4.24.0",
4240
"autoprefixer": "^10.4.7",
4341
"chart.js": "^4.4.2",
4442
"chartjs-adapter-date-fns": "^3.0.0",
@@ -51,7 +49,6 @@
5149
"estree-util-to-js": "^2.0.0",
5250
"fast-glob": "^3.2.12",
5351
"feed": "^4.2.2",
54-
"flexsearch": "^0.7.31",
5552
"focus-visible": "^5.2.0",
5653
"framer-motion": "*",
5754
"jszip": "^3.10.1",
@@ -78,11 +75,11 @@
7875
"remark-stringify": "^10.0.3",
7976
"sharp": "^0.32.1",
8077
"shiki": "^1.0.0",
81-
"simple-functional-loader": "^1.2.1",
8278
"socket.io": "^4.7.1",
8379
"socket.io-client": "^4.7.1",
8480
"tailwindcss": "^3.3.0",
8581
"tm-themes": "^1.10.7",
82+
"typesense": "^1.8.2",
8683
"unified": "^10.1.2",
8784
"unist-util-filter": "^4.0.1",
8885
"unist-util-visit": "^4.1.1",
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Node.js & Bun
2+
3+
The Rivet JavaScript client allows you to connect to and interact with actors from browser and Node.js applications.
4+
5+
## Quickstart
6+
7+
Create a new Node.js project with TypeScript support:
8+
9+
```sh npm
10+
mkdir my-app
11+
cd my-app
12+
npm init -y
13+
npm pkg set type=module
14+
```
15+
16+
```sh pnpm
17+
mkdir my-app
18+
cd my-app
19+
pnpm init
20+
pnpm pkg set type=module
21+
```
22+
23+
```sh yarn
24+
mkdir my-app
25+
cd my-app
26+
yarn init -y
27+
yarn pkg set type=module
28+
```
29+
30+
```sh bun
31+
mkdir my-app
32+
cd my-app
33+
bun init -y
34+
```
35+
36+
Install the Rivet client and Node.js platform packages:
37+
38+
```sh npm
39+
npm install @rivetkit/actor
40+
```
41+
42+
```sh pnpm
43+
pnpm add @rivetkit/actor
44+
```
45+
46+
```sh yarn
47+
yarn add @rivetkit/actor
48+
```
49+
50+
```sh bun
51+
bun add @rivetkit/actor
52+
```
53+
54+
Create a file `src/client.ts` in your project to connect to your actor:
55+
56+
```typescript src/client.ts
57+
async function main()
58+
59+
main().catch(console.error);
60+
```
61+
62+
In a separate terminal, run your client code:
63+
64+
```sh npm
65+
npx tsx src/client.ts
66+
```
67+
68+
```sh pnpm
69+
pnpm exec tsx src/client.ts
70+
```
71+
72+
```sh yarn
73+
yarn tsx src/client.ts
74+
```
75+
76+
```sh bun
77+
bun run src/client.ts
78+
```
79+
80+
You should see output like:
81+
```
82+
Event: 5
83+
Action: 5
84+
```
85+
86+
Run it again to see the state update.
87+
88+
## Next Steps
89+
90+
For more information on communicating with actors, including event handling and RPC calls, see [Communicating with Actors](/docs/actors/communicating-with-actors).
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Architecture
2+
3+
Rivet supports three topologies that define how actors are distributed and scale.
4+
5+
Each platform configures a default topology appropriate for that environment. In most cases, you can rely on these defaults unless you have specific distribution needs.
6+
7+
## Configuration
8+
9+
```typescript
10+
const config = ;
11+
```
12+
13+
## Types of Topologies
14+
15+
### Standalone
16+
17+
- **How it works**: Runs all actors in a single process
18+
- **When to use**: Development, testing, simple apps with low traffic
19+
- **Limitations**: No horizontal scaling, single point of failure
20+
- **Default on**: Node.js, Bun
21+
22+
### Partition
23+
24+
- **How it works**: Each actor has its own isolated process. Clients connect directly to the actor for optimal performance.
25+
- **When to use**: Production environments needing horizontal scaling
26+
- **Limitations**: Minimal - balanced performance and availability for most use cases
27+
- **Default on**: Rivet, Cloudflare Workers
28+
29+
### Coordinate
30+
31+
- **How it works**: Creates a peer-to-peer network between multiple servers with leader election with multiple actors running on each server. Clients connect to any server and data is transmitted to the leader over a pubsub server.
32+
- **When to use**: High-availability scenarios needing redundancy and failover
33+
- **Limitations**: Added complexity, performance overhead, requires external data source
34+
- **Default on**: _None_
35+
36+
## Choosing a Topology
37+
38+
In most cases, use your platform's default:
39+
40+
1. **Standalone**: Simple, great for development
41+
2. **Partition**: Best scaling & cost for production
42+
3. **Coordinate**: Good for specialized deployment scenarios
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Documentation for LLMs & AI
2+
3+
Rivet provides optimized documentation formats specifically designed for Large Language Models (LLMs) and AI integration tools.
4+
5+
## Available Formats
6+
7+
### LLMs.txt (Condensed)
8+
A condensed version of the documentation perfect for quick reference and context-aware AI assistance.
9+
10+
**Access:** [/llms.txt](/llms.txt)
11+
12+
This format includes:
13+
- Key concepts and features
14+
- Essential getting started information
15+
- Summaries of main functionality
16+
- Optimized for token efficiency
17+
18+
### LLMs-full.txt (Complete)
19+
The complete documentation in a single file, ideal for comprehensive AI assistance and in-depth analysis.
20+
21+
**Access:** [/llms-full.txt](/llms-full.txt)
22+
23+
This format includes:
24+
- Complete documentation content
25+
- All examples and detailed explanations
26+
- Full API references and guides
27+
- Suitable for complex queries and comprehensive understanding
28+
29+
## Individual Page Access
30+
31+
Each documentation page is also available as clean markdown by appending `.md` to any documentation URL path.
32+
33+
### Examples
34+
35+
- **This page as markdown:** [/docs/general/llms.md](/docs/general/llms.md)
36+
- **Actors overview:** [/docs/actors.md](/docs/actors.md)
37+
- **State management:** [/docs/actors/state.md](/docs/actors/state.md)
38+
- **React quickstart:** [/docs/actors/quickstart/react.md](/docs/actors/quickstart/react.md)
39+
40+
### URL Pattern
41+
42+
```
43+
Original URL: https://rivet.gg/docs/[path]
44+
Markdown URL: https://rivet.gg/docs/[path].md
45+
```
46+
47+
## Integration Examples
48+
49+
### ChatGPT/Claude Integration
50+
51+
Use the dropdown on any documentation page to:
52+
- Copy page content directly to clipboard
53+
- Open the page content in ChatGPT or Claude
54+
- View the page as raw markdown
55+
56+
### Custom AI Tools
57+
58+
Fetch documentation programmatically:
59+
60+
```javascript
61+
// Get condensed documentation
62+
const condensed = await fetch('https://rivet.gg/llms.txt').then(r => r.text());
63+
64+
// Get complete documentation
65+
const complete = await fetch('https://rivet.gg/llms-full.txt').then(r => r.text());
66+
67+
// Get specific page as markdown
68+
const actorsDoc = await fetch('https://rivet.gg/docs/actors.md').then(r => r.text());
69+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Webhooks
2+
3+
TODO

0 commit comments

Comments
 (0)