Skip to content

DawoodTouseef/jarvis-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Jarvis - AI-Powered Smart Home & Assistant Platform

License Python FastAPI Next.js

Jarvis is a comprehensive AI-powered smart home and assistant platform that combines advanced AI capabilities with Home Assistant integration. Built with a modern tech stack, Jarvis provides a complete solution for smart home automation, AI model management, knowledge base systems, and more.

🌟 Key Features

🏠 Smart Home Integration

  • Full Home Assistant API implementation
  • Real-time device control and monitoring
  • Entity, device, and area/room registry management
  • Event-driven architecture with comprehensive state tracking
  • Statistics and historical data analysis

πŸ€– AI Model Management

  • Multi-provider AI model support (OpenAI, Ollama, Anthropic, Google GenAI)
  • Model registry with versioning and provider management
  • Pipeline system for complex AI workflows
  • Evaluation arena for model comparison and testing

πŸ’¬ Advanced Chat Interface

  • Real-time WebSocket communication
  • Context-aware conversations with memory persistence
  • Multi-user chat channels and group management
  • Rich message formatting and file attachments

πŸ“š Knowledge Management

  • Intelligent document retrieval and search
  • Vector database integration (ChromaDB, Qdrant, Pinecone)
  • Content extraction from multiple file formats
  • Web search integration with multiple providers

🎡 Media & Content Processing

  • Audio transcription and text-to-speech
  • Image generation and processing
  • Video processing capabilities
  • Content analysis and tagging

πŸ”§ Developer Features

  • Comprehensive RESTful API with automatic documentation
  • WebSocket support for real-time updates
  • Extensible plugin architecture
  • Role-based access control and authentication

πŸ—οΈ Architecture Overview

Frontend

  • Framework: Next.js 15 with React 19
  • Styling: Tailwind CSS with Radix UI components
  • State Management: React Hooks and Context API
  • Real-time: Socket.IO client for WebSocket communication
  • UI Components: Custom dashboard with responsive design

Backend

  • Framework: FastAPI 0.118.0
  • Database: SQLAlchemy ORM with multiple database support
  • Authentication: JWT-based with OAuth and LDAP support
  • Caching: Redis integration
  • AI Libraries: LangChain, Transformers, OpenAI, Anthropic SDKs
  • Search: ChromaDB, Qdrant, Pinecone vector databases

Database Schema

  • Core Models: Users, Chats, Messages, Files, Folders
  • AI Models: Models, Pipelines, Functions, Tools
  • Home Assistant: States, Events, Statistics, Entity Registry
  • Knowledge: Documents, Collections, Retrieval systems
  • Media: Audio, Images, Videos with metadata

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • Node.js 18+
  • Docker (recommended for dependencies)
  • PostgreSQL, MySQL, or SQLite database

Installation

  1. Clone the repository:
git clone https://github.com/your-username/jarvis.git
cd jarvis
  1. Backend setup:
# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install Python dependencies
pip install -r requirements.txt
  1. Frontend setup:
# Install Node.js dependencies
npm install
  1. Environment configuration:
# Copy and configure environment variables
cp .env.example .env
# Edit .env with your configuration

Running the Application

Development Mode:

# Start backend server
python start.py

# In a separate terminal, start frontend development server
npm run dev

Production Mode:

# Build frontend
npm run build

# Start server
python start.py

The application will be available at:

πŸ“– API Documentation

Jarvis provides comprehensive API documentation automatically generated by FastAPI:

Core API Modules

Authentication

  • User registration and login
  • JWT token management
  • OAuth integration
  • Role-based access control

Home Assistant Integration

  • State management APIs
  • Event handling and firing
  • Service call execution
  • Registry management (entities, devices, areas)
  • Statistics and recording

AI Model Management

  • Model listing and creation
  • Provider integration (OpenAI, Ollama, Anthropic)
  • Pipeline execution and management
  • Model evaluation and comparison

Chat System

  • Message sending and retrieval
  • Channel and group management
  • File sharing and attachments
  • Real-time updates via WebSocket

Knowledge Base

  • Document upload and processing
  • Vector search and retrieval
  • Collection management
  • Content extraction and analysis

πŸ§ͺ Testing

Run the test suite with pytest:

pytest tests/

πŸ“¦ Building Executables

Jarvis can be compiled into standalone executables for Windows, Linux, and macOS that include both the frontend and backend:

Prerequisites

  • Python 3.8+
  • Node.js 18+
  • All development dependencies installed

Build Process

  1. Universal Build (Recommended):
python build-all.py
  1. Platform-Specific Builds:
  • Windows: build-windows.bat
  • Linux: build-linux.sh
  • macOS: build-macos.sh

For detailed instructions, see BUILDING.md.

The executable will:

  • Start the FastAPI backend on port 8080
  • Build and serve the Next.js frontend on port 3000
  • Run both services as a single application

πŸ› οΈ Configuration

Jarvis is highly configurable through environment variables. Key configuration options include:

  • Database: Multiple database backends supported
  • AI Providers: OpenAI, Anthropic, Ollama, Google GenAI
  • Vector Stores: ChromaDB, Qdrant, Pinecone, Elasticsearch
  • Authentication: JWT, OAuth, LDAP
  • File Storage: Local, S3, Azure Blob, Google Cloud Storage

🀝 Contributing

We welcome contributions to Jarvis! Please see our Contributing Guidelines for details on how to get started.

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Home Assistant community for inspiration
  • FastAPI and Next.js teams for excellent frameworks
  • Open source AI libraries and tools
  • All contributors to the project

πŸ“ž Support

For support, please open an issue on GitHub or contact the development team.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors