We welcome everyone to contribute to Repohistory. This document is to help you understand the process of contributing and ensure a smooth experience. Whether you're fixing a bug, adding a new feature, or improving the documentation, your help is appreciated.
Repohistory fetch repository data through GitHub Apps. You need to register a new GitHub App first:
- Since the development environment is local, you need to expose your local server to the internet. You can use ngrok for this purpose. Example:
ngrok http 3000
- Go to GitHub Developer Settings
- Click on "New GitHub App"
- Fill in the required fields:
- Callback URL:
http://127.0.0.1:3000/login
- Webhook URL:
https://your-exposed-url-in-step-one/api/webhooks
- Permissions & events:
Repository Administration: Read-only
,Repository Metadata: Read-only
- Clone the repository:
git clone https://github.com/repository/repository
- Navigate to the project directory:
cd repository
- Install dependencies:
yarn
- Install a containerization tool, such as Docker Desktop, OrbStack, podman desktop, or another alternative.
- Run Supabase:
npx supabase start
- Create
.env.local
file with following content:
APP_ID="your app id when you create a GitHub App"
NEXT_PUBLIC_APP_CLIENT_ID="your app client id when you create a GitHub App"
APP_CLIENT_SECRET="your app client secret when you create a GitHub App"
APP_WEBHOOK_SECRET="your app webhook secret when you create a GitHub App"
APP_PRIVATE_KEY="-----BEGIN PRIVATE KEY....END PRIVATE KEY----"
NEXT_PUBLIC_SITE_URL="http://127.0.0.1:3000"
SUPABASE_URL="API URL from step 5 output"
SUPABASE_ANON_KEY="anon key from step 5 output"
Note that GITHUB_APP_PRIVATE_KEY
should be in PKCS#8
format. You can convert the key using the following command:
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key
- Run the web app:
yarn run dev
- Install your GitHub App on your account, and then you can access the web app at http://127.0.0.1:3000