Home
Softono
j

jakobhoeg

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
3

Software by jakobhoeg

nextjs-ollama-llm-ui
Open Source

nextjs-ollama-llm-ui

<div align="center"> <img src="ollama-nextjs-ui.gif"> </div> <h1 align="center"> Fully-featured web interface for Ollama LLMs </h1> <div align="center"> ![GitHub Repo stars](https://img.shields.io/github/stars/jakobhoeg/nextjs-ollama-llm-ui) </div> Get up and running with Large Language Models **quickly**, **locally** and even **offline**. This project aims to be the easiest way for you to get started with LLMs. No tedious and annoying setup required! > This is a hobby project. If you want a more complete experience, I suggest taking a look at [this](https://github.com/open-webui/open-webui) instead. # Features ✨ - **Beautiful & intuitive UI:** Inspired by ChatGPT, to enhance similarity in the user experience. - **Fully local:** Stores chats in localstorage for convenience. No need to run a database. - **Fully responsive:** Use your phone to chat, with the same ease as on desktop. - **Easy setup:** No tedious and annoying setup required. Just clone the repo and you're good to go! - **Code syntax highligting:** Messages that include code, will be highlighted for easy access. - **Copy codeblocks easily:** Easily copy the highlighted code with one click. - **Download/Pull & Delete models:** Easily download and delete models directly from the interface. - **Switch between models:** Switch between models fast with a click. - **Chat history:** Chats are saved and easily accessed. - **Light & Dark mode:** Switch between light & dark mode. # Preview https://github.com/jakobhoeg/nextjs-ollama-llm-ui/assets/114422072/08eaed4f-9deb-4e1b-b87a-ba17d81b9a02 # Requisites ⚙️ To use the web interface, these requisites must be met: 1. Download [Ollama](https://ollama.com/download) and have it running. Or run it in a Docker container. Check the [docs](https://github.com/ollama/ollama) for instructions. 2. Node.js (18+) and npm is required. [Download](https://nodejs.org/en/download) # Quick start with Docker ## Installation with prebuilt Docker image - **If Ollama is running on your pc**: ``` docker run -d -p 8080:3000 --add-host=host.docker.internal:host-gateway -e OLLAMA_URL=http://host.docker.internal:11434 --name nextjs-ollama-ui --restart always jakobhoeg/nextjs-ollama-ui:latest ``` - **If Ollama is on a different server than the Web UI**: ``` docker run -d -p 8080:3000 --add-host=host.docker.internal:host-gateway -e OLLAMA_URL=http://example.com:11434 --name nextjs-ollama-ui --restart always jakobhoeg/nextjs-ollama-ui:latest ``` > You can also change the default 8080 port if you wish. # Installation locally 📖 [![Packaging status](https://repology.org/badge/vertical-allrepos/nextjs-ollama-llm-ui.svg?columns=3)](https://repology.org/project/nextjs-ollama-llm-ui/versions) Use a pre-build package from one of the supported package managers to run a local environment of the web interface. Alternatively you can install from source with the instructions below. > [!NOTE] > If your frontend runs on something other than `http://localhost` or `http://127.0.0.1`, you'll need to set the OLLAMA_ORIGINS to your frontend url. > > This is also stated in the [documentation](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server): > > `Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default. Additional origins can be configured with OLLAMA_ORIGINS` ## Install from source **1. Clone the repository to a directory on your pc via command prompt:** ``` git clone https://github.com/jakobhoeg/nextjs-ollama-llm-ui ``` **2. Open the folder:** ``` cd nextjs-ollama-llm-ui ``` **3. Rename the `.example.env` to `.env`:** ``` mv .example.env .env ``` **4. If your instance of Ollama is NOT running on the default ip-address and port, change the variable in the .env file to fit your usecase:** ``` OLLAMA_URL="http://localhost:11434" ``` **5. Install dependencies:** ``` npm install ``` **6. Start the development server:** ``` npm run dev ``` **5. Go to [localhost:3000](http://localhost:3000) and start chatting with your favourite model!** # Upcoming features This is a to-do list consisting of upcoming features. - ✅ Voice input support - ✅ Code syntax highlighting - ✅ Ability to send an image in the prompt to utilize vision language models. - ✅ Ability to regenerate responses - ⬜️ Import and export chats # Tech stack [NextJS](https://nextjs.org/) - React Framework for the Web [TailwindCSS](https://tailwindcss.com/) - Utility-first CSS framework [shadcn-ui](https://ui.shadcn.com/) - UI component built using Radix UI and Tailwind CSS [shadcn-chat](https://github.com/jakobhoeg/shadcn-chat) - Chat components for NextJS/React projects [Framer Motion](https://www.framer.com/motion/) - Motion/animation library for React [Lucide Icons](https://lucide.dev/) - Icon library # Helpful links [Medium Article](https://medium.com/@bartek.lewicz/launch-your-own-chatgpt-clone-for-free-on-colab-shareable-and-online-in-less-than-10-minutes-da19e44be5eb) - How to launch your own ChatGPT clone for free on Google Colab. By Bartek Lewicz. [Lobehub mention](https://lobehub.com/blog/5-ollama-web-ui-recommendation#5-next-js-ollama-llm-ui) - Five Excellent Free Ollama WebUI Client Recommendations

AI & Machine Learning LLM Tools & Chat UIs
1.4K Github Stars
shadcn-chat
Open Source

shadcn-chat

> [!WARNING] > I am no longer actively maintaining this library. I suggest using either [this](https://ai-sdk.dev/elements/overview) or [this](https://www.prompt-kit.com/) library. [<img src="shadcn-preview.png">](https://shadcn-chat.vercel.app/) <h1 align="center">shadcn-chat</h1> <div align="center"> [![NPM Version](https://img.shields.io/npm/v/shadcn-chat-cli)](https://www.npmjs.com/package/shadcn-chat-cli) [![NPM Downloads](https://img.shields.io/npm/dw/shadcn-chat-cli)](https://www.npmjs.com/package/shadcn-chat-cli) [![Demo Website](https://img.shields.io/website?url=https%3A%2F%2Fshadcn-chat.vercel.app%2F)](https://shadcn-chat.vercel.app/) [![GitHub Repo stars](https://img.shields.io/github/stars/jakobhoeg/shadcn-chat)](https://github.com/jakobhoeg/shadcn-chat/stargazers) </div> <p align="center">Package for adding customizable and re-usable chat components to your applications. Build beautiful chat interfaces in minutes.</p> # Vercel AI SDK chatbot example https://github.com/user-attachments/assets/b137f6a2-4565-4b4a-8a58-a8dfe0b66a7a Build an AI support chatbot from scratch in less than five minutes! Find the code from the video [here](https://github.com/jakobhoeg/shadcn-chat/tree/master/examples/shadcn-chat-example-vercel-ai). # Documentation Check out the full documentation and API reference [here](https://docs-shadcn-chat.vercel.app/). # Installation > [!NOTE] > Some of the components rely on [shadcn-ui](https://ui.shadcn.com/docs/installation), so make sure to have it installed. Use the `add` command to add components to your project. It is recommended to install all components at once: ``` npx shadcn-chat-cli add --all ``` To view a list of all available components run the following command: ``` npx shadcn-chat-cli add ``` Otherwise, install individual components by running: ``` npx shadcn-chat-cli add [component] ``` # Contributing Contributions are more than welcome! Please make sure to read the [contributing guidelines](/CONTRIBUTING.md) first.

Web Development JavaScript Libraries & Components
1.6K Github Stars
enhanced-button
Open Source

enhanced-button

[<img src="ezgif-7-38e5f4fe19.gif">](https://enhanced-button.vercel.app/) # enhanced-button An enhanced version of the default **shadcn-button** component. Expands the default component by adding new beautiful button styles and features with minimal code, so you no longer have to create and manage multiple button components for your projects. [Demo](https://enhanced-button.vercel.app/) • [Preview](#Preview) • [Requisites](#Requisites) • [Installation](#Installation) • [Usage](#Usage) # Preview https://github.com/jakobhoeg/enhanced-button/assets/114422072/ee05475f-6502-4e7a-8bde-ae5144ece85e # Requisites [shadcn-ui](https://ui.shadcn.com/docs/installation) and [shadcn-ui button component](https://ui.shadcn.com/docs/components/button) must be installed in your project. # Installation All it takes is **two** copy & paste and you're ready to go. **_1. Copy the `button.tsx` component below and replace it with your existing one in `src/components/ui/button.tsx`_** **_2. Copy the lines from `tailwind.config.ts` to your existing file._** <details> <summary>button.tsx</summary> ```tsx import * as React from 'react'; import { Slot, Slottable } from '@radix-ui/react-slot'; import { cva, type VariantProps } from 'class-variance-authority'; import { cn } from '@/lib/utils'; const buttonVariants = cva( 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', { variants: { variant: { default: 'bg-primary text-primary-foreground hover:bg-primary/90', destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90', outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', ghost: 'hover:bg-accent hover:text-accent-foreground', link: 'text-primary underline-offset-4 hover:underline', }, effect: { expandIcon: 'group gap-0 relative', ringHover: 'transition-all duration-300 hover:ring-2 hover:ring-primary/90 hover:ring-offset-2', shine: 'before:animate-shine relative overflow-hidden before:absolute before:inset-0 before:rounded-[inherit] before:bg-[linear-gradient(45deg,transparent_25%,rgba(255,255,255,0.5)_50%,transparent_75%,transparent_100%)] before:bg-[length:250%_250%,100%_100%] before:bg-no-repeat background-position_0s_ease', shineHover: 'relative overflow-hidden before:absolute before:inset-0 before:rounded-[inherit] before:bg-[linear-gradient(45deg,transparent_25%,rgba(255,255,255,0.5)_50%,transparent_75%,transparent_100%)] before:bg-[length:250%_250%,100%_100%] before:bg-[position:200%_0,0_0] before:bg-no-repeat before:transition-[background-position_0s_ease] hover:before:bg-[position:-100%_0,0_0] before:duration-1000', gooeyRight: 'relative z-0 overflow-hidden transition-all duration-500 before:absolute before:inset-0 before:-z-10 before:translate-x-[150%] before:translate-y-[150%] before:scale-[2.5] before:rounded-[100%] before:bg-gradient-to-r from-white/40 before:transition-transform before:duration-1000 hover:before:translate-x-[0%] hover:before:translate-y-[0%]', gooeyLeft: 'relative z-0 overflow-hidden transition-all duration-500 after:absolute after:inset-0 after:-z-10 after:translate-x-[-150%] after:translate-y-[150%] after:scale-[2.5] after:rounded-[100%] after:bg-gradient-to-l from-white/40 after:transition-transform after:duration-1000 hover:after:translate-x-[0%] hover:after:translate-y-[0%]', underline: 'relative !no-underline after:absolute after:bg-primary after:bottom-2 after:h-[1px] after:w-2/3 after:origin-bottom-left after:scale-x-100 hover:after:origin-bottom-right hover:after:scale-x-0 after:transition-transform after:ease-in-out after:duration-300', hoverUnderline: 'relative !no-underline after:absolute after:bg-primary after:bottom-2 after:h-[1px] after:w-2/3 after:origin-bottom-right after:scale-x-0 hover:after:origin-bottom-left hover:after:scale-x-100 after:transition-transform after:ease-in-out after:duration-300', gradientSlideShow: 'bg-[size:400%] bg-[linear-gradient(-45deg,var(--gradient-lime),var(--gradient-ocean),var(--gradient-wine),var(--gradient-rust))] animate-gradient-flow', }, size: { default: 'h-10 px-4 py-2', sm: 'h-9 rounded-md px-3', lg: 'h-11 rounded-md px-8', icon: 'h-10 w-10', }, }, defaultVariants: { variant: 'default', size: 'default', }, } ); interface IconProps { icon: React.ElementType; iconPlacement: 'left' | 'right'; } interface IconRefProps { icon?: never; iconPlacement?: undefined; } export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> { asChild?: boolean; } export type ButtonIconProps = IconProps | IconRefProps; const Button = React.forwardRef<HTMLButtonElement, ButtonProps & ButtonIconProps>( ({ className, variant, effect, size, icon: Icon, iconPlacement, asChild = false, ...props }, ref) => { const Comp = asChild ? Slot : 'button'; return ( <Comp className={cn(buttonVariants({ variant, effect, size, className }))} ref={ref} {...props}> {Icon && iconPlacement === 'left' && (effect === 'expandIcon' ? ( <div className="w-0 translate-x-[0%] pr-0 opacity-0 transition-all duration-200 group-hover:w-5 group-hover:translate-x-100 group-hover:pr-2 group-hover:opacity-100"> <Icon /> </div> ) : ( <Icon /> ))} <Slottable>{props.children}</Slottable> {Icon && iconPlacement === 'right' && (effect === 'expandIcon' ? ( <div className="w-0 translate-x-[100%] pl-0 opacity-0 transition-all duration-200 group-hover:w-5 group-hover:translate-x-0 group-hover:pl-2 group-hover:opacity-100"> <Icon /> </div> ) : ( <Icon /> ))} </Comp> ); } ); Button.displayName = 'Button'; export { Button, buttonVariants }; ``` </details> <details> <summary>tailwind.config.ts</summary> ```diff const config = { extend: { keyframes: { + shine: { + '0%': { backgroundPosition: '200% 0' }, + '25%': { backgroundPosition: '-200% 0' }, + '100%': { backgroundPosition: '-200% 0' }, + }, + gradientFlow: { + '0%': { 'background-position':'0% 50%' }, + '50%': { 'background-position': '100% 50%' }, + '100%': { 'background-position': '0% 50%' }, + }, }, animation: { + shine: 'shine 3s ease-out infinite', + 'gradient-flow': 'gradientFlow 10s ease 0s infinite normal none running', }, }, } ``` </details> # Usage Example usage: ```tsx import { Button } from './ui/button'; <Button effect="expandIcon" icon={ArrowRightIcon} iconPlacement="right"> Icon right </Button>; ``` ```tsx import { Button } from './ui/button'; <Button effect="gooeyRight">Gooey right</Button>; ``` Mix with other variants: ```tsx import { Button } from './ui/button'; <Button variant="outline" effect="shineHover"> Outline with shine hover </Button>; ``` Check out the [demo](https://enhanced-button.vercel.app/) to see **all** the different styles.

CSS Frameworks & UI Kits Web Components & Widgets
927 Github Stars