Skip to content

Commit 24b194a

Browse files
committed
Initial commit
0 parents  commit 24b194a

13 files changed

Lines changed: 2846 additions & 0 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: npm
30+
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v5
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Build site
38+
run: npm run build
39+
env:
40+
VITE_BASE_PATH: /ebird-hotspot-deduper/
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: dist
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
# Editor directories and files
18+
.vscode/*
19+
!.vscode/extensions.json
20+
.idea
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
*.sw?
26+
27+
*.tsbuildinfo
28+
29+
.eslintcache
30+
31+
# Cypress
32+
/cypress/videos/
33+
/cypress/screenshots/
34+
35+
# Vitest
36+
__screenshots__/
37+
38+
# Vite
39+
*.timestamp-*-*.mjs

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["Vue.volar"]
3+
}

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# eBird Hotspot Deduper
2+
3+
A minimal Vue 3 static web app that helps find likely duplicate eBird hotspots within a region.
4+
5+
The app:
6+
- asks for your eBird API token in an entry modal and stores it in `localStorage`
7+
- lets you search region by name (country/state) and resolves the region code
8+
- fetches hotspots from `GET /v2/ref/hotspot/{regionCode}`
9+
- computes hotspot pairs under a distance threshold slider (default `10` meters)
10+
- sorts candidates by distance (nearest first)
11+
- shows candidates in a list and on a Leaflet map
12+
- links each hotspot directly to the eBird edit page (`https://ebird.org/mylocations/edit/{locId}`)
13+
14+
## Tech stack
15+
16+
- Vue 3 + Vite
17+
- Bootstrap 5
18+
- Leaflet (OpenStreetMap tiles)
19+
- No backend (browser-only API calls)
20+
21+
## Local development
22+
23+
1. Install dependencies:
24+
25+
```bash
26+
npm install
27+
```
28+
29+
2. Start dev server:
30+
31+
```bash
32+
npm run dev
33+
```
34+
35+
3. Open the app, then provide:
36+
- eBird API token
37+
- region name (select one of the returned options)
38+
- optional threshold using the slider
39+
40+
Region name lookup uses eBird region endpoints:
41+
- `GET /v2/ref/region/list/country/world`
42+
- `GET /v2/ref/region/list/subnational1/{countryCode}`
43+
44+
## Build static site
45+
46+
```bash
47+
npm run build
48+
```
49+
50+
Build output is written to `dist/` and can be hosted as a static site.
51+
52+
## GitHub Pages
53+
54+
This repository includes `.github/workflows/deploy-pages.yml` that:
55+
- builds the app on pushes to `main`
56+
- sets `VITE_BASE_PATH=/${{ github.event.repository.name }}/`
57+
- deploys `dist/` to GitHub Pages
58+
59+
### One-time GitHub settings
60+
61+
1. In GitHub: `Settings` -> `Pages`
62+
2. Under **Build and deployment**, set **Source** to **GitHub Actions**
63+
64+
## Notes
65+
66+
- The app stores API token, selected region, threshold, and filter setting in `localStorage` for convenience.
67+
- The eBird hotspot payload may not always include checklist counts; those values are shown as `n/a` when unavailable.

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>eBird Hotspot Deduper</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.js"></script>
12+
</body>
13+
</html>

jsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"@/*": ["./src/*"]
5+
}
6+
},
7+
"exclude": ["node_modules", "dist"]
8+
}

0 commit comments

Comments
 (0)