kayaayberk / generative-ui-github-assistant

An AI-powered GitHub search tool utilising Generative UI

Home Page:https://githubassistant.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generative UI: GitHub Assistant

Github Assistant is a chatbot that utilises GPT and Vercel AI SDK to generate UI elements on the fly based on user input by calling functions and APIs. It queries the user input and responds with interactive UI elements within the AI stream to make the experience of a developer a lot smoother.

View LIVE


NOTE: Actions related to GitHub without tight rate limits require authentication. Testing the app with a session is recommended.

🔍 Overview

📖 Walk-through

NOTE: Please beware that the search queries are conducted by the LLM (GPT-3-turbo) so sometimes it might bring out unexpected results.

Username search ~ Brings out the related profile UI component with related information and actions.

Example: Search for the username 'kayaayberk'

Search list of users ~ Brings out the people who appeared in the search conducted by the LLM presented in a UI component with different actions.

Example: Search for the people named John with more than 5 repositories located in London.

Repository search ~ Brings out the first 4 repositories that appeared in the search with related actions presented in a UI component.

Example: Search for the repositories that have 'state management' in description with more than 5.000 stars.

Directory content search ~ Brings out the searched repository directory with its content on each file.

Example: Search for ReduxJs/redux content directory.

Readme search ~ Brings out the full README.md of a searched repository in an organised format.

Example: Search for the readme of Shadcn/ui

You can also interact with these actions within the AI stream through presented UI components. Each component includes related actions.

Actions & Function calling

Actions and functions related to generative UI elements as well as the AI provider can be found in:

  • /lib/chat/actions.tsx
  • /lib/chat/submit-user-action.tsx
  • /lib/chat/submit-user-message.tsx

⚙️ Run on your local

1. Clone the repository

git clone https://github.com/kayaayberk/generative-ui-github-assistant.git

2. Install dependencies & run on localhost

cd generative-ui-github-assistant
npm install
npm run dev

3. Set up .env.local

OPENAI_API_KEY=[YOUR_OPENAI_API_KEY]

## Clerk Auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=[YOUR_NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY]
NEXT_PUBLIC_CLERK_SIGN_IN_URL=[PREFERRED_URL]
NEXT_PUBLIC_CLERK_SIGN_UP_URL=[PREFERRED_URL]
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=[PREFERRED_URL]
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=[PREFERRED_URL]

## Neon Database
DATABASE_URL=[YOUR_NEON_DATABASE_URL]

## GitHub OAuth app
GITHUB_CLIENT_ID=[YOUR_GITHUB_CLIENT_ID]
GITHUB_CLIENT_SECRET=[YOUR_GITHUB_CLIENT_SECRET]

🧱 Stack & Features

Frameworks & Libraries & Languages

Platforms

UI

About

An AI-powered GitHub search tool utilising Generative UI

https://githubassistant.vercel.app/


Languages

Language:TypeScript 99.3%Language:CSS 0.6%Language:JavaScript 0.1%