base on An AI-powered search engine with a generative UI # Morphic An AI-powered search engine with a generative UI. ![capture](/public/screenshot-2025-05-04.png) ## ๐Ÿ—‚๏ธ Overview - ๐Ÿ›  [Features](#-features) - ๐Ÿงฑ [Stack](#-stack) - ๐Ÿš€ [Quickstart](#-quickstart) - ๐ŸŒ [Deploy](#-deploy) - ๐Ÿ”Ž [Search Engine](#-search-engine) - ๐Ÿ’™ [Sponsors](#-sponsors) - ๐Ÿ‘ฅ [Contributing](#-contributing) - ๐Ÿ“„ [License](#-license) ๐Ÿ“ Explore AI-generated documentation on [DeepWiki](https://deepwiki.com/miurla/morphic) ## ๐Ÿงช Try v1.0.0 Beta Want to experience the next generation of Morphic? The v1.0.0 beta is now available at [beta.morphic.sh](https://beta.morphic.sh)! This major update includes exciting new features like advanced search modes, PostgreSQL database, enhanced UI, and much more. Learn more about what's new in [Issue #680](https://github.com/miurla/morphic/issues/680). Your feedback helps shape the future of Morphic! ## ๐Ÿ›  Features ### Core Features - AI-powered search with GenerativeUI - Natural language question understanding - Multiple search providers support (Tavily, SearXNG, Exa) - Model selection from UI (switch between available AI models) - Reasoning models with visible thought process ### Authentication - User authentication powered by [Supabase Auth](https://supabase.com/docs/guides/auth) - Supports Email/Password sign-up and sign-in - Supports Social Login with Google ### Chat & History - Chat history functionality (Optional) - Share search results (Optional) - Redis support (Local/Upstash) ### AI Providers The following AI providers are supported: - OpenAI (Default) - Google Generative AI - Azure OpenAI - Anthropic - Ollama - Groq - DeepSeek - Fireworks - xAI (Grok) - OpenAI Compatible Models are configured in `public/config/models.json`. Each model requires its corresponding API key to be set in the environment variables. See [Configuration Guide](docs/CONFIGURATION.md) for details. ### Search Capabilities - URL-specific search - Video search support (Optional) - SearXNG integration with: - Customizable search depth (basic/advanced) - Configurable engines - Adjustable results limit - Safe search options - Custom time range filtering ### Additional Features - Docker deployment ready - Browser search engine integration ## ๐Ÿงฑ Stack ### Core Framework - [Next.js](https://nextjs.org/) - App Router, React Server Components - [TypeScript](https://www.typescriptlang.org/) - Type safety - [Vercel AI SDK](https://sdk.vercel.ai/docs) - Text streaming / Generative UI ### Authentication & Authorization (Updated Category) - [Supabase](https://supabase.com/) - User authentication and backend services ### AI & Search - [OpenAI](https://openai.com/) - Default AI provider (Optional: Google AI, Anthropic, Groq, Ollama, Azure OpenAI, DeepSeek, Fireworks) - [Tavily AI](https://tavily.com/) - Default search provider - Alternative providers: - [SearXNG](https://docs.searxng.org/) - Self-hosted search - [Exa](https://exa.ai/) - Neural search - [Firecrawl](https://firecrawl.dev/) - Web, news, and image search with crawling, scraping, LLM-ready extraction, and [open source](https://github.com/firecrawl/firecrawl). ### Data Storage - [Upstash](https://upstash.com/) - Serverless Redis - [Redis](https://redis.io/) - Local Redis option ### UI & Styling - [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework - [shadcn/ui](https://ui.shadcn.com/) - Re-usable components - [Radix UI](https://www.radix-ui.com/) - Unstyled, accessible components - [Lucide Icons](https://lucide.dev/) - Beautiful & consistent icons ## ๐Ÿš€ Quickstart ### 1. Fork and Clone repo Fork the repo to your Github account, then run the following command to clone the repo: ```bash git clone [email protected]:[YOUR_GITHUB_ACCOUNT]/morphic.git ``` ### 2. Install dependencies ```bash cd morphic bun install ``` ### 3. Configure environment variables ```bash cp .env.local.example .env.local ``` Fill in the required environment variables in `.env.local`: ```bash # Required for Core Functionality OPENAI_API_KEY= # Get from https://platform.openai.com/api-keys TAVILY_API_KEY= # Get from https://app.tavily.com/home ``` For optional features configuration (Redis, SearXNG, etc.), see [CONFIGURATION.md](./docs/CONFIGURATION.md) ### 4. Run app locally #### Using Bun ```bash bun dev ``` #### Using Docker ```bash docker compose up -d ``` Visit http://localhost:3000 in your browser. ## ๐ŸŒ Deploy Host your own live version of Morphic with Vercel, Cloudflare Pages, or Docker. ### Vercel [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmiurla%2Fmorphic&env=OPENAI_API_KEY,TAVILY_API_KEY,UPSTASH_REDIS_REST_URL,UPSTASH_REDIS_REST_TOKEN) ### Docker Prebuilt Image Prebuilt Docker images are available on GitHub Container Registry: ```bash docker pull ghcr.io/miurla/morphic:latest ``` You can use it with docker-compose: ```yaml services: morphic: image: ghcr.io/miurla/morphic:latest env_file: .env.local ports: - '3000:3000' volumes: - ./models.json:/app/public/config/models.json # Optional: Override default model configuration ``` The default model configuration is located at `public/config/models.json`. For Docker deployment, you can create `models.json` alongside `.env.local` to override the default configuration. ## ๐Ÿ”Ž Search Engine ### Setting up the Search Engine in Your Browser If you want to use Morphic as a search engine in your browser, follow these steps: 1. Open your browser settings. 2. Navigate to the search engine settings section. 3. Select "Manage search engines and site search". 4. Under "Site search", click on "Add". 5. Fill in the fields as follows: - **Search engine**: Morphic - **Shortcut**: morphic - **URL with %s in place of query**: `https://morphic.sh/search?q=%s` 6. Click "Add" to save the new search engine. 7. Find "Morphic" in the list of site search, click on the three dots next to it, and select "Make default". This will allow you to use Morphic as your default search engine in the browser. ## ๐Ÿ’™ Sponsors This project is proudly supported by: <a href="https://vercel.com/oss"> <img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge.svg" /> </a> ## ๐Ÿ‘ฅ Contributing We welcome contributions to Morphic! Whether it's bug reports, feature requests, or pull requests, all contributions are appreciated. Please see our [Contributing Guide](CONTRIBUTING.md) for details on: - How to submit issues - How to submit pull requests - Commit message conventions - Development setup ## ๐Ÿ“„ License This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. ", Assign "at most 3 tags" to the expected json: {"id":"9207","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"