Skip to content

Login#224

Closed
thestumonkey wants to merge 32 commits intoSimpleOpenSoftware:devfrom
Ushadow-io:login
Closed

Login#224
thestumonkey wants to merge 32 commits intoSimpleOpenSoftware:devfrom
Ushadow-io:login

Conversation

@thestumonkey
Copy link
Contributor

@thestumonkey thestumonkey commented Dec 21, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Added setup wizard for initial admin account creation.
    • Introduced comprehensive Settings UI for managing application configuration, API keys, and infrastructure status.
    • Added user API key generation and revocation capabilities.
    • Implemented MCP server for programmatic conversation access.
    • Added graceful feature degradation when API keys are missing.
  • Documentation

    • Added Quick Start guide and automated setup scripts for zero-configuration deployment.
  • UI/UX

    • Redesigned application layout with improved navigation and dark mode support.
    • Enhanced login page with setup flow integration.

✏️ Tip: You can customize this high-level summary in your review settings.

AnkushMalaker and others added 30 commits December 19, 2025 00:40
Updated project title to indicate it's a fork.
# Conflicts:
#	backends/advanced/webui/src/pages/Settings.tsx
#	backends/advanced/webui/src/services/api.ts
# Conflicts:
#	README-K8S.md
#	backends/advanced/src/advanced_omi_backend/auth.py
#	backends/advanced/src/advanced_omi_backend/services/mycelia_sync.py
#	backends/advanced/webui/package-lock.json
#	backends/advanced/webui/package.json
#	quickstart.md
#	tests/infrastructure/infra_tests.robot
#	tests/integration/websocket_streaming_tests.robot

# Conflicts:
#	README.md
#	app/app.json
#	backends/advanced/src/advanced_omi_backend/app_config.py
#	backends/advanced/src/advanced_omi_backend/auth.py
#	backends/advanced/src/advanced_omi_backend/controllers/system_controller.py
#	backends/advanced/src/advanced_omi_backend/database.py
#	backends/advanced/src/advanced_omi_backend/models/job.py
#	backends/advanced/src/advanced_omi_backend/routers/modules/health_routes.py
#	backends/advanced/src/advanced_omi_backend/services/memory/config.py
#	backends/advanced/src/advanced_omi_backend/services/memory/service_factory.py
#	backends/advanced/src/advanced_omi_backend/services/mycelia_sync.py
#	backends/advanced/webui/src/pages/System.tsx
#	tests/infrastructure/infra_tests.robot
#	tests/resources/transcript_verification.robot
#	tests/setup/test_env.py
- Deleted env_writer.py (no longer needed)
- Updated system_controller to read from config.yaml
- Moved config files to config/ folder
- Added config.defaults.yaml as committed template
- Simplified config_parser.py using ruamel.yaml
added offset to create multiple env
thestumonkey and others added 2 commits December 21, 2025 10:58
Removed default user details from defaults, you can use ./go and it will ask you for your user.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR introduces a comprehensive configuration system, multi-environment support, graceful degradation for missing API keys, initial admin setup flow, settings management API, UI overhaul, and infrastructure automation. It refactors environment management, adds modular Docker Compose files, implements dynamic configuration with MongoDB persistence, provides REST endpoints for settings, and includes interactive setup and automation scripts.

Changes

Cohort / File(s) Summary
Environment & Configuration Templates
.env.api-keys.template, .env.default, .env.secrets.template, .gitignore
New template files for API keys, default configuration, and secrets with guidance; expanded .gitignore to cover env files, certs, caches, and deprecated compose artifacts.
Docker Compose Infrastructure
backends/advanced/compose/backend.yml, backends/advanced/compose/frontend.yml, backends/advanced/compose/overrides/dev.yml, docker-compose.infra.yml, docker-compose.yml, compose/infrastructure-shared.yml, backends/advanced/docker-compose.yml, backends/advanced/docker-compose-test.yml
Modularized Docker Compose setup with separate backend, frontend, and infrastructure definitions; shared network (chronicle-network); test infrastructure now uses shared services with database/port isolation via environment variables.
Caddyfile & Reverse Proxy
backends/advanced/Caddyfile.template, caddy/Caddyfile
Added MCP routing block for /mcp/* requests; new Caddy root configuration for health checks and HTTPS guidance.
Makefile & Orchestration
Makefile
Comprehensive expansion: 40+ new targets for infrastructure, multi-environment, shared services, Caddy, and Mycelia management; rebranded to Friend-Lite; new quick-start, setup, and deployment workflows.
Backend Configuration System
backends/advanced/config/config.defaults.yaml, backends/advanced/src/advanced_omi_backend/config/*.py, backends/advanced/src/advanced_omi_backend/settings_models.py, backends/advanced/src/advanced_omi_backend/settings_manager.py
New ConfigParser class for YAML-based config management; ChronicleConfig schema; SettingsManager for MongoDB-backed settings with caching; 10+ Pydantic models for typed settings (speech detection, conversation, audio processing, etc.).
Backend API Key & Setup
backends/advanced/src/advanced_omi_backend/auth.py, backends/advanced/src/advanced_omi_backend/app_config.py, backends/advanced/src/advanced_omi_backend/utils/api_keys_manager.py
Optional ADMIN_PASSWORD; graceful degradation flag for missing API keys; async check_admin_exists; API key masking and file I/O utilities.
Backend Routes & Controllers
backends/advanced/src/advanced_omi_backend/routers/modules/setup_routes.py, backends/advanced/src/advanced_omi_backend/routers/modules/settings_routes.py, backends/advanced/src/advanced_omi_backend/routers/modules/system_routes.py, backends/advanced/src/advanced_omi_backend/routers/modules/health_routes.py, backends/advanced/src/advanced_omi_backend/routers/modules/user_routes.py, backends/advanced/src/advanced_omi_backend/routers/api_router.py
New setup routes for admin creation and status checks; comprehensive settings CRUD API; config/API key status endpoints; API key generation/revocation for users; enhanced health checks with URL reporting.
Backend Services
backends/advanced/src/advanced_omi_backend/services/mcp_server.py, backends/advanced/src/advanced_omi_backend/services/memory/config.py, backends/advanced/src/advanced_omi_backend/services/memory/service_factory.py, backends/advanced/src/advanced_omi_backend/services/transcription/__init__.py
MCP server for conversation tooling with list, get, and audio endpoints; graceful degradation in memory and transcription config with allow_missing_keys flag.
Backend App Factory
backends/advanced/src/advanced_omi_backend/app_factory.py
Config initialization during startup; ConfigBasedSettingsManager registration; optional admin user setup; MCP server integration.
Backend Data Models
backends/advanced/src/advanced_omi_backend/models/user.py
Added api_key and api_key_created_at fields to User and UserRead models.
Backend Settings Adapter
backends/advanced/src/advanced_omi_backend/config/settings_adapter.py
ConfigBasedSettingsManager bridging YAML config to SettingsManager-like interface with get/update methods for all setting categories.
Frontend Pages
backends/advanced/webui/src/pages/SetupPage.tsx, backends/advanced/webui/src/pages/Settings.tsx, backends/advanced/webui/src/pages/Conversations.tsx, backends/advanced/webui/src/pages/ConversationsRouter.tsx, backends/advanced/webui/src/pages/ConversationsTimeline.tsx, backends/advanced/webui/src/pages/Chat.tsx, backends/advanced/webui/src/pages/Queue.tsx, backends/advanced/webui/src/pages/LoginPage.tsx, backends/advanced/webui/src/pages/LiveRecord.tsx, backends/advanced/webui/src/pages/System.tsx
New SetupPage for admin creation; comprehensive Settings page with tabs for infrastructure, API keys, memory, LLM, speech, conversations; Conversations refactored to accept props for tab navigation; Chat, Queue, System pages enhanced with dark mode and new features; LoginPage adds setup redirect and health check.
Frontend Context & Hooks
backends/advanced/webui/src/contexts/AuthContext.tsx, backends/advanced/webui/src/contexts/RecordingContext.tsx, backends/advanced/webui/src/contexts/ThemeContext.tsx, backends/advanced/webui/src/hooks/useSimpleAudioRecording.ts
AuthContext now tracks setupRequired and provides checkSetupStatus; new RecordingContext for cross-tab recording state persistence; ThemeContext defaults to dark mode; useSimpleAudioRecording uses context state.
Frontend Components & Layout
backends/advanced/webui/src/components/layout/Layout.tsx, backends/advanced/webui/src/components/header/HeaderRecordButton.tsx, backends/advanced/webui/src/components/auth/ProtectedRoute.tsx, backends/advanced/webui/src/App.tsx
Major Layout overhaul with sticky header, user dropdown, settings navigation, card-styled sidebar; new HeaderRecordButton with waveform visualization; ProtectedRoute checks setupRequired; App adds RecordingProvider and new routes.
Frontend Styling
backends/advanced/webui/src/index.css, backends/advanced/webui/tailwind.config.js
Comprehensive Tailwind setup with custom color palette, typography, spacing, animations, and component classes; dark mode support throughout.
Frontend API Client
backends/advanced/webui/src/services/api.ts
New setupApi (getSetupStatus, createAdmin); extensive settingsApi with CRUD methods for all setting categories; systemApi augmented with config/API key endpoints.
Frontend Dockerfile & Dependencies
backends/advanced/webui/Dockerfile, backends/advanced/webui/package.json
Upgraded Node base image to 22-alpine; added npm --legacy-peer-deps; introduced VITE_BASE_PATH build arg; downgraded sass-embedded to ^1.80.7.
Backend Dependencies
backends/advanced/pyproject.toml
Replaced PyYAML with ruamel.yaml for YAML handling.
Automation Scripts
go.sh, quick-start.sh, clear.sh
New go.sh for quick web UI setup with auto-browser launch; quick-start.sh for zero-config development with environment prompts; clear.sh for admin reset workflow.
Documentation
QUICK_START.md, DEV_README.md, README.md
New QUICK_START.md with comprehensive guide; DEV_README.md for dev branch info; README title updated with fork attribution.
Kubernetes Scripts
scripts/generate-k8s-configs.py
Split secrets into environment credentials and API keys; renamed namespace/labels from chronicle to friend-lite.
Configuration Defaults
config-defaults.yml
New defaults for system, network, database, services, features, documentation with feature prerequisites and fallback behavior.
Tests
tests/setup/test_env.py, tests/infrastructure/infra_tests.robot
Replaced custom env loading with load_dotenv; added 20+ module constants for URLs, credentials, containers; minor Robot test formatting.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Areas requiring extra attention:

  • Configuration System Architecture — Multiple interdependent layers (ConfigParser, SettingsManager, ConfigBasedSettingsManager) with both YAML and MongoDB persistence; ensure consistency and migration paths.
  • Graceful Degradation Logic — allow_missing_api_keys flag threaded through memory, transcription, and app_config; verify fallback behavior across all providers.
  • Settings API Coverage — 20+ endpoints for CRUD operations on nested settings; validate permission checks (admin vs. user), parameter validation, and cache invalidation.
  • Docker Compose Modularization — Split across backend.yml, frontend.yml, infrastructure-shared.yml, and test configs; verify network connectivity, external network references, and port mappings across environments.
  • Frontend State Management — New RecordingContext with localStorage persistence and cross-tab sync; AuthContext setupRequired flow; ensure proper initialization order and cleanup.
  • MCP Server Implementation — Conversation list/get endpoints, user context vars, development bypass ("all"), audio file serving; validate ownership checks and error handling.
  • Makefile Expansion — 40+ new targets with complex interdependencies; verify target dependencies, variable precedence, and backwards compatibility.

Possibly related PRs

  • Test fix #187 — Modifies overlapping backend config and test infrastructure files (backends/advanced/docker-compose-test.yml, tests/setup/test_env.py, app_config.py); tests environment/config handling with shared changes.
  • Openmemory mcp #69 — Adds OpenMemory MCP memory-provider integration modifying memory service, config env vars, and MCP-related codepaths.
  • Merge mycelia memories #178 — Modifies memory/Mycelia integration codepaths, memory provider implementations, service factory/config, and mycelia sync scripts.

Suggested reviewers

  • AnkushMalaker
  • 0xrushi

Poem

🐰 Configuration flows like carrot wine,
Templates bloom in .env divine,
Settings dance in MongoDB's home,
While Quick Start scripts let rabbit roam,
Infrastructure shared, and dashboards shine—
Friend-Lite hops forth, by design! 🥕✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e79b70 and 2c78248.

⛔ Files ignored due to path filters (1)
  • backends/advanced/webui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (73)
  • .env.api-keys.template (1 hunks)
  • .env.default (1 hunks)
  • .env.secrets.template (1 hunks)
  • .gitignore (3 hunks)
  • DEV_README.md (1 hunks)
  • Makefile (13 hunks)
  • QUICK_START.md (1 hunks)
  • README.md (1 hunks)
  • backends/advanced/Caddyfile.template (2 hunks)
  • backends/advanced/compose/backend.yml (1 hunks)
  • backends/advanced/compose/frontend.yml (1 hunks)
  • backends/advanced/compose/overrides/dev.yml (1 hunks)
  • backends/advanced/config/config.defaults.yaml (1 hunks)
  • backends/advanced/docker-compose-test.yml (5 hunks)
  • backends/advanced/docker-compose.yml (1 hunks)
  • backends/advanced/pyproject.toml (1 hunks)
  • backends/advanced/src/advanced_omi_backend/app_config.py (3 hunks)
  • backends/advanced/src/advanced_omi_backend/app_factory.py (4 hunks)
  • backends/advanced/src/advanced_omi_backend/auth.py (2 hunks)
  • backends/advanced/src/advanced_omi_backend/config/__init__.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/config/config_parser.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/config/config_schema.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/config/settings_adapter.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/controllers/system_controller.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/models/user.py (2 hunks)
  • backends/advanced/src/advanced_omi_backend/routers/api_router.py (2 hunks)
  • backends/advanced/src/advanced_omi_backend/routers/modules/__init__.py (3 hunks)
  • backends/advanced/src/advanced_omi_backend/routers/modules/health_routes.py (14 hunks)
  • backends/advanced/src/advanced_omi_backend/routers/modules/settings_routes.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/routers/modules/setup_routes.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/routers/modules/system_routes.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/routers/modules/user_routes.py (2 hunks)
  • backends/advanced/src/advanced_omi_backend/services/mcp_server.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/services/memory/config.py (2 hunks)
  • backends/advanced/src/advanced_omi_backend/services/memory/service_factory.py (2 hunks)
  • backends/advanced/src/advanced_omi_backend/services/transcription/__init__.py (5 hunks)
  • backends/advanced/src/advanced_omi_backend/settings_manager.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/settings_models.py (1 hunks)
  • backends/advanced/src/advanced_omi_backend/utils/api_keys_manager.py (1 hunks)
  • backends/advanced/webui/Dockerfile (2 hunks)
  • backends/advanced/webui/package.json (1 hunks)
  • backends/advanced/webui/src/App.tsx (4 hunks)
  • backends/advanced/webui/src/components/auth/ProtectedRoute.tsx (2 hunks)
  • backends/advanced/webui/src/components/header/HeaderRecordButton.tsx (1 hunks)
  • backends/advanced/webui/src/components/layout/Layout.tsx (2 hunks)
  • backends/advanced/webui/src/contexts/AuthContext.tsx (4 hunks)
  • backends/advanced/webui/src/contexts/RecordingContext.tsx (1 hunks)
  • backends/advanced/webui/src/contexts/ThemeContext.tsx (1 hunks)
  • backends/advanced/webui/src/hooks/useSimpleAudioRecording.ts (4 hunks)
  • backends/advanced/webui/src/index.css (1 hunks)
  • backends/advanced/webui/src/pages/Chat.tsx (5 hunks)
  • backends/advanced/webui/src/pages/Conversations.tsx (3 hunks)
  • backends/advanced/webui/src/pages/ConversationsRouter.tsx (1 hunks)
  • backends/advanced/webui/src/pages/ConversationsTimeline.tsx (2 hunks)
  • backends/advanced/webui/src/pages/LiveRecord.tsx (3 hunks)
  • backends/advanced/webui/src/pages/LoginPage.tsx (4 hunks)
  • backends/advanced/webui/src/pages/Queue.tsx (49 hunks)
  • backends/advanced/webui/src/pages/Settings.tsx (1 hunks)
  • backends/advanced/webui/src/pages/SetupPage.tsx (1 hunks)
  • backends/advanced/webui/src/pages/System.tsx (6 hunks)
  • backends/advanced/webui/src/services/api.ts (3 hunks)
  • backends/advanced/webui/tailwind.config.js (1 hunks)
  • caddy/Caddyfile (1 hunks)
  • clear.sh (1 hunks)
  • compose/infrastructure-shared.yml (1 hunks)
  • config-defaults.yml (1 hunks)
  • docker-compose.infra.yml (1 hunks)
  • docker-compose.yml (1 hunks)
  • go.sh (1 hunks)
  • quick-start.sh (1 hunks)
  • scripts/generate-k8s-configs.py (1 hunks)
  • tests/infrastructure/infra_tests.robot (1 hunks)
  • tests/setup/test_env.py (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants