How asim-stha/punte works
Punte is a web-controlled desktop buddy robot. Users log in, choose web or robot mode, then chat or control the robot; the UI can recognize and save faces, retain memory, and relay robot camera and sensor events. The backend owns API routing, authentication, AI and voice requests, and WebSocket relays, with selectable persistence and separate speech services. README relationships establish the deployment topology; sampled source confirms key frontend/backend calls. Unshown subsystem details and some network wiring are represented only where explicitly documented.
Main entry points: server.js API and WebSocket server · App.jsx UI and routing · storage.js Storage selection · useBuddy.js Buddy behavior
Components 24
Web experience
- UI and routing
frontend/src/App.jsx - Buddy behavior
frontend/src/hooks/useBuddy.js - Commands and chat logic
frontend/src/lib/commands.js - Chat, memory, settings
frontend/src/views - Robot display
frontend/src/components/RobotView.jsx - Web robot rendering
frontend/src/components/PunteRobot.jsx - 3D model
frontend/src/lib/punte3d.js - API client
frontend/src/api.js
Backend services
- API and WebSocket server
backend/server.js - Authentication
backend/lib/auth.js - AI proxy
backend/lib/ai.js - Text-to-speech
backend/lib/tts.js - Speech recognition client
backend/lib/stt.js - Piper speech service
tts/server.py - Whisper speech service
stt/server.py
Robot hardware
- ESP32 body
firmware/desktop_body/desktop_body.ino - ESP32 camera
firmware/esp32_cam/esp32_cam.ino
Persistence
- Storage selection
backend/lib/storage.js - PostgreSQL storage
backend/lib/storage-postgres.js - Supabase storage
backend/lib/storage-supabase.js - File storage
backend/lib/storage-file.js - Mirrored storage
backend/lib/storage-mirror.js - PostgreSQL database
database/init.sql
Other components
- User
Connections 27
- User → UI and routing: uses
README.md - UI and routing → Buddy behavior: creates
frontend/src/App.jsx - UI and routing → Chat, memory, settings: renders
frontend/src/App.jsx - UI and routing → Robot display: renders
frontend/src/App.jsx - UI and routing → Web robot rendering: renders
frontend/src/App.jsx - Buddy behavior → API client: requests
frontend/src/hooks/useBuddy.js - Buddy behavior → Commands and chat logic: uses
frontend/src/hooks/useBuddy.js - Web robot rendering → 3D model: loads
frontend/src/components/PunteRobot.jsx - API client → API and WebSocket server: calls API
frontend/src/api.js - API and WebSocket server → Authentication: authenticates
backend/server.js - API and WebSocket server → AI proxy: requests chat
backend/server.js - API and WebSocket server → Text-to-speech: requests speech
backend/server.js - API and WebSocket server → Speech recognition client: transcribes audio
backend/server.js - Text-to-speech → Piper speech service: calls service
README.md - Speech recognition client → Whisper speech service: calls service
README.md - Buddy behavior → ESP32 body: sends commands
README.md - ESP32 body → API and WebSocket server: connects WebSocket
README.md - ESP32 camera → API and WebSocket server: sends images
README.md - API and WebSocket server → Robot display: relays events
backend/server.js - API and WebSocket server → Storage selection: routes data
backend/server.js - Storage selection → PostgreSQL storage: selects
backend/lib/storage.js - Storage selection → Supabase storage: selects
backend/lib/storage.js - Storage selection → File storage: selects
backend/lib/storage.js - Storage selection → Mirrored storage: wraps stores
backend/lib/storage.js - Mirrored storage → PostgreSQL storage: delegates
backend/lib/storage-mirror.js - Mirrored storage → Supabase storage: delegates
backend/lib/storage-mirror.js - PostgreSQL storage → PostgreSQL database: reads and writes
backend/lib/storage-postgres.js