Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .env.example

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy

on:
push:
branches: [main]

permissions:
contents: read

# Run one deploy at a time so an older commit can never finish after a newer one
concurrency:
group: deploy
cancel-in-progress: false

jobs:
test:
uses: ./.github/workflows/test.yml

deploy:
needs: test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Deploy to Cloudflare
run: bun run deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Run Tests

on:
push:
branches: [main]
pull_request:
branches: [main]
# Pushes to main run these tests through the Deploy workflow
workflow_call:

jobs:
test:
Expand All @@ -14,6 +14,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
Expand All @@ -27,3 +32,6 @@ jobs:

- name: Run lint
run: bun run lint

- name: Run build
run: bun run build
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@
# testing
/coverage

# next.js
/.next/
/out/

# production
/build
/dist/

# misc
.DS_Store
Expand All @@ -33,9 +29,9 @@ yarn-error.log*
.env*
!.env.example

# vercel
.vercel
# cloudflare
.wrangler
.dev.vars*

# typescript
*.tsbuildinfo
next-env.d.ts
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Getting Started

Install node v20+, bun v1.2+, then install package dependencies:
Install node v22+, bun v1.2+, then install package dependencies:

```bash
bun install
Expand All @@ -12,24 +12,25 @@ Run the development server:
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.

## Environment Variables
## Deployment

Create a `.env.local` file with the following variables:
The site is a static single-page app (Vite + React Router) served from Cloudflare Workers static assets. There is no server code: the browser queries ClickHouse directly, and paths like `/org/repo` fall back to `index.html` so the client-side router can handle them. Routing and domains are configured in `wrangler.jsonc`, response headers in `public/_headers`.

```bash
# Client-side ClickHouse fetching (optional)
NEXT_PUBLIC_USE_CLIENT_CLICKHOUSE=true
Preview the production build locally in the Workers runtime:

# GitHub API access (optional - for rate limiting)
GITHUB_TOKEN=your_github_personal_access_token_here
```bash
bun run preview
```

### Environment Variable Details:
Every push to `main` is tested and then deployed by GitHub Actions (`.github/workflows/deploy.yml`). It needs two repository secrets: `CLOUDFLARE_API_TOKEN`, created from Cloudflare's "Edit Cloudflare Workers" token template with both zones included, and `CLOUDFLARE_ACCOUNT_ID`.

To deploy from your machine instead (run `bunx wrangler login` once first):

- `NEXT_PUBLIC_USE_CLIENT_CLICKHOUSE`: Set to `true` to fetch ClickHouse data directly from the browser instead of the server. This reduces server load and provides faster navigation between pages.
- `GITHUB_TOKEN`: Optional GitHub personal access token to increase API rate limits when fetching repository metadata.
```bash
bun run deploy
```

## Update node packages

Expand Down
Loading
Loading