forked from seacloud9/XRAiAssistant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.html
More file actions
371 lines (299 loc) ยท 16.2 KB
/
Copy pathblog.html
File metadata and controls
371 lines (299 loc) ยท 16.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Building XRAiAssistant, Part 3: Local Development Meets Universal Platform Vision</title>
</head>
<body>
<h1>Building XRAiAssistant, Part 3: Local Development Meets Universal Platform Vision</h1>
<p><em>Published: September 29, 2025 | By: Brendon Smith</em></p>
<hr>
<section>
<h2><span class="emoji">๐</span> Expanding Beyond iOS: The Web Platform Arrives</h2>
<p>If you missed the previous posts, catch up here:</p>
<ul>
<li><a href="blog-part-1" target="_blank" rel="noopener">Part 1: The Future of AI-Powered 3D Development on iOS</a></li>
<li><a href="blog-part-2" target="_blank" rel="noopener">Part 2: Multi-Provider AI meets Multi-Framework XR on iOS</a></li>
</ul>
<p>What started as an iOS-first vision has evolved into something bigger. <strong>XRAiAssistant Station</strong> - our NextJS web implementation - brings complete iOS feature parity to local development environments with ambitious plans for universal platform deployment.</p>
</section>
<section>
<h2>What's inside this release</h2>
<p>XRAiAssistant Station delivers a sophisticated local development environment that matches the iOS app feature-for-feature while introducing new capabilities for collaboration and deployment.</p>
<ul>
<li><strong>๐ Local Development Focus</strong>: Built for <code>localhost:3000</code> with security-first architecture</li>
<li><strong>๐ Universal Platform Foundation</strong>: Alpha support for Android and web deployment</li>
<li><strong>๐ฆ CodeSandbox Integration</strong>: One-click deployment for React Three Fiber and React scenes</li>
<li><strong>โ๏ธ React Three Fiber Ready</strong>: Full support with hot reload and component composition</li>
</ul>
</section>
<section>
<h2>Quick links to the tech we use</h2>
<ul>
<li><strong>Source</strong>: <a href="https://github.com/seacloud9/XRAiAssistant" target="_blank" rel="noopener">XRAiAssistant on GitHub</a></li>
<li><strong>NextJS Station</strong>: <code>XrAiAssistantStation/</code> directory</li>
<li><strong>CodeSandbox</strong>: <a href="https://codesandbox.io/docs/learn/sandboxes/cli-api" target="_blank" rel="noopener">Define API</a> โข <a href="https://sandpack.codesandbox.io/" target="_blank" rel="noopener">Sandpack</a></li>
<li><strong>React Three Fiber</strong>: <a href="https://docs.pmnd.rs/react-three-fiber" target="_blank" rel="noopener">Docs</a> โข <a href="https://github.com/pmndrs/drei" target="_blank" rel="noopener">Drei</a></li>
</ul>
</section>
<section>
<h2>What's new in Part 3</h2>
<h3><span class="emoji">๐ฅ๏ธ</span> XRAiAssistant Station: NextJS Feature Parity</h3>
<p>The web implementation delivers complete iOS functionality with web-native advantages:</p>
<pre><code>// Complete feature parity with localStorage persistence
export const useAppStore = create<AppState>()(
persist(
(set, get) => ({
// All iOS features implemented
settings: AppSettings, // API keys, models, parameters
messages: ChatMessage[], // Complete chat history
currentCode: string, // Active playground code
libraries: Library3D[], // Babylon.js, Three.js, R3F
providers: AIProvider[], // Together.ai, OpenAI, Anthropic
}),
{ name: 'xrai-assistant-storage' }
)
)</code></pre>
<p><strong>Local Development Architecture</strong>:</p>
<ul>
<li><strong>Security-first</strong>: API keys in localStorage (safe for localhost only)</li>
<li><strong>Privacy-focused</strong>: Complete offline operation after initial setup</li>
<li><strong>Development-optimized</strong>: Hot reload, TypeScript, and professional debugging</li>
</ul>
</section>
<section>
<h3><span class="emoji">๐ฆ</span> CodeSandbox Integration: From Local to Live</h3>
<p>React Three Fiber scenes can now deploy directly to CodeSandbox with zero configuration:</p>
<pre><code>// One-click deployment to CodeSandbox
const deployToSandbox = async (code: string, library: Library3D) => {
if (library.id === 'react-three-fiber') {
const sandbox = await createSandbox({
files: {
'App.js': { code },
'package.json': {
code: JSON.stringify({
dependencies: {
'@react-three/fiber': '^8.17.10',
'@react-three/drei': '^9.109.0',
'react': '^18.2.0',
'three': '^0.171.0'
}
})
}
},
template: 'create-react-app'
})
// Return live URL for sharing
return `https://codesandbox.io/s/${sandbox.id}`
}
}</code></pre>
<p><strong>CodeSandbox Benefits</strong>:</p>
<ul>
<li><strong>Instant sharing</strong>: Generated scenes become live, shareable URLs</li>
<li><strong>Collaborative editing</strong>: Team members can fork and improve</li>
<li><strong>Portfolio integration</strong>: Embed live demos in Medium, docs, or portfolios</li>
<li><strong>Version control</strong>: Automatic GitHub integration for larger projects</li>
</ul>
</section>
<section>
<h3><span class="emoji">๐ง</span> Alpha Platform Support: Android and Web</h3>
<p>While XRAiAssistant Station is designed for local development, we're exploring broader platform deployment:</p>
<p><strong>๐ค Android Alpha</strong>:</p>
<ul>
<li>React Native wrapper around web components</li>
<li>Native WebView integration for Babylon.js scenes</li>
<li>SharedPreferences for settings persistence</li>
<li><strong>Limitation</strong>: Still requires localhost development server</li>
</ul>
<p><strong>๐ Web Alpha</strong>:</p>
<ul>
<li>Static site generation for portfolio deployment</li>
<li><strong>Critical limitation</strong>: API keys exposed in client-side code</li>
<li><strong>Security warning</strong>: Not suitable for production without proxy architecture</li>
<li><strong>Use case</strong>: Demo sites and educational content only</li>
</ul>
</section>
<section>
<h2><span class="emoji">๐</span> Local Development: Strengths and Honest Limitations</h2>
<h3>Why localhost-only makes sense</h3>
<p><strong>โ ๏ธ Security Reality</strong>:</p>
<pre><code>// This is why we can't deploy publicly yet
const apiKey = localStorage.getItem('together-api-key') // โ Exposed to all users
const validation = validateApiKey(apiKey, 'together') // โ Client-side validation only
// For production, we'd need:
const response = await fetch('/api/ai-proxy', { // โ
Server-side proxy
headers: { 'Authorization': `Bearer ${serverApiKey}` } // โ
Hidden from client
})</code></pre>
<p><strong>Current architecture strengths</strong>:</p>
<ul>
<li><strong>Rapid prototyping</strong>: Zero deployment friction for development</li>
<li><strong>Privacy-first</strong>: All processing happens locally</li>
<li><strong>Cost-effective</strong>: No server infrastructure required</li>
<li><strong>Educational</strong>: Perfect for learning XR development patterns</li>
</ul>
<p><strong>Honest limitations</strong>:</p>
<ul>
<li><strong>Localhost dependency</strong>: Requires local development server</li>
<li><strong>API key exposure</strong>: Client-side storage unsuitable for production</li>
<li><strong>Collaboration barriers</strong>: No built-in real-time collaborative editing</li>
<li><strong>Deployment complexity</strong>: Additional steps needed for public sharing</li>
</ul>
</section>
<section>
<h3><span class="emoji">๐ค</span> The opportunity and contribution pitch</h3>
<p>This architecture creates unique opportunities for the community:</p>
<p><strong><span class="emoji">๐</span> Immediate opportunities</strong>:</p>
<ul>
<li><strong>Educational platforms</strong>: Perfect for XR development courses</li>
<li><strong>Rapid prototyping</strong>: Fastest XR iteration cycle available</li>
<li><strong>Framework learning</strong>: Safe environment to experiment with Babylon.js, Three.js, R3F</li>
<li><strong>AI exploration</strong>: Test different models and parameters without cost pressure</li>
</ul>
<p><strong><span class="emoji">๐ค</span> Community contribution areas</strong>:</p>
<pre><code>// Help us build the production architecture
interface ProductionContributions {
serverProxy: {
description: "API key proxy with rate limiting"
technologies: ["Node.js", "Vercel", "Railway"]
impact: "Enable public deployment"
}
authentication: {
description: "OAuth flows for secure API key management"
technologies: ["Auth0", "Clerk", "Supabase"]
impact: "User account system with secure storage"
}
collaboration: {
description: "Real-time collaborative editing"
technologies: ["Socket.io", "Yjs", "Liveblocks"]
impact: "Multi-user XR scene development"
}
deployment: {
description: "One-click hosting with security"
technologies: ["Vercel", "Netlify", "Docker"]
impact: "Safe public scene sharing"
}
}</code></pre>
</section>
<section>
<h2><span class="emoji">โ๏ธ</span> Development commands and setup</h2>
<h3>Getting started with XRAiAssistant Station</h3>
<pre><code># Clone and setup (requires Node.js 20+, pnpm 8+)
git clone https://github.com/seacloud9/XRAiAssistant.git
cd XRAiAssistant/XrAiAssistantStation
# Install dependencies
pnpm install
# Start local development (localhost:3000 only)
pnpm dev
# Build for local testing
pnpm build && pnpm start</code></pre>
<h3>API key configuration</h3>
<ol>
<li><strong>Together.ai</strong> (free models): Get key at <a href="https://together.ai" target="_blank" rel="noopener">together.ai</a></li>
<li><strong>OpenAI</strong>: Get key at <a href="https://platform.openai.com" target="_blank" rel="noopener">platform.openai.com</a></li>
<li><strong>Anthropic</strong>: Get key at <a href="https://console.anthropic.com" target="_blank" rel="noopener">console.anthropic.com</a></li>
</ol>
<p>Replace "changeMe" defaults in Settings โ API Keys</p>
</section>
<section>
<h2><span class="emoji">๐ฏ</span> Why this architecture matters for XR development</h2>
<h3><span class="emoji">๐</span> Perfect for learning</h3>
<ul>
<li>Zero deployment complexity - just code and see results</li>
<li>Safe environment to experiment with expensive AI models</li>
<li>Framework comparison side-by-side</li>
<li>Real-time feedback without cost pressure</li>
</ul>
<h3><span class="emoji">๐</span> Rapid prototyping workflow</h3>
<pre><code>Idea โ AI prompt โ Generated code โ Live preview โ CodeSandbox share
โ โ
โโโโโโโโโโโโโโโ Iterate with team feedback โโโโโโโโโโโโโโโโโโโโ</code></pre>
<h3>Professional development pipeline</h3>
<p><strong>Local development</strong> (XRAiAssistant Station) โ <strong>Collaboration</strong> (CodeSandbox) โ <strong>Production</strong> (Custom deployment)</p>
<p>This three-stage pipeline separates concerns:</p>
<ol>
<li><strong>Private ideation</strong>: API keys and experimentation stay local</li>
<li><strong>Team collaboration</strong>: Share working demos without infrastructure</li>
<li><strong>Production deployment</strong>: Custom architecture with proper security</li>
</ol>
</section>
<section>
<h2><span class="emoji">๐ฎ</span> What's next: The production vision</h2>
<h3>Secure deployment architecture</h3>
<pre><code>// Future production-ready architecture
interface ProductionDeployment {
proxy: {
description: "Server-side API key management"
implementation: "Vercel Edge Functions + KV storage"
security: "Rate limiting, usage tracking, key rotation"
}
collaboration: {
description: "Real-time multi-user editing"
implementation: "Yjs + WebRTC data channels"
features: "Cursor tracking, voice chat, version history"
}
deployment: {
description: "One-click secure hosting"
implementation: "GitHub integration + automated SSL"
targets: "Custom domains, CDN optimization, analytics"
}
}</code></pre>
<h3>Universal platform support</h3>
<ul>
<li><strong>Mobile apps</strong>: React Native wrappers with native performance</li>
<li><strong>Desktop</strong>: Electron packaging with offline capabilities</li>
<li><strong>Web</strong>: Progressive Web App with service worker caching</li>
<li><strong>XR devices</strong>: Direct WebXR deployment for Quest, HoloLens, Apple Vision Pro</li>
</ul>
</section>
<section>
<h2><span class="emoji">๐</span> Try it today</h2>
<h3>For rapid prototyping</h3>
<pre><code>cd XRAiAssistant/XrAiAssistantStation
pnpm install && pnpm dev
# Open localhost:3000, configure API keys, start creating</code></pre>
<h3>For collaboration</h3>
<ol>
<li>Generate scenes locally</li>
<li>Deploy R3F scenes to CodeSandbox</li>
<li>Share live URLs with team</li>
<li>Iterate and fork as needed</li>
</ol>
<h3>For contribution</h3>
<ol>
<li>Fork the repository</li>
<li>Pick a contribution area</li>
<li>Join our Discord for coordination</li>
<li>Build the future of XR development</li>
</ol>
</section>
<section>
<h2>Conclusion: Local development as a launchpad</h2>
<p>XRAiAssistant Station proves that localhost development can be the foundation for universal platform ambitions. By starting with security, privacy, and developer experience, we're building toward a future where XR development is:</p>
<ul>
<li><strong>Accessible</strong>: Free to start, scalable to enterprise</li>
<li><strong>Collaborative</strong>: Real-time editing without infrastructure complexity</li>
<li><strong>Secure</strong>: Production-ready deployment with proper API key management</li>
<li><strong>Universal</strong>: Same codebase, multiple deployment targets</li>
</ul>
<p>The limitations are honest - API key exposure, localhost dependency, collaboration barriers. But they're also opportunities for the community to build solutions that benefit everyone.</p>
<p><strong>This is just the beginning.</strong> The future of AI-powered XR development is collaborative, secure, and universally accessible. Help us build it.</p>
</section>
<hr>
<section>
<h3><span class="emoji">๐</span> Links and resources</h3>
<ul>
<li><strong>XRAiAssistant</strong>: <a href="https://github.com/seacloud9/XRAiAssistant" target="_blank" rel="noopener">GitHub Repository</a></li>
<li><strong>Documentation</strong>: <a href="docs/" target="_blank" rel="noopener">Setup guides and API reference</a></li>
<li><strong>CodeSandbox</strong>: <a href="https://codesandbox.io/docs/learn/sandboxes/cli-api" target="_blank" rel="noopener">Define API</a> โข <a href="https://sandpack.codesandbox.io/" target="_blank" rel="noopener">Sandpack</a></li>
<li><strong>React Three Fiber</strong>: <a href="https://docs.pmnd.rs/react-three-fiber" target="_blank" rel="noopener">Docs</a> โข <a href="https://github.com/pmndrs/drei" target="_blank" rel="noopener">Drei</a></li>
<li><strong>Community</strong>: <a href="discord-link" target="_blank" rel="noopener">Discord</a> โข <a href="github-discussions" target="_blank" rel="noopener">Discussions</a></li>
</ul>
</section>
<h3>Tags</h3>
<p>#XRAiAssistant #NextJS #LocalDevelopment #WebXR #BabylonJS #ThreeJS #ReactThreeFiber #CodeSandbox #TogetherAI #OpenAI #Anthropic #TypeScript #iOS #Android #CrossPlatform</p>
<p style="text-align: center; margin-top: 40px;">
<em>Ready to build the future of XR development? Start locally, deploy globally, contribute universally. <span class="emoji">๐</span></em>
</p>
</body>
</html>