Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Peterfish/morphic

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Morphic - Custom Local AI Build

An AI-powered search engine with a generative UI - Configured for Local AI Models

capture

🎯 About This Fork

This is a customized version of Morphic configured to work exclusively with local AI models through OpenAI-compatible endpoints (like KoboldCpp). All cloud AI providers have been removed for a fully self-hosted experience.

Key Modifications

  • βœ… All models configured to use local AI endpoint
  • βœ… Interactive logo with eye-tracking mouse movement
  • βœ… Docker deployment optimized for local model usage
  • βœ… Removed dependency on cloud AI providers

πŸ—‚οΈ Overview

πŸ›  Features

Core Features

  • AI-powered search with GenerativeUI using local models
  • Natural language question understanding
  • Multiple search providers support (Tavily, SearXNG)
  • Interactive logo with eye-tracking animation
  • Reasoning models with visible thought process

Chat & History

  • Chat history functionality
  • Share search results
  • Redis support (Local/Docker)

Search Capabilities

  • URL-specific search
  • Video search support
  • SearXNG integration with:
    • Customizable search depth (basic/advanced)
    • Configurable engines
    • Adjustable results limit
    • Safe search options
    • Custom time range filtering

🧱 Stack

Core Framework

AI & Search

  • Local AI Model via OpenAI-compatible endpoint
  • KoboldCpp - Recommended local AI server
  • Tavily AI - Default search provider
  • SearXNG - Self-hosted search alternative

Data Storage

  • Redis - Caching and session storage

UI & Styling

πŸš€ Quickstart

Prerequisites

  • Docker and Docker Compose installed
  • A local AI model server (KoboldCpp recommended)
  • Node.js 18+ and Bun (for development)

1. Clone this repository

git clone https://github.com/Peterfish/morphic.git morphic-custom
cd morphic-custom

2. Set up KoboldCpp (Local AI Server)

# Clone and build KoboldCpp
git clone https://github.com/LostRuins/koboldcpp
cd koboldcpp
make

# Run with your preferred model
./koboldcpp --model path/to/your/model.gguf --port 5001

3. Configure environment

cp .env.local.example .env.local

Edit .env.local:

# Local AI Configuration
OPENAI_COMPATIBLE_API_KEY=any-key-will-work
OPENAI_COMPATIBLE_API_BASE_URL=http://localhost:5001/v1

# Search Configuration
TAVILY_API_KEY=your-tavily-api-key  # Get from https://app.tavily.com

# Optional
BASE_URL=http://localhost:3000

4. Run with Docker Compose

# Start all services
docker compose up -d

# Or if using separate KoboldCpp container
docker compose up -d && docker compose -f docker-compose.kobold.yaml up -d

Visit http://localhost:3030 in your browser.

🐳 Docker Deployment

Using Pre-built Image

docker pull ghcr.io/Peterfish/morphic-custom:latest

# Run with docker-compose
docker compose up -d

docker-compose.yaml Configuration

services:
  morphic:
    image: ghcr.io/Peterfish/morphic-custom:latest
    env_file: .env.local
    ports:
      - '3030:3000'
    depends_on:
      - redis
      - searxng

πŸ”§ Building Custom Image

See BUILD_CUSTOM_IMAGE.md for detailed instructions on:

  • Modifying the codebase for your needs
  • Building your own Docker image
  • Pushing to GitHub Container Registry
  • Deploying your custom build

πŸ”Ž Search Engine

Setting up Morphic as Default Search Engine

  1. Open your browser settings
  2. Navigate to search engine settings
  3. Add new search engine:
    • Name: Morphic Local
    • Keyword: morphic
    • URL: http://localhost:3030/search?q=%s
  4. Set as default search engine

πŸ” Troubleshooting

Common Issues

  1. Connection to AI model failed

    • Ensure KoboldCpp is running on port 5001
    • Check OPENAI_COMPATIBLE_API_BASE_URL in .env.local
  2. Search not working

    • Verify TAVILY_API_KEY is set correctly
    • Check SearXNG container is running
  3. Docker networking issues

    • Use container names for inter-container communication
    • Example: http://koboldcpp:5001/v1 instead of localhost

πŸ“ Development

# Install dependencies
bun install

# Run development server
bun dev

# Build for production
bun build

πŸ™ Credits

πŸ“„ License

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

About

An AI-powered search engine with a generative UI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.4%
  • Other 1.6%