How thedevteam420/project-x works
Project Type & Purpose
• This is a client-side Single-Page Application (SPA) called “Project X: Quantum Neural Interface.”
• Purpose: enable users to converse with AI “digital personalities” via a WebGL/3D holographic interface, backed by Venice.ai and OpenAI embeddings.
File Structure
• Top-level folders:
• src/
– pages/ (route-level React pages)
– components/ (UI building blocks: ChatInterface, HologramScene, Banner3D, etc.)
– agents/ (TypeScript definitions for each AI character)
– store/ (Zustand hooks for state slices: agentStore, conspiracyStore, etc.)
– db/ (IndexedDB schema + wrapper)
– utils/ (API client modules for Venice.ai, OpenAI, Twilio, CSV loader, embeddings, neuralAI, rateLimiter)
– config/ (API endpoint config)
– types/ (domain models: agent, conspiracy, neural, etc.)
– hooks/ (custom React hooks)
– layouts/ (DashboardLayout)
• public/ (static assets: 3D models, CSV datasets, images)
• scripts/ (deploy.js)
• config files: Vite, Tailwind, Netlify, ESLint, tsconfig
README for Additional Insights
• Frontend: React 18 + TypeScript, React Three Fiber, Framer Motion, Tailwind CSS
• AI/ML: Venice.ai Chat API, OpenAI Embeddings, custom prompt engineering, semantic analysis
• Persistence: IndexedDB for conversation history
• Real-time: WebSocket support
• Future: Twilio voice, advanced hologram animations
a. Main Components
• User (Browser)
• UI Layer (React Components & Pages)
• 3D Rendering Engine (Three.js + React Three Fiber)
• State Management (Zustand stores)
• Persistence Layer (IndexedDB via src/db)
• API Layer (client wrappers in src/utils: venice.ts, openai.ts, twilio.ts, csvApi)
• External Services (Venice.ai, OpenAI Embeddings, Twilio, WebSocket endpoint)
• Static Asset Server (public folder served by Vite/Netlify)
b. Relationships & Data Flow
1. User action → React Component
2. Component dispatch → Zustand store update
3. Store effect → call API client (HTTP or WebSocket)
4. API client → External Service → response
5. Store receives data → updates state
6. React re-renders UI + 3D scene
7. Conversation history persisted → IndexedDB read/write
8. On load, CSV loader pulls datasets from public/csv
c. Architectural Patterns
• Feature-folder modularity
• Unidirectional data flow (React → Store → API → Store → React)
• Separation of concerns: UI, state, API, persistence
• Client-side rendering with progressive enhancement (3D, real-time, offline)
d. Key Technologies
• React/TypeScript, Zustand, IndexedDB, Three.js/R3F, Framer Motion, Tailwind
• Venice.ai Chat API, OpenAI Embeddings API, Twilio Voice, WebSocket