How abrar822/friday_ai works
Friday is a desktop AI assistant: the user chats or dictates a request, the backend interprets it into tasks, executes assistant actions, and returns text with spoken feedback. The frontend also exposes memory-location management, settings, and a PDF retrieval mode. The graph preserves those documented routes and sampled UI flows; several backend modules are listed in the source index but were not excerpted, so links into them are shown only where main.py explicitly registers or initializes them.
Main entry points: main.py FastAPI app · App.jsx App shell · llm_prompt_endpoint.py Prompt endpoint · api.js API base config
Components 33
Desktop client
- App shell
frontend/src/App.jsx - Chat and modes
frontend/src/components/Chatbox.jsx - Memory manager
frontend/src/pages/Memory.jsx - Settings page
frontend/src/pages/Settings.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Memory API client
frontend/src/helper/MemoryConnect.js - Chat API client
frontend/src/helper/FastapiConnect.js - PDF API client
frontend/src/helper/pdf_assistant_api.js - Settings API client
frontend/src/helper/setting_api.js - Speech API client
frontend/src/helper/sttConnect.js - API base config
frontend/src/config/api.js
Assistant API
- FastAPI app
backend/main.py - Prompt endpoint
backend/core/llm_prompt_endpoint.py - LLM task parsing
backend/core/llm.py - Task schema
backend/pydantic_models/task_router_models.py
Assistant capabilities
- Task executor
backend/core/TaskRouter.py - Browser actions
backend/friday_modules/browser_module/browser_module.py - Desktop actions
backend/friday_modules/desktop_module/desktop_module.py - File operations
backend/friday_modules/desktop_module/file_operations_sub_module.py - PDF assistant API
backend/friday_modules/pdf_assistant_module/pdf_ass_endpoints.py - PDF retrieval clients
backend/friday_modules/pdf_assistant_module/pdf_assistant_clients.py - Speech recognition API
backend/friday_modules/speech_to_text_module/stt_endpoints.py - Speech recognition
backend/friday_modules/speech_to_text_module/speech_to_text.py - Speech output
backend/friday_modules/text_to_speech_module/Piper_TTS/tts.py
Persistent memory
- Memory endpoints
backend/friday_modules/persistent_memory/memory_endpoints.py - Memory operations
backend/friday_modules/persistent_memory/memory_operations.py - Settings endpoints
backend/friday_modules/persistent_memory/setting_endpoints.py - Memory database
backend/friday_modules/persistent_memory/db.py - Shared settings state
backend/friday_modules/persistent_memory/storage_declarations.py - Settings queries
backend/friday_modules/persistent_memory/general_db_operations.py
Other components
- User
- Groq service
- Local LLM service
Connections 48
- User → App shell: uses
frontend/src/App.jsx - App shell → Chat and modes: renders
frontend/src/App.jsx - App shell → Memory manager: routes to
frontend/src/App.jsx - App shell → Settings page: routes to
frontend/src/App.jsx - App shell → Dashboard: routes to
frontend/src/App.jsx - Chat and modes → Chat API client: sends prompts
frontend/src/components/Chatbox.jsx - Chat and modes → PDF API client: queries PDFs
frontend/src/components/Chatbox.jsx - App shell → Speech API client: transcribes audio
frontend/src/App.jsx - App shell → Settings API client: loads settings
frontend/src/App.jsx - Memory manager → Memory API client: manages locations
frontend/src/pages/Memory.jsx - Memory API client → API base config: uses base URL
frontend/src/helper/MemoryConnect.js - Chat API client → API base config: uses base URL
- PDF API client → API base config: uses base URL
- Settings API client → API base config: uses base URL
- Speech API client → API base config: uses base URL
- Chat API client → FastAPI app: HTTP requests
- PDF API client → PDF assistant API: HTTP requests
- Settings API client → Settings endpoints: HTTP requests
- Speech API client → Speech recognition API: HTTP requests
- Memory API client → Memory endpoints: HTTP requests
- FastAPI app → Prompt endpoint: registers router
backend/main.py - FastAPI app → Memory endpoints: registers router
backend/main.py - FastAPI app → Settings endpoints: registers router
backend/main.py - FastAPI app → PDF assistant API: registers router
backend/main.py - FastAPI app → Speech recognition API: registers router
backend/main.py - Prompt endpoint → LLM task parsing: parses prompt
backend/core/llm_prompt_endpoint.py - Prompt endpoint → Task schema: validates tasks
backend/core/llm_prompt_endpoint.py - LLM task parsing → Groq service: requests completion
backend/core/llm.py - LLM task parsing → Local LLM service: requests completion
backend/core/llm.py - Prompt endpoint → Shared settings state: reads settings
backend/core/llm_prompt_endpoint.py - Prompt endpoint → Task executor: executes tasks
backend/core/llm_prompt_endpoint.py - Prompt endpoint → Speech output: speaks responses
backend/core/llm_prompt_endpoint.py - FastAPI app → Task executor: initializes
backend/main.py - FastAPI app → Speech output: initializes
backend/main.py - Task executor → Browser actions: dispatches tasks
- Task executor → Desktop actions: dispatches tasks
- Desktop actions → File operations: delegates file tasks
- PDF assistant API → PDF retrieval clients: delegates retrieval
- Speech recognition API → Speech recognition: transcribes audio
- Speech output → User: plays speech
backend/friday_modules/text_to_speech_module/Piper_TTS/tts.py - Memory endpoints → Memory operations: manages locations
- Memory endpoints → Memory database: reads and writes
- Settings endpoints → Memory database: reads and writes
- Settings endpoints → Settings queries: loads settings
- FastAPI app → Memory database: initializes
backend/main.py - FastAPI app → Shared settings state: loads settings
backend/main.py - FastAPI app → Settings queries: fetches settings
backend/main.py - FastAPI app → Memory operations: fetches locations
backend/main.py