Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielroe/unsight.dev
Detect duplicate GitHub issues, areas of concern and more across related repositories.
https://github.com/danielroe/unsight.dev
ai clustering github machine-learning
Last synced: about 15 hours ago
JSON representation
Detect duplicate GitHub issues, areas of concern and more across related repositories.
- Host: GitHub
- URL: https://github.com/danielroe/unsight.dev
- Owner: danielroe
- Created: 2024-12-07T11:11:43.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-01-06T09:37:49.000Z (10 days ago)
- Last Synced: 2025-01-11T00:46:39.652Z (5 days ago)
- Topics: ai, clustering, github, machine-learning
- Language: TypeScript
- Homepage: https://unsight.dev
- Size: 1000 KB
- Stars: 106
- Watchers: 4
- Forks: 5
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# unsight.dev
> Detect duplicate GitHub issues, areas of concern and more across related repositories
- [π Β Check it out](https://unsight.dev/)
## β¨ Features
- Built on [Nuxt](https://nuxt.com/)
- [Nitro server API routes](https://nuxt.com/docs/guide/concepts/server-engine#server-engine)
- [GitHub API](https://docs.github.com/en/rest) and a [GitHub App](https://docs.github.com/en/apps/creating-github-apps)
- [UnoCSS](https://unocss.dev/)
- Deployed on [Cloudflare](https://cloudflare.com/) with [NuxtHub](https://hub.nuxt.com/), using [Workers AI](https://developers.cloudflare.com/workers-ai/#_top), [Workers KV](https://developers.cloudflare.com/kv/#_top) and [Vectorize](http://developers.cloudflare.com/vectorize/)
- Browser extension coming soon!## π Try it out locally
You can try the app out locally (for tweaking the UI) using the deployed API.
```
corepack enable
pnpm i
pnpm dev --ui-only
```This will fire up a dev server but use the remote API to populate it.
## π§ Development environment
Setting up a full development environment takes a little extra effort because `unsight.dev` is implemented as a GitHub App. Here's how to set things up.
### Setup
```sh
corepack enable
pnpm i
```### Start a local tunnel
```sh
npx ngrok http 3000
```Note the URL under `Forwarding`. It should look something like `https://.ngrok-free.app/`. We'll use this in the next step.
### Create a GitHub App for development
1. Navigate to the [GitHub Apps Settings panel](https://github.com/settings/apps) and click 'New GitHub App'.
1. Fill out the form, not changing any defaults:
- **GitHub App name**: Pick any name at all. I normally add `[dev]` at the end of any apps I'm using in development only.
- **Homepage URL**: Doesn't matter; just pick a URL: `https://unsight.dev` would be fine.
- **Setup URL**: `http://localhost:3000`. Tick the 'Redirect on update' checkbox underneath.
- **Webhook URL**: Put the URL you got when starting ngrok, plus `/github/webhook`: `https://.ngrok-free.app/github/webhook`. For the 'Secret' field underneath the URL, create a random GUID or password and make a note of it.
- **Repository permissions**: Select 'Issues': 'Read-only'.
- **Subscribe to events**: Select 'Installation target', 'Issues', 'Meta' and 'Repository'.1. Note down the `App ID:` in your GitHub App settings.
1. Note the 'slug' of your GitHub App. You should be at a URL that looks something like this `https://github.com/settings/apps/unsight-dev`. This last piece (`unsight-dev`) is your app slug.
1. Scroll down to the bottom of the GitHub App setings and click 'Generate a private key'. It should download. Unfortunately this private key is in PKCS#1 format, but we need PKCS#8 in a Cloudflare environment. Run the following command:
```sh
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in .pem -out -unsight-pkcs8.key
```(This outputs a private key file you'll use in the next step.)
### Configure your secrets
Create a `packages/web/.env` file with the following content (the private key was generated in the last step and can be multi-line, just add a quote before and after it):
```ini
NUXT_WEBHOOK_GITHUB_SECRET_KEY=
NUXT_PUBLIC_GITHUB_APP_SLUG=
NUXT_GITHUB_APP_ID=
NUXT_GITHUB_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
MIIEvcIBADAEBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoABADDbja1oaWVufjdT
...
+qWpvAnlgrGQqvbsuY+XuRnt
-----END PRIVATE KEY-----"
```### Link your Cloudflare account
We use Workers AI and to do that locally we'll need to hook up to Cloudflare. This project uses [NuxtHub](https://hub.nuxt.com/) to do that. You can get going by creating a free NuxtHub account at https://admin.hub.nuxt.com.
Then run this command in your app directory:
```sh
cd packages/web/
npx nuxthub link
```You can select 'Create a new project'. Any storage region should be fine. Your Nuxt dev server should restart, and you'll see a new `NUXT_HUB_PROJECT_KEY` variable in your `packages/web/.env` file.
You can now visit http://localhost:3000 and click 'Install as a GitHub app'.
You can now directly visit `http://localhost:3000//` to view your clusters.
### Preset repo
By default, in local development, we'll also index `nuxt/nuxt` and `nitrojs/nitro` so you don't have to register the GitHub app on any repository in order to see and play around with the cluster algorithm.
If you want to customise this, you can configure the `DEV_REPOS_TO_INDEX` environment variable.
```ini
# disable the feature entirely
DEV_REPOS_TO_INDEX=false# specify a comma-separated list of repositories
DEV_REPOS_TO_INDEX=unjs/h3,vuejs/core
```These repositories will automatically be indexed when you start your dev server.
> [!IMPORTANT]
> This only has an effect in development mode.## License
Made with β€οΈ
Published under [MIT License](./LICENCE).