Skip to content

Commit 17376a2

Browse files
authored
[FEAT] Prepare OD Wave 1 (#152)
* [FEAT] Add routes for react docs * [FEAT] Add React Integration Overview
1 parent f6c85ee commit 17376a2

10 files changed

Lines changed: 154 additions & 29 deletions

File tree

client/pages/integrations/react.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# React Integration - Contracts Bindings
2+
3+
Under development...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# React Integration - Models Bindings
2+
3+
Under development...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# React Integration - Controller Connector
2+
3+
Under development...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# React Integration - Dojo Config
2+
3+
Under development...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# React Integration - Main
2+
3+
Under development...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# React Integration - Manifest
2+
3+
Under development...
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# React Integration Overview
2+
3+
Welcome to the React integration section of Dojo By Example! This comprehensive guide will walk you through building production-ready onchain games using React and the Dojo framework.
4+
5+
## What You'll Learn
6+
7+
This section covers everything needed to integrate Dojo with React applications, from initial setup to advanced patterns. You'll discover how to build seamless gaming experiences that feel like traditional web apps while leveraging the power of blockchain technology.
8+
9+
### 🏗️ **Core Architecture**
10+
11+
Learn how Dojo's architecture enables smooth React integration:
12+
13+
- **Main Setup** - Bootstrap your React app with proper Dojo SDK initialization
14+
- **Provider Configuration** - Set up the provider hierarchy for Starknet and Dojo connectivity
15+
- **Configuration Management** - Handle multi-network deployments with environment-based switching
16+
17+
### 🔌 **Auto-Generated Bindings**
18+
19+
Discover how Dojo automatically creates TypeScript interfaces from your Cairo contracts:
20+
21+
- **Models Bindings** - Type-safe interfaces for your game entities and data structures
22+
- **Contracts Bindings** - Auto-generated client functions for seamless contract interactions
23+
24+
### 🎮 **Gaming-First UX**
25+
26+
Implement controller integration that prioritizes player experience:
27+
28+
- **Controller Connector** - Cartridge Controller integration for frictionless gaming
29+
- **Session Policies** - Enable uninterrupted gameplay without transaction popups
30+
- **Manifest Management** - Handle deployment configurations across different networks
31+
32+
## Key Benefits
33+
34+
**⚡ Type Safety** - Full TypeScript integration from Cairo contracts to React components
35+
36+
**🎯 Gaming UX** - Controller integration designed specifically for gaming applications
37+
38+
**🔄 Auto-Generation** - Contract changes automatically update your frontend types
39+
40+
**🌐 Multi-Network** - Seamless switching between localhost, testnet, and mainnet
41+
42+
**🏗️ Production Ready** - Patterns and configurations tested in real gaming applications
43+
44+
## Getting Started
45+
46+
Each section builds upon the previous one, so we recommend following them in order:
47+
48+
1. **Overview** (you are here) - Understanding the integration landscape
49+
2. **Main Setup** - Application initialization and bootstrap process
50+
3. **Configuration** - Core configuration files and environment management
51+
4. **Providers** - Starknet and wallet connectivity setup
52+
5. **Data Bindings** - Working with auto-generated types and contract functions
53+
54+
By the end of this section, you'll have a complete understanding of how to build robust, type-safe React applications that integrate seamlessly with Dojo smart contracts, providing players with an exceptional gaming experience.
55+
56+
---
57+
58+
*Ready to dive in? Let's start with [Main Setup](/integrations/react/main) to see how it all comes together!*
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# React Integration - Starknet Provider
2+
3+
Under development...

client/routes.ts

Lines changed: 75 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -130,32 +130,81 @@ const config: Sidebar = [
130130
],
131131
},
132132
{
133-
text: "Dojo Integrations",
134-
collapsed: true,
135-
items: [
136-
{
137-
text: "React",
138-
link: "/integrations/react",
139-
},
140-
{
141-
text: "Unity",
142-
link: "/integrations/unity",
143-
},
144-
{
145-
text: "AI Agents",
146-
items: [
147-
{
148-
text: "Daydreams",
149-
link: "/integrations/ai/daydreams",
150-
},
151-
{
152-
text: "Eliza",
153-
link: "/integrations/ai/eliza",
154-
},
155-
],
156-
},
157-
],
158-
},
133+
text: "Dojo Integrations",
134+
collapsed: true,
135+
items: [
136+
{
137+
text: "React",
138+
collapsed: true,
139+
items: [
140+
{
141+
text: "Overview",
142+
link: "/integrations/react/overview",
143+
},
144+
{
145+
text: "Configuration",
146+
items: [
147+
{
148+
text: "Dojo Config",
149+
link: "/integrations/react/dojo-config",
150+
},
151+
{
152+
text: "Manifest",
153+
link: "/integrations/react/manifest",
154+
},
155+
{
156+
text: "Main Setup",
157+
link: "/integrations/react/main",
158+
},
159+
],
160+
},
161+
{
162+
text: "Providers",
163+
items: [
164+
{
165+
text: "Starknet Provider",
166+
link: "/integrations/react/starknet-provider",
167+
},
168+
{
169+
text: "Controller Connector",
170+
link: "/integrations/react/controller-connector",
171+
},
172+
],
173+
},
174+
{
175+
text: "Data Bindings",
176+
items: [
177+
{
178+
text: "Contracts Bindings",
179+
link: "/integrations/react/bindings/contracts-bindings",
180+
},
181+
{
182+
text: "Models Bindings",
183+
link: "/integrations/react/bindings/models-bindings",
184+
},
185+
],
186+
},
187+
],
188+
},
189+
{
190+
text: "Unity",
191+
link: "/integrations/unity",
192+
},
193+
{
194+
text: "AI Agents",
195+
items: [
196+
{
197+
text: "Daydreams",
198+
link: "/integrations/ai/daydreams",
199+
},
200+
{
201+
text: "Eliza",
202+
link: "/integrations/ai/eliza",
203+
},
204+
],
205+
},
206+
],
207+
},
159208
{
160209
text: "Dojo Use Cases",
161210
collapsed: true,

0 commit comments

Comments
 (0)