Skip to content

Commit 99c391f

Browse files
committed
feat: ci
1 parent 6b652f3 commit 99c391f

49 files changed

Lines changed: 2296 additions & 1236 deletions

Some content is hidden

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

.commitlintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"scope-enum": [
5+
2,
6+
"always",
7+
["ui", "tauri", "sync", "db", "tray", "notifications", "settings", "deps", "ci", "release"]
8+
]
9+
}
10+
}

.github/workflows/ci.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
lint-ui:
14+
name: Lint UI
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 10
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 24
28+
cache: pnpm
29+
30+
- name: Install dependencies
31+
run: pnpm install --frozen-lockfile
32+
33+
- name: Lint
34+
run: pnpm --filter ui check
35+
36+
test-ui:
37+
name: Test UI
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Setup pnpm
43+
uses: pnpm/action-setup@v4
44+
with:
45+
version: 10
46+
47+
- name: Setup Node.js
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 24
51+
cache: pnpm
52+
53+
- name: Install dependencies
54+
run: pnpm install --frozen-lockfile
55+
56+
- name: Test
57+
run: pnpm --filter ui test
58+
59+
lint-rust:
60+
name: Lint Rust
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
65+
- name: Setup Rust
66+
uses: dtolnay/rust-action@stable
67+
with:
68+
components: rustfmt, clippy
69+
70+
- name: Cache cargo
71+
uses: Swatinem/rust-cache@v2
72+
with:
73+
workspaces: src-tauri
74+
75+
- name: Install Tauri dependencies
76+
run: |
77+
sudo apt-get update
78+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
79+
80+
- name: Check formatting
81+
run: cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
82+
83+
- name: Clippy
84+
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings
85+
86+
build-check:
87+
name: Build Check
88+
runs-on: windows-latest
89+
steps:
90+
- uses: actions/checkout@v4
91+
92+
- name: Setup pnpm
93+
uses: pnpm/action-setup@v4
94+
with:
95+
version: 10
96+
97+
- name: Setup Node.js
98+
uses: actions/setup-node@v4
99+
with:
100+
node-version: 24
101+
cache: pnpm
102+
103+
- name: Setup Rust
104+
uses: dtolnay/rust-action@stable
105+
106+
- name: Cache cargo
107+
uses: Swatinem/rust-cache@v2
108+
with:
109+
workspaces: src-tauri
110+
111+
- name: Install dependencies
112+
run: pnpm install --frozen-lockfile
113+
114+
- name: Build UI
115+
run: pnpm --filter ui build
116+
117+
- name: Check Rust build
118+
run: cargo check --manifest-path src-tauri/Cargo.toml

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
name: Build & Release
14+
runs-on: windows-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: 10
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 24
27+
cache: pnpm
28+
29+
- name: Setup Rust
30+
uses: dtolnay/rust-action@stable
31+
32+
- name: Cache cargo
33+
uses: Swatinem/rust-cache@v2
34+
with:
35+
workspaces: src-tauri
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Build and Release
41+
uses: tauri-apps/tauri-action@v0
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
tagName: ${{ github.ref_name }}
46+
releaseName: 'Ntfier ${{ github.ref_name }}'
47+
releaseBody: |
48+
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.
49+
releaseDraft: true
50+
prerelease: false

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.1.0] - 2025-01-11
11+
12+
### Added
13+
14+
- Initial release
15+
- Subscribe to ntfy topics with real-time notifications
16+
- Multi-server support with authentication
17+
- System tray integration
18+
- Desktop notifications
19+
- Notification history with read/unread status
20+
- Theme system with multiple presets
21+
- Minimize to tray option
22+
- Start minimized option
23+
- Auto-start on system boot

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Ntfier
2+
3+
Desktop notification client for [ntfy](https://ntfy.sh).
4+
5+
## Requirements
6+
7+
This project uses [proto](https://moonrepo.dev/proto) for toolchain management:
8+
Install proto and run `proto install` to install the required toolchains.
9+
10+
## Development
11+
12+
```bash
13+
pnpm install
14+
pnpm dev
15+
```
16+
17+
## Build
18+
19+
```bash
20+
pnpm build
21+
```
22+
23+
Build outputs are located in `src-tauri/target/release/bundle/`.
24+
25+
## Project Structure
26+
27+
```
28+
ntfy-desktop/
29+
├── ui/ # React frontend (TanStack Router, Tailwind CSS)
30+
└── src-tauri/ # Rust backend (Tauri 2)
31+
```
32+
33+
## Linting & Formatting
34+
35+
**ui/**
36+
```bash
37+
pnpm ui:lint
38+
pnpm --filter ui format
39+
pnpm --filter ui check
40+
```
41+
42+
**src-tauri/**
43+
```bash
44+
cd src-tauri
45+
cargo fmt
46+
cargo lint
47+
```
48+
49+
## License
50+
51+
MIT

src-tauri/.cargo/config.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Cargo configuration for Ntfier
2+
# https://doc.rust-lang.org/cargo/reference/config.html
3+
4+
[alias]
5+
# Linting
6+
lint = "clippy --all-targets --all-features"
7+
lint-fix = "clippy --all-targets --all-features --fix --allow-dirty --allow-staged"
8+
9+
# Combined check (format + lint)
10+
ci = ["fmt --all -- --check", "clippy --all-targets --all-features"]
11+
12+
# Build aliases
13+
dev = "build --features tauri/devtools"
14+
prod = "build --release"

src-tauri/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,34 @@ keyring = { version = "3", features = ["apple-native", "windows-native", "sync-s
5959
specta = "=2.0.0-rc.22"
6060
tauri-specta = { version = "=2.0.0-rc.21", features = ["typescript"] }
6161
specta-typescript = "0.0.9"
62+
63+
# Workspace lints configuration
64+
[lints.rust]
65+
# Deny unsafe code
66+
unsafe_code = "deny"
67+
# Warn on missing docs for public items (optional, enable when ready)
68+
# missing_docs = "warn"
69+
70+
[lints.clippy]
71+
# Clippy lint groups
72+
all = { level = "warn", priority = -1 }
73+
pedantic = { level = "warn", priority = -1 }
74+
nursery = { level = "warn", priority = -1 }
75+
76+
# Deny dangerous patterns
77+
unwrap_used = "deny"
78+
expect_used = "deny"
79+
panic = "deny"
80+
81+
# Allow some pedantic lints that are too strict
82+
module_name_repetitions = "allow"
83+
must_use_candidate = "allow"
84+
missing_errors_doc = "allow"
85+
missing_panics_doc = "allow"
86+
too_many_lines = "allow"
87+
similar_names = "allow"
88+
struct_excessive_bools = "allow"
89+
fn_params_excessive_bools = "allow"
90+
if_not_else = "allow"
91+
match_same_arms = "allow"
92+
significant_drop_tightening = "allow"

src-tauri/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fn main() {
2-
tauri_build::build()
2+
tauri_build::build()
33
}

src-tauri/rustfmt.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Rustfmt configuration for Ntfier
2+
# https://rust-lang.github.io/rustfmt/
3+
# Only stable options are used (compatible with stable Rust)
4+
5+
# Use the 2021 edition style
6+
edition = "2021"
7+
8+
# Maximum line width
9+
max_width = 100
10+
11+
# Use spaces for indentation
12+
hard_tabs = false
13+
tab_spaces = 4
14+
15+
# Function formatting
16+
fn_params_layout = "Tall"
17+
18+
# Imports reordering
19+
reorder_imports = true
20+
reorder_modules = true
21+
22+
# Misc
23+
newline_style = "Auto"
24+
use_small_heuristics = "Default"
25+
use_field_init_shorthand = true
26+
use_try_shorthand = true
27+
force_explicit_abi = true

0 commit comments

Comments
 (0)