Skip to content

Commit 0b0a8a0

Browse files
committed
initial v0.1.x
0 parents  commit 0b0a8a0

112 files changed

Lines changed: 24066 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.browser/start.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# Launch Chrome with CDP for browser automation
3+
# Uses persistent profile in .browser/data for session persistence
4+
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
USER_DATA_DIR="$SCRIPT_DIR/data"
7+
CDP_PORT="${CDP_PORT:-9920}"
8+
9+
# Create data directory if it doesn't exist
10+
mkdir -p "$USER_DATA_DIR"
11+
12+
echo "Starting Chrome with CDP on port $CDP_PORT..."
13+
echo "Profile directory: $USER_DATA_DIR"
14+
15+
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
16+
--remote-debugging-port="$CDP_PORT" \
17+
--user-data-dir="$USER_DATA_DIR" \
18+
--no-first-run \
19+
--no-default-browser-check \
20+
--disable-background-timer-throttling \
21+
--disable-backgrounding-occluded-windows \
22+
--disable-renderer-backgrounding \
23+
"$@"

.changelog/v0.1.x.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Release v0.1.x
2+
3+
## Features
4+
5+
- Local web UI enhancement of FamilySearchFinder
6+
- Multi-platform genealogy provider support (FamilySearch, Ancestry, WikiTree, 23andMe)
7+
- Browser-based scraping with Playwright automation
8+
- Provider login credentials with encrypted storage for auto-authentication
9+
- FamilySearch-style ancestry tree visualization
10+
- Favorites system with sparse tree visualization
11+
- GEDCOM import/export support
12+
- Path finding between ancestors (shortest/longest/random)
13+
- Light/dark theme support
14+
15+
## Installation
16+
17+
```bash
18+
git clone https://github.com/atomantic/SparseTree.git
19+
cd SparseTree
20+
npm run install:all
21+
pm2 start ecosystem.config.cjs
22+
```

.github/workflows/ci.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main, dev]
6+
push:
7+
branches: [dev]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
# Skip if commit message contains [skip ci]
16+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
17+
18+
strategy:
19+
matrix:
20+
node-version: [20.x]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
30+
31+
- name: Install all dependencies
32+
run: npm run install:all
33+
34+
- name: Build shared types
35+
run: npm run build -w shared
36+
37+
- name: Build server
38+
run: npm run build -w server
39+
40+
- name: Build client
41+
run: npm run build -w client
42+
43+
lint:
44+
runs-on: ubuntu-latest
45+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
50+
- name: Use Node.js 20.x
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: 20.x
54+
cache: 'npm'
55+
56+
- name: Install dependencies
57+
run: npm run install:all
58+
59+
- name: Build shared types
60+
run: npm run build -w shared
61+
62+
- name: Check for TypeScript errors
63+
run: npm run build -w server && npm run build -w client
64+
65+
bump-build:
66+
runs-on: ubuntu-latest
67+
needs: [test, lint]
68+
# Only run on push to dev (not PRs), and skip if already a version bump commit
69+
if: github.event_name == 'push' && github.ref == 'refs/heads/dev' && !contains(github.event.head_commit.message, '[skip ci]')
70+
71+
steps:
72+
- uses: actions/checkout@v4
73+
with:
74+
token: ${{ secrets.GITHUB_TOKEN }}
75+
76+
- name: Configure git
77+
run: |
78+
git config user.name "github-actions[bot]"
79+
git config user.email "github-actions[bot]@users.noreply.github.com"
80+
81+
- name: Bump patch version
82+
run: |
83+
# Get current version
84+
CURRENT_VERSION=$(node -p "require('./package.json').version")
85+
86+
# Split into parts
87+
MAJOR=$(echo $CURRENT_VERSION | cut -d. -f1)
88+
MINOR=$(echo $CURRENT_VERSION | cut -d. -f2)
89+
PATCH=$(echo $CURRENT_VERSION | cut -d. -f3)
90+
91+
# Increment patch
92+
NEW_PATCH=$((PATCH + 1))
93+
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
94+
95+
# Update package.json files
96+
npm version $NEW_VERSION --no-git-tag-version
97+
cd shared && npm version $NEW_VERSION --no-git-tag-version && cd ..
98+
cd client && npm version $NEW_VERSION --no-git-tag-version && cd ..
99+
cd server && npm version $NEW_VERSION --no-git-tag-version && cd ..
100+
101+
# Commit and push
102+
git add package.json package-lock.json shared/package.json client/package.json server/package.json
103+
git commit -m "build: bump version to $NEW_VERSION [skip ci]"
104+
git push

.github/workflows/release.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
# Skip version bump commits
14+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Use Node.js 20.x
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20.x
26+
27+
- name: Configure git
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "github-actions[bot]@users.noreply.github.com"
31+
32+
- name: Get version from package.json
33+
id: package-version
34+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
35+
36+
- name: Check if tag exists
37+
id: tag-check
38+
run: |
39+
if git rev-parse "v${{ steps.package-version.outputs.version }}" >/dev/null 2>&1; then
40+
echo "exists=true" >> $GITHUB_OUTPUT
41+
else
42+
echo "exists=false" >> $GITHUB_OUTPUT
43+
fi
44+
45+
- name: Generate changelog
46+
id: changelog
47+
if: steps.tag-check.outputs.exists == 'false'
48+
run: |
49+
VERSION="${{ steps.package-version.outputs.version }}"
50+
MAJOR_MINOR=$(echo $VERSION | cut -d. -f1-2)
51+
52+
# Try exact version first (e.g., v0.10.5.md), then minor.x pattern (e.g., v0.10.x.md)
53+
CHANGELOG_FILE_EXACT=".changelog/v${VERSION}.md"
54+
CHANGELOG_FILE_PATTERN=".changelog/v${MAJOR_MINOR}.x.md"
55+
56+
if [ -f "$CHANGELOG_FILE_EXACT" ]; then
57+
# Use exact version changelog
58+
CHANGELOG=$(cat "$CHANGELOG_FILE_EXACT")
59+
elif [ -f "$CHANGELOG_FILE_PATTERN" ]; then
60+
# Use minor version pattern changelog (e.g., v0.10.x.md)
61+
CHANGELOG=$(cat "$CHANGELOG_FILE_PATTERN")
62+
# Replace version placeholder with actual version
63+
CHANGELOG=$(echo "$CHANGELOG" | sed "s/v${MAJOR_MINOR}.x/v${VERSION}/g" | sed "s/${MAJOR_MINOR}.x/${VERSION}/g")
64+
else
65+
# Fallback: Generate changelog from commits (exclude [skip ci] commits)
66+
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)
67+
COMMIT_LOG=$(git log $PREV_TAG..HEAD --pretty=format:"- %s" --no-merges | grep -v "\[skip ci\]" | head -50)
68+
69+
# Create a basic changelog structure
70+
CHANGELOG="# Release v${VERSION}
71+
72+
## Changes
73+
74+
${COMMIT_LOG}
75+
76+
## Installation
77+
78+
\`\`\`bash
79+
git clone https://github.com/atomantic/SparseTree.git
80+
cd SparseTree
81+
npm run install:all
82+
pm2 start ecosystem.config.cjs
83+
\`\`\`"
84+
fi
85+
86+
# Handle multiline output
87+
echo "changelog<<EOF" >> $GITHUB_OUTPUT
88+
echo "$CHANGELOG" >> $GITHUB_OUTPUT
89+
echo "EOF" >> $GITHUB_OUTPUT
90+
91+
- name: Create Release
92+
if: steps.tag-check.outputs.exists == 'false'
93+
uses: softprops/action-gh-release@v2
94+
with:
95+
tag_name: v${{ steps.package-version.outputs.version }}
96+
name: v${{ steps.package-version.outputs.version }}
97+
body: ${{ steps.changelog.outputs.changelog }}
98+
draft: false
99+
prerelease: false
100+
env:
101+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102+
103+
- name: Prep dev branch for next release
104+
if: steps.tag-check.outputs.exists == 'false'
105+
run: |
106+
# Get current version (the one we just released)
107+
CURRENT_VERSION=${{ steps.package-version.outputs.version }}
108+
MAJOR=$(echo $CURRENT_VERSION | cut -d. -f1)
109+
MINOR=$(echo $CURRENT_VERSION | cut -d. -f2)
110+
MAJOR_MINOR="$MAJOR.$MINOR"
111+
112+
# Increment minor, reset patch to 0
113+
NEW_MINOR=$((MINOR + 1))
114+
NEW_VERSION="$MAJOR.$NEW_MINOR.0"
115+
116+
# Checkout dev branch
117+
git fetch origin dev
118+
git checkout dev
119+
120+
# Rename and version the changelog file
121+
PATTERN_FILE=".changelog/v${MAJOR_MINOR}.x.md"
122+
VERSIONED_FILE=".changelog/v${CURRENT_VERSION}.md"
123+
124+
if [ -f "$PATTERN_FILE" ]; then
125+
# Rename the file (preserves git history)
126+
git mv "$PATTERN_FILE" "$VERSIONED_FILE"
127+
128+
# Replace version placeholders in the renamed file
129+
sed -i.bak "s/v${MAJOR_MINOR}\.x/v${CURRENT_VERSION}/g; s/${MAJOR_MINOR}\.x/${CURRENT_VERSION}/g" "$VERSIONED_FILE"
130+
rm "${VERSIONED_FILE}.bak"
131+
132+
# Commit the renamed and updated changelog
133+
git add "$VERSIONED_FILE"
134+
git commit -m "docs: archive changelog for v${CURRENT_VERSION} [skip ci]"
135+
git push origin dev
136+
137+
# Merge changelog back to main (without triggering CI)
138+
git checkout main
139+
git cherry-pick HEAD~1
140+
git push origin main
141+
git checkout dev
142+
fi
143+
144+
# Update package.json files for next version
145+
npm version $NEW_VERSION --no-git-tag-version
146+
cd shared && npm version $NEW_VERSION --no-git-tag-version && cd ..
147+
cd client && npm version $NEW_VERSION --no-git-tag-version && cd ..
148+
cd server && npm version $NEW_VERSION --no-git-tag-version && cd ..
149+
150+
# Commit and push version bump
151+
git add package.json package-lock.json shared/package.json client/package.json server/package.json
152+
git commit -m "build: prep v$NEW_VERSION for next release [skip ci]"
153+
git push origin dev

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Personal family tree data
2+
data/*.json
3+
data/*.tsv
4+
data/person/
5+
data/pruned/
6+
data/augment/
7+
data/photos/
8+
data/scrape/
9+
data/ai/
10+
11+
# Credentials (encrypted login info)
12+
data/credentials.json
13+
data/.credentials-key
14+
15+
# Browser automation (Chrome profile with auth cookies)
16+
.browser/data/
17+
18+
# Dependencies
19+
node_modules/
20+
21+
# Build outputs
22+
server/dist/
23+
client/dist/
24+
shared/types/
25+
26+
# IDE
27+
.vscode/
28+
.idea/
29+
30+
# Screenshots (may contain personal family data)
31+
images/

0 commit comments

Comments
 (0)