Skip to content

Commit a58fcd0

Browse files
committed
refactor: flatten to single crate and make docs timeless
Move bitvault-app to repo root. Remove workspace, single crate at root. Update CI cache paths, Dockerfile, Makefile, README, .gitignore. Docs: remove temporal status notes, Future/Roadmap, dates. Replace Phase with Step. Fix broken links. Delete redundant/speculative docs: SIMPLE_TWO_INSTANCE_TEST, MULTISIG_TESTING_SUMMARY, ssh-guide, DUPLICATION_ANALYSIS, core-api, CODE_REUSE_STRATEGY, platform-security, ARCHITECTURE_PLAN, IMPLEMENTATION_READY, implementation-plan, UI_MODERNIZATION_PLAN. Update arch-linux-setup, architecture-overview, index, ai-context, CONTRIBUTING. Made-with: Cursor
1 parent e5ecfdb commit a58fcd0

154 files changed

Lines changed: 3992 additions & 8215 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.

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,13 @@ jobs:
5454
${{ runner.os }}-cargo-
5555
5656
- name: Build
57-
working-directory: bitvault-app
5857
run: cargo build --release
5958

6059
- name: Run tests
61-
working-directory: bitvault-app
6260
run: cargo test --release
6361

6462
- name: Clippy
65-
working-directory: bitvault-app
6663
run: cargo clippy --all-targets -- -D warnings
6764

6865
- name: Format check
69-
working-directory: bitvault-app
7066
run: cargo fmt --all -- --check

.github/workflows/nightly.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,17 @@ jobs:
5151
${{ runner.os }}-cargo-nightly-
5252
5353
- name: Build
54-
working-directory: bitvault-app
5554
run: cargo build --release
5655

5756
- name: Package binary
5857
shell: bash
59-
working-directory: bitvault-app
6058
run: |
61-
# Platform-specific packaging
6259
if [ "${{ runner.os }}" == "Linux" ]; then
63-
tar czf ../../bitvault-desktop-nightly-linux-x86_64-$(date +%Y-%m-%d).tar.gz target/release/bitvault-app
60+
tar czf bitvault-desktop-nightly-linux-x86_64-$(date +%Y-%m-%d).tar.gz target/release/bitvault-app
6461
elif [ "${{ runner.os }}" == "macOS" ]; then
65-
tar czf ../../bitvault-desktop-nightly-macos-$(date +%Y-%m-%d).tar.gz target/release/bitvault-app
62+
tar czf bitvault-desktop-nightly-macos-$(date +%Y-%m-%d).tar.gz target/release/bitvault-app
6663
elif [ "${{ runner.os }}" == "Windows" ]; then
67-
powershell Compress-Archive -Path target/release/bitvault-app.exe -DestinationPath ../../bitvault-desktop-nightly-windows-x86_64-$(date +%Y-%m-%d).zip
64+
powershell Compress-Archive -Path target/release/bitvault-app.exe -DestinationPath bitvault-desktop-nightly-windows-x86_64-$(date +%Y-%m-%d).zip
6865
fi
6966
7067
- name: Generate checksum

.github/workflows/release.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,21 @@ jobs:
5454
key: ${{ runner.os }}-cargo-release-${{ hashFiles('Cargo.lock') }}
5555

5656
- name: Build
57-
working-directory: bitvault-app
5857
run: cargo build --release
5958

6059
- name: Run tests
61-
working-directory: bitvault-app
6260
run: cargo test --release
6361

6462
- name: Package release
6563
shell: bash
66-
working-directory: bitvault-app
6764
run: |
6865
VERSION=${GITHUB_REF#refs/tags/v}
6966
if [ "${{ runner.os }}" == "Linux" ]; then
70-
tar czf ../../bitvault-desktop-${VERSION}-linux-x86_64.tar.gz target/release/bitvault-app
67+
tar czf bitvault-desktop-${VERSION}-linux-x86_64.tar.gz target/release/bitvault-app
7168
elif [ "${{ runner.os }}" == "macOS" ]; then
72-
tar czf ../../bitvault-desktop-${VERSION}-macos.tar.gz target/release/bitvault-app
69+
tar czf bitvault-desktop-${VERSION}-macos.tar.gz target/release/bitvault-app
7370
elif [ "${{ runner.os }}" == "Windows" ]; then
74-
powershell Compress-Archive -Path target/release/bitvault-app.exe -DestinationPath ../../bitvault-desktop-${VERSION}-windows-x86_64.zip
71+
powershell Compress-Archive -Path target/release/bitvault-app.exe -DestinationPath bitvault-desktop-${VERSION}-windows-x86_64.zip
7572
fi
7673
7774
- name: Generate checksum

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.cargo/
99

1010
# Cargo
11-
# Note: Cargo.lock should be committed for applications (bitvault-app)
11+
# Note: Cargo.lock should be committed for applications
1212
# but not for libraries. We keep it for the app.
1313
# **/Cargo.lock
1414

CONTRIBUTING.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,9 @@ For security issues, please follow the responsible disclosure process outlined i
2727

2828
### Project Structure
2929

30-
BitVault is a Rust workspace project with the following crates:
31-
- `bitvault-app` - Main application crate that ties everything together
32-
- `bitvault-core` - Core wallet functionality and cryptographic operations
33-
- `bitvault-common` - Shared utilities and types
34-
- `bitvault-ipc` - Inter-process communication between components
35-
- `bitvault-app` - User interface components (egui/eframe)
30+
BitVault Desktop is a Rust application (single crate at repo root):
31+
- `src/` - Application source, UI (egui/eframe), services, state
32+
- `bitvault-common` - Shared utilities and types (external dependency)
3633

3734
### Prerequisites
3835

@@ -44,8 +41,8 @@ BitVault is a Rust workspace project with the following crates:
4441

4542
1. Fork the repository
4643
2. Clone your fork locally
47-
3. Install dependencies with `make setup`
48-
4. Start the development server with `make dev`
44+
3. Install dependencies (Rust, egui deps — see [arch-linux-setup.md](docs/setup/arch-linux-setup.md) for platform-specific steps)
45+
4. Build and run with `cargo run` or `make dev`
4946

5047
## Development Workflow
5148

Cargo.toml

Lines changed: 80 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,91 @@
1-
[workspace]
2-
resolver = "2"
3-
default-members = ["bitvault-app"]
4-
members = [
5-
"bitvault-app", # Main egui application
6-
]
7-
8-
# Workspace-wide settings (shared by all members)
9-
[workspace.package]
1+
[package]
2+
name = "bitvault-app"
103
version = "0.1.0"
114
edition = "2021"
125
authors = ["BitVault Team"]
136
repository = "https://github.com/BitVaulty/bitvault-desktop"
147

15-
# Shared dependencies across workspace members
16-
[workspace.dependencies]
17-
# Common dependencies
8+
[lib]
9+
name = "bitvault_app"
10+
path = "src/lib.rs"
11+
12+
[features]
13+
default = ["native"]
14+
# Native: desktop/mobile with SQLite, HTTP, file system (used by app_state cfg)
15+
native = []
16+
17+
[dependencies]
18+
# GUI
19+
eframe = "0.27"
20+
egui = "0.27"
21+
egui_extras = { version = "0.27", features = ["svg"] }
22+
23+
# SVG icon rendering
24+
resvg = "0.37"
25+
usvg = "0.37"
26+
tiny-skia = "0.11"
27+
lazy_static = "1.4"
28+
29+
# Bitcoin - Use directly, no wrappers
30+
bdk = { version = "0.30", features = ["keys-bip39", "sqlite"] }
31+
bitcoin = "0.32"
32+
secp256k1 = "0.28"
33+
bip39 = "2.0"
34+
rand = "0.8"
35+
36+
# Shared library dependency
37+
# CI uses git, local dev uses path override via .cargo/config.toml
38+
bitvault-common = { git = "https://github.com/BitVaulty/bitvault-common.git", branch = "dev", features = ["keyring-storage"] }
39+
40+
# UR/QR
41+
ur = "0.4.1"
42+
qrcode = "0.14"
43+
quircs = "0.10"
44+
ciborium = "0.2"
45+
image = "0.25"
46+
rfd = "0.14" # File dialogs for image selection
47+
nokhwa = { version = "0.10", features = ["input-native"] } # Camera capture
48+
49+
# Infrastructure
50+
reqwest = { version = "0.12", features = ["json"] }
51+
tokio = { version = "1", features = ["full"] }
52+
rusqlite = { version = "0.31", features = ["bundled"] }
53+
keyring = "2.0"
1854
serde = { version = "1", features = ["derive"] }
1955
serde_json = "1"
2056
anyhow = "1.0.86"
57+
thiserror = "1.0"
58+
base64 = "0.22"
59+
tracing = "0.1"
60+
tracing-subscriber = "0.3"
61+
notify-rust = "4.11"
62+
chrono = { version = "0.4", features = ["serde"] }
63+
bs58 = "0.5"
64+
65+
# Logging
66+
simple_logger = "5.0"
2167
log = "0.4"
2268

23-
# Security-related dependencies
24-
zeroize = "1.7.0"
25-
getrandom = "0.3.2"
26-
aes-gcm = "0.10.3"
27-
rand = "0.9.0"
28-
rand_core = "0.9.3"
29-
argon2 = "0.5.2"
30-
hex = "0.4.3"
31-
32-
# Bitcoin dependencies (for reference, used in bitvault-app)
33-
bdk = "0.30"
34-
bitcoin = "0.32"
35-
secp256k1 = "0.28"
69+
# File system
70+
dirs = "5.0.1"
71+
toml = "0.8"
3672

37-
# Error handling
38-
thiserror = "1.0"
73+
# Platform-specific dependencies
74+
[target.'cfg(target_os = "windows")'.dependencies]
75+
windows = { version = "0.52", features = [
76+
"Security_Credentials_UI",
77+
"Foundation",
78+
"Win32_Graphics_Gdi",
79+
"Win32_UI_WindowsAndMessaging",
80+
] }
81+
82+
# macOS dependencies for biometric authentication
83+
[target.'cfg(target_os = "macos")'.dependencies]
84+
objc2 = "0.5"
85+
objc2-foundation = "0.2"
86+
87+
[dev-dependencies]
88+
# Testing
89+
tempfile = "3.10"
90+
tokio-test = "0.4"
91+
mockito = "1.2"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ WORKDIR /app
2727
COPY . .
2828

2929
RUN cargo test
30-
RUN cargo build --release -p bitvault-app
30+
RUN cargo build --release
3131

3232
# Stage 2: Runtime stage (as before)
3333
FROM debian:bullseye-slim

Makefile

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
1-
.PHONY: dev build release test core-test ui-test security-test clean lint check all wasm docs
1+
.PHONY: dev build release test clean lint check security-check all docs
22

33
# Primary development targets
44
dev:
5-
cargo run -p bitvault-app
5+
cargo run
66

77
build:
8-
cargo build --workspace
8+
cargo build
99

1010
release:
11-
cargo build --workspace --release
11+
cargo build --release
1212

1313
# Test targets
1414
test:
15-
cargo test --workspace
16-
17-
core-test:
18-
cargo test -p bitvault-common
19-
20-
ui-test:
21-
cargo test -p bitvault-app
22-
23-
security-test:
24-
cargo test -p bitvault-core --features security_tests
25-
./scripts/test-security-boundary.sh
15+
cargo test
2616

2717
# Security validation
2818
security-check:
2919
cargo audit
30-
cargo clippy --workspace -- -D warnings
31-
./scripts/check-security-boundaries.sh
20+
cargo clippy -- -D warnings
3221

3322
# Cleanup
3423
clean:
@@ -37,31 +26,30 @@ clean:
3726

3827
# Code quality
3928
lint:
40-
cargo clippy --workspace -- -D warnings
29+
cargo clippy -- -D warnings
4130
cargo fmt --all -- --check
4231

4332
check: lint security-check test
4433

45-
# Build wasm version (for future web interface)
34+
# Build wasm version (optional)
4635
# wasm:
47-
# cd bitvault-app && trunk build
48-
# Note: egui/eframe doesn't use trunk, this is for future web support
36+
# trunk build
4937

5038
# Run in development mode with security boundary logging
5139
dev-debug:
52-
BITVAULT_LOG=debug cargo run -p bitvault-app
40+
BITVAULT_LOG=debug cargo run
5341

5442
# Run with process isolation verification
5543
dev-secure:
56-
BITVAULT_VERIFY_ISOLATION=1 cargo run -p bitvault-app
44+
BITVAULT_VERIFY_ISOLATION=1 cargo run
5745

5846
# Generate documentation
5947
docs:
60-
cargo doc --workspace --no-deps
61-
@echo "Documentation available at target/doc/bitvault_common/index.html"
48+
cargo doc --no-deps
49+
@echo "Documentation available at target/doc/bitvault_app/index.html"
6250

6351
# Build all variants
64-
all: clean build release wasm
52+
all: clean build release
6553

6654
# Default target
6755
.DEFAULT_GOAL := build

README.md

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,47 @@
11
# BitVault Desktop
22

3-
Bitcoin wallet desktop application built with Rust + egui.
3+
Bitcoin multisig wallet desktop application built with Rust + egui.
44

55
## Architecture
66

7-
- **UI**: egui (immediate mode GUI)
7+
- **UI**: egui/eframe (immediate mode GUI)
88
- **Bitcoin**: BDK (used directly, no wrappers)
9-
- **Structure**: Clean separation between app logic and Bitcoin operations
9+
- **Shared logic**: bitvault-common (separate repo, git dependency)
1010

1111
## Quick Start
1212

1313
```bash
1414
# Build and run
15-
cargo run --bin bitvault-app
15+
cargo run
1616

1717
# Check compilation
18-
cargo check --workspace
18+
cargo check
1919

2020
# Run tests
21-
cargo test --workspace
21+
cargo test
2222
```
2323

2424
## Project Structure
2525

2626
```
2727
bitvault-desktop/
28-
├── bitvault-app/ # Main egui application
29-
│ ├── src/
30-
│ │ ├── app.rs # Main app struct
31-
│ │ ├── ui/ # UI screens
32-
│ │ ├── services/ # Service layer (uses BDK directly)
33-
│ │ ├── models/ # Data models
34-
│ │ ├── state/ # App state management
35-
│ │ └── utils/ # Utilities (UR/QR, etc.)
36-
│ └── Cargo.toml
37-
38-
└── bitvault-common/ # App-specific shared code
39-
├── src/
40-
│ ├── config.rs # Configuration
41-
│ ├── events.rs # Event system
42-
│ ├── error.rs # Error types
43-
│ └── ...
44-
└── Cargo.toml
28+
├── Cargo.toml
29+
├── src/ # Application source
30+
│ ├── app.rs # Main app struct
31+
│ ├── ui/ # UI screens
32+
│ ├── services/ # Service layer
33+
│ ├── state/ # App state management
34+
│ └── utils/ # UR/QR, etc.
35+
├── tests/
36+
├── resources/
37+
└── docs/
4538
```
4639

47-
## Key Principles
48-
49-
1. **Use BDK directly** - No wrappers around BDK
50-
2. **App-specific code in common** - Only non-Bitcoin logic
51-
3. **Clean architecture** - Clear separation of concerns
52-
4. **Mirror mobile structure** - Match Swift app organization
40+
**bitvault-common** is an external dependency (https://github.com/BitVaulty/bitvault-common). For local development, use a path override in `.cargo/config.toml` (gitignored).
5341

5442
## Development
5543

56-
See `ARCHITECTURE_PLAN.md` for detailed architecture documentation.
44+
- **Arch Linux**: [docs/setup/arch-linux-setup.md](docs/setup/arch-linux-setup.md)
45+
- **Architecture**: [docs/design/architecture-overview.md](docs/design/architecture-overview.md)
46+
- **Makefile**: `make dev`, `make test`, `make lint`
47+

0 commit comments

Comments
 (0)