Skip to content

Commit aa13d7d

Browse files
committed
feat: initial commit
0 parents  commit aa13d7d

Some content is hidden

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

69 files changed

+10936
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0"
3+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report
3+
about: Report a bug with the template
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
1. Run '...'
15+
2. See error
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Environment:**
21+
- OS: [e.g., macOS 14, Windows 11, Ubuntu 24.04]
22+
- Bun version: [e.g., 1.3.3]
23+
- Rust version: [e.g., 1.75.0]
24+
25+
**Additional context**
26+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an improvement to the template
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem?**
10+
A clear and concise description of what the problem is.
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context about the feature request here.

.github/TEMPLATE_README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# GitHub Template Setup
2+
3+
This repository is configured as a GitHub template.
4+
5+
## How to Use
6+
7+
### Option 1: Using `bun create` (Recommended)
8+
```bash
9+
bun create somus/create-tauri-react-app my-app
10+
cd my-app
11+
bun tauri dev
12+
```
13+
14+
### Option 2: GitHub "Use this template" button
15+
1. Click the green "Use this template" button on the repository page
16+
2. Select "Create a new repository"
17+
3. Choose your account/organization and repository name
18+
4. Clone your new repository
19+
5. Run `bun install` (the setup script will run automatically)
20+
21+
### Option 3: Using degit
22+
```bash
23+
# Using bun
24+
bunx degit somus/create-tauri-react-app my-app
25+
cd my-app
26+
bun install
27+
28+
# Using npm
29+
npx degit somus/create-tauri-react-app my-app
30+
cd my-app
31+
npm install
32+
33+
# Using pnpm
34+
pnpm dlx degit somus/create-tauri-react-app my-app
35+
cd my-app
36+
pnpm install
37+
```
38+
39+
## What happens after cloning
40+
41+
The `postinstall` script automatically runs an interactive setup (`scripts/setup.ts`) which:
42+
43+
1. **Prompts for project information**:
44+
- Project name
45+
- Product name (display name)
46+
- GitHub username or organization
47+
- Bundle identifier (e.g., `com.username.appname`)
48+
- Author name
49+
- Description
50+
51+
2. **Prompts for AI agent configuration**:
52+
- Multi-select from 27+ supported agents (claude, cursor, copilot, opencode, etc.)
53+
- Agents are ordered by popularity for easy selection
54+
- No agents are pre-selected by default
55+
56+
3. **Prompts for build configuration**:
57+
- Select target platforms for releases (macOS ARM64/Intel, Windows, Linux)
58+
- Enable code signing options (macOS notarization, Windows signing)
59+
- Customizes `.github/workflows/publish.yml` based on selections
60+
61+
4. **Automatically sets up development environment**:
62+
- Initializes a git repository (if not already in one)
63+
- Updates `.ruler/ruler.toml` with selected agents
64+
- Runs `ruler apply` to configure AI agent instructions
65+
- Installs Lefthook git hooks for pre-commit checks
66+
67+
5. **Skips silently on subsequent installs** (detects if already configured)
68+
69+
## Supported AI Agents
70+
71+
The setup script supports configuration for these AI coding agents (ordered by popularity):
72+
73+
**Popular**: claude, cursor, copilot, opencode, windsurf, cline, zed
74+
75+
**Mid-tier**: aider, amp, codex, gemini-cli, goose, kiro, roo
76+
77+
**Others**: agentsmd, amazonqcli, antigravity, augmentcode, crush, firebase, firebender, jules, junie, kilocode, openhands, qwen, trae, warp
78+
79+
## Release Automation
80+
81+
This template includes GitHub Actions workflows for automated releases:
82+
83+
### Workflows
84+
85+
- **release-please.yml** - Automatically creates Release PRs with version bumps and changelog updates when you push conventional commits to `main`
86+
- **publish.yml** - Builds the app for all selected platforms and creates a draft GitHub Release when a Release PR is merged
87+
88+
### Release Process
89+
90+
1. Push conventional commits to `main` (`feat:`, `fix:`, etc.)
91+
2. Review and merge the auto-generated Release PR
92+
3. Review and publish the draft GitHub Release
93+
94+
### Setup Required Before First Release
95+
96+
1. Generate an updater keypair: `bun tauri signer generate -w ~/.tauri/myapp.key`
97+
2. Update `src-tauri/tauri.conf.json` with your public key and GitHub repo URL
98+
3. Add secrets to GitHub repository settings:
99+
- `TAURI_SIGNING_PRIVATE_KEY`
100+
- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD`
101+
- (Optional) macOS code signing secrets for notarization
102+
103+
See [.ruler/RELEASING.md](../.ruler/RELEASING.md) for detailed documentation.
104+
105+
## Repository Settings
106+
107+
To mark this as a template repository on GitHub:
108+
1. Go to repository Settings
109+
2. Under "General", check "Template repository"

.github/release-please-config.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "node",
4+
"packages": {
5+
".": {
6+
"release-type": "node",
7+
"extra-files": [
8+
{
9+
"type": "json",
10+
"path": "src-tauri/tauri.conf.json",
11+
"jsonpath": "$.version"
12+
},
13+
{
14+
"type": "toml",
15+
"path": "src-tauri/Cargo.toml",
16+
"jsonpath": "$.package.version"
17+
}
18+
]
19+
}
20+
},
21+
"changelog-sections": [
22+
{ "type": "feat", "section": "Features" },
23+
{ "type": "fix", "section": "Bug Fixes" },
24+
{ "type": "perf", "section": "Performance Improvements" },
25+
{ "type": "refactor", "section": "Code Refactoring" },
26+
{ "type": "docs", "section": "Documentation", "hidden": true },
27+
{ "type": "style", "section": "Styles", "hidden": true },
28+
{ "type": "chore", "section": "Miscellaneous", "hidden": true },
29+
{ "type": "test", "section": "Tests", "hidden": true },
30+
{ "type": "build", "section": "Build System", "hidden": true },
31+
{ "type": "ci", "section": "CI/CD", "hidden": true }
32+
]
33+
}

.github/workflows/ci.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: latest
20+
21+
- name: Install dependencies
22+
run: bun install --frozen-lockfile
23+
24+
- name: Run lint check
25+
run: bun run check
26+
27+
typecheck:
28+
name: TypeScript
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Setup Bun
34+
uses: oven-sh/setup-bun@v2
35+
with:
36+
bun-version: latest
37+
38+
- name: Install Rust stable
39+
uses: dtolnay/rust-toolchain@stable
40+
41+
- name: Rust cache
42+
uses: swatinem/rust-cache@v2
43+
with:
44+
workspaces: "./src-tauri -> target"
45+
46+
- name: Install dependencies (Ubuntu)
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
50+
51+
- name: Install dependencies
52+
run: bun install --frozen-lockfile
53+
54+
- name: Generate TypeScript bindings
55+
run: cd src-tauri && cargo run --bin generate_bindings
56+
57+
- name: Run type check
58+
run: bun run typecheck
59+
60+
test:
61+
name: Test
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- name: Setup Bun
67+
uses: oven-sh/setup-bun@v2
68+
with:
69+
bun-version: latest
70+
71+
- name: Install Rust stable
72+
uses: dtolnay/rust-toolchain@stable
73+
74+
- name: Rust cache
75+
uses: swatinem/rust-cache@v2
76+
with:
77+
workspaces: "./src-tauri -> target"
78+
79+
- name: Install dependencies (Ubuntu)
80+
run: |
81+
sudo apt-get update
82+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
83+
84+
- name: Install dependencies
85+
run: bun install --frozen-lockfile
86+
87+
- name: Generate TypeScript bindings
88+
run: cd src-tauri && cargo run --bin generate_bindings
89+
90+
- name: Run tests
91+
run: bun run test
92+
93+
build:
94+
name: Build
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: actions/checkout@v4
98+
99+
- name: Setup Bun
100+
uses: oven-sh/setup-bun@v2
101+
with:
102+
bun-version: latest
103+
104+
- name: Install Rust stable
105+
uses: dtolnay/rust-toolchain@stable
106+
107+
- name: Rust cache
108+
uses: swatinem/rust-cache@v2
109+
with:
110+
workspaces: "./src-tauri -> target"
111+
112+
- name: Install dependencies (Ubuntu)
113+
run: |
114+
sudo apt-get update
115+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
116+
117+
- name: Install dependencies
118+
run: bun install --frozen-lockfile
119+
120+
- name: Generate TypeScript bindings
121+
run: cd src-tauri && cargo run --bin generate_bindings
122+
123+
- name: Build Tauri app
124+
run: bun tauri build --no-bundle

0 commit comments

Comments
 (0)