How peter-dated-projects/s.o.n.a. works
Project type and purpose
• From the file tree and README, S.O.N.A. is a full-stack voice assistant application (“Semantic Operational & Natural Assistant”).
• It comprises a Python-based backend exposing STT, streaming, storage APIs plus integrations (MCP functions, Whisper core, wake-word detection) and a TypeScript/Next.js frontend serving a web UI.
File structure
Top-level split:
• backend/ – Python backend
– api/ (REST/streaming/STT blueprints)
– assets/ (models: Porcupine wake-word, Whisper data)
– mcp_function/ (microservices‐style clients & servers for Google Workspace, Spotify, System, Terminal)
– models/ (ORM/data models)
– source/ (core request handlers, main entry-points)
– main.py, backend.py (application bootstrap)
– run_backend.sh, requirements.txt
• frontend/ – Next.js application
– src/app/ (pages, layouts, global CSS)
– public/ (static assets)
– config (ESLint, tsconfig, next.config)
• docs/, tests, scripts (test_psql.py, verify.py)
README for additional insights
• The README lists three primary API domains:
• /stt/* – Speech-to-Text
• /storage/* – Database operations
• /streaming/* – Real-time audio streaming
• It describes environment setup, Python 3.10, and points to the main backend entrypoint at backend/main.py
Detailed capture of architectural elements
– Inside the backend, subdivide into:
• Core pipeline (wake-word → STT → NLP/Intent → Response)
• Data layer (message store, session store)
• Integration layer (MCP functions as microservices)
• Asset store (models for wake-word, Whisper)
– Show optional dev/test scripts off to the side, illustrating how they target the APIs or database