Skip to content

crafter-station/githunter

Repository files navigation

GitHunter

Hunt the git.

Pre-requisites

Setting environment

  1. Go to trigger.dev to get the DEVELOPMENT secret key (this is personal) and put it into TRIGGER_SECRET_KEY. This should have a format like tr_dev_.....
  2. Go to neon dashboard to get the DEVELOPMENT database url of your branch and put it into DATABASE_URL.
  3. Go to github settings to get your GITHUB_TOKEN.
  4. Go to Upstash Vector to create a vector index for search functionality.
    • Add the following variables to your .env:
      • UPSTASH_VECTOR_REST_URL
      • UPSTASH_VECTOR_REST_TOKEN
  5. Go to Mistral Console and generate your api key, then replace the MISTRAL_API_KEY in your .env file.
  6. Replace all variables in a .env file.

Development

  1. Run web platform:
bun install
bun dev
  1. Run background tasks:
bun x trigger.dev dev
  1. Deploy triggers (on updates):
npx trigger.dev@latest deploy

User Search Indexing

The application uses Upstash Vector for fast, typo-tolerant search capabilities. To index all users in the database:

bun index-users

This script will:

  1. Fetch all users from the database
  2. Index both username and fullname for each user
  3. Store relevant metadata for search results

For each user, two records are created in the vector database (one for username, one for fullname), making searching by either field efficient.

Important

All triggers must be declared inside of src/triggers.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages