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: CLAUDE.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
7
7
This is the **Talo documentation website**, built with Docusaurus. Talo is an open-source game backend that provides features like player management, event tracking, leaderboards, game saves, stats, and feedback for Godot and Unity games.
8
8
9
9
The documentation is organized into several main sections:
-**HTTP API**: REST API reference documentation (`docs/http/`)
@@ -17,24 +18,31 @@ The documentation is organized into several main sections:
17
18
## Development Commands
18
19
19
20
**Start development server:**
21
+
20
22
```bash
21
23
npm start
22
24
```
25
+
23
26
This starts a local development server on port 3009 with live reload.
24
27
25
28
**Build for production:**
29
+
26
30
```bash
27
31
npm run build
28
32
```
33
+
29
34
Generates static content in the `build/` directory.
30
35
31
36
**Clear cache:**
37
+
32
38
```bash
33
39
npm clear
34
40
```
41
+
35
42
Clears the Docusaurus cache (useful when experiencing build issues).
36
43
37
44
**Serve production build locally:**
45
+
38
46
```bash
39
47
npm run serve
40
48
```
@@ -45,14 +53,13 @@ npm run serve
45
53
46
54
The HTTP API documentation uses a unique architecture that fetches live API route definitions from the Talo backend:
47
55
48
-
1.**`docusaurus.config.js`**: During build/start, fetches API route metadata from `https://api.trytalo.com/public/docs` (or `http://localhost:3000` in development) and stores it in `customFields.docs.services`
56
+
1.**`docusaurus.config.ts`**: During build/start, fetches API route metadata from `https://api.trytalo.com/public/docs` (or `http://localhost:3000` in development) and stores it in `customFields.docs.services`
-`ServiceDocumentation.js`: React component that renders API routes from the fetched metadata as interactive documentation
52
-
-`ServiceDocumentationWithTOC.js`: Variant with table of contents
53
-
-`generateServiceTOC.js`: Generates table of contents from service routes
54
-
-`useServiceDocs.js`: Hook to access service data from Docusaurus context
55
-
-`Sample.js`: Renders code samples for API endpoints
59
+
-`ServiceDocumentation.tsx`: React component that renders API routes from the fetched metadata as interactive documentation
60
+
-`generateServiceTOC.ts`: Generates table of contents from service routes
61
+
-`useServiceDocs.ts`: Hook to access service data from Docusaurus context
62
+
-`Sample.tsx`: Renders code samples for API endpoints
56
63
57
64
3.**MDX Files** (`docs/http/*.mdx`): Use the `<ServiceDocumentation service='ServiceName' />` component to render live API docs. Examples: `event-api.mdx`, `game-channel-api.mdx`, etc.
58
65
@@ -62,7 +69,7 @@ The benefit of this architecture is that API documentation automatically stays i
62
69
63
70
-**Markdown files** (`docs/**/*.md`): Standard documentation pages written in Markdown
64
71
-**MDX files** (`docs/**/*.mdx`): Documentation pages that use React components (primarily for API docs)
65
-
-**Sidebars** (`sidebars.js`): Uses Docusaurus auto-generated sidebars from the directory structure
72
+
-**Sidebars** (`sidebars.ts`): Uses Docusaurus auto-generated sidebars from the directory structure
66
73
-**Static assets** (`static/`): Images and other static files referenced in docs
67
74
68
75
### Node Version
@@ -72,6 +79,7 @@ This project requires **Node.js 20.x** (specified in `package.json` engines fiel
72
79
## Documentation Conventions
73
80
74
81
- Use frontmatter for page metadata:
82
+
75
83
```yaml
76
84
---
77
85
sidebar_position: 1
@@ -81,9 +89,9 @@ This project requires **Node.js 20.x** (specified in `package.json` engines fiel
81
89
82
90
- Cross-reference other docs using relative paths: `/docs/unity/install`
83
91
84
-
- Include code samples in fenced code blocks with language identifiers (e.g., ```csharp, ```gdscript, ```bash)
92
+
- Include code samples in fenced code blocks with language identifiers (e.g., `csharp, `gdscript, ```bash)
85
93
86
-
- The site supports C# and GDScript syntax highlighting via Prism (configured in `docusaurus.config.js`)
94
+
- The site supports C# and GDScript syntax highlighting via Prism (configured in `docusaurus.config.ts`)
Copy file name to clipboardExpand all lines: docs/godot/channels.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -205,6 +205,7 @@ var is_last_page := members_page.is_last_page
205
205
```
206
206
207
207
You can provide the following filtering options:
208
+
208
209
-`page`: the current pagination index
209
210
-`player_id`: find channel members with this player ID
210
211
-`alias_id`: find a channel member with this ID
@@ -234,6 +235,7 @@ func _on_message_received(channel: TaloChannel, player_alias: TaloPlayerAlias, m
234
235
### Listening for other signals
235
236
236
237
You can also listen for the following signals:
238
+
237
239
-`Talo.channels.player_joined`: Emitted when a player joins a channel. Returns the `TaloChannel` and the `TaloPlayerAlias` that joined.
238
240
239
241
-`Talo.channels.player_left`: Emitted when a player leaves a channel. Returns the `TaloChannel`, the `TaloPlayerAlias` that left and a `Talo.channels.ChannelLeavingReason`.
Copy file name to clipboardExpand all lines: docs/godot/leaderboards.mdx
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ To create a leaderboard, head over to [the dashboard](https://dashboard.trytalo.
14
14
Check out this blog post on [how to build quick & easy leaderboards in Godot](https://trytalo.com/blog/leaderboards-godot?utm_source=docs&utm_medium=tip) for a detailed walkthrough
0 commit comments