Add Tauri app backend setup with dependencies and basic build script

- Introduced `build.rs` for Tauri build process initialization.
- Added `Cargo.toml` with dependencies for Tauri plugins, serialization, cryptography, and database handling.
- Generated `Cargo.lock` to lock package versions for consistency.
This commit is contained in:
natreex
2026-04-07 16:46:35 -04:00
parent 19c8d0057c
commit 36abdfced0
66 changed files with 15333 additions and 0 deletions

6588
src-tauri/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

47
src-tauri/Cargo.toml Normal file
View File

@@ -0,0 +1,47 @@
[package]
name = "eritorsscribe"
version = "0.5.0"
description = "ERitors Scribe - Desktop app for writers"
edition = "2021"
[lib]
name = "eritorsscribe_lib"
crate-type = ["lib", "cdylib", "staticlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = ["devtools"] }
tauri-plugin-shell = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
rusqlite = { version = "0.32", features = ["bundled"] }
aes = "0.8"
cbc = "0.1"
pbkdf2 = { version = "0.12", features = ["simple"] }
sha2 = "0.10"
hmac = "0.12"
hex = "0.4"
rand = "0.9"
bcrypt = "0.17"
hostname = "0.4"
thiserror = "2"
chrono = { version = "0.4", features = ["serde"] }
base64 = "0.22"
log = "0.4"
dirs-next = "2"
regex = "1"
uuid = { version = "1", features = ["v4"] }
reqwest = { version = "0.12", features = ["blocking", "json"] }
docx-rs = "0.4"
epub-builder = "0.7"
printpdf = "0.7"
keyring = { version = "3", features = ["apple-native", "windows-native", "sync-secret-service"] }
sha1 = "0.10"
tauri-plugin-http = "2.5.8"
[target.'cfg(any(target_os = "macos", windows, target_os = "linux"))'.dependencies]
tauri-plugin-process = "2.3.1"
tauri-plugin-updater = "2.10.1"

10
src-tauri/Info.plist Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>ERitors Scribe</string>
<key>CFBundleDisplayName</key>
<string>ERitors Scribe</string>
</dict>
</plist>

3
src-tauri/build.rs Normal file
View File

@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}

View File

@@ -0,0 +1,27 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Default capabilities for the main and login windows",
"windows": ["main", "login"],
"permissions": [
"core:default",
"core:window:allow-create",
"core:window:allow-close",
"core:window:allow-show",
"core:window:allow-hide",
"core:window:allow-set-focus",
"core:window:allow-center",
"core:webview:allow-create-webview-window",
"shell:allow-open",
"updater:default",
"process:allow-restart",
{
"identifier": "http:default",
"allow": [
{ "url": "https://api.eritors.com/**" },
{ "url": "https://scribe.eritors.com/**" },
{ "url": "https://eritors.com/**" }
]
}
]
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<false/>
</dict>
</plist>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"default":{"identifier":"default","description":"Default capabilities for the main and login windows","local":true,"windows":["main","login"],"permissions":["core:default","core:window:allow-create","core:window:allow-close","core:window:allow-show","core:window:allow-hide","core:window:allow-set-focus","core:window:allow-center","core:webview:allow-create-webview-window","shell:allow-open","updater:default","process:allow-restart",{"identifier":"http:default","allow":[{"url":"https://api.eritors.com/**"},{"url":"https://scribe.eritors.com/**"},{"url":"https://eritors.com/**"}]}]}}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
src-tauri/icons/128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src-tauri/icons/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src-tauri/icons/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#fff</color>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 B

BIN
src-tauri/icons/icon.icns Normal file

Binary file not shown.

BIN
src-tauri/icons/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src-tauri/icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

52
src-tauri/tauri.conf.json Normal file
View File

@@ -0,0 +1,52 @@
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-config-schema/schema.json",
"productName": "ERitors Scribe",
"version": "0.5.0",
"identifier": "com.eritors.scribe.desktop",
"build": {
"frontendDist": "../out",
"devUrl": "http://localhost:4000",
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build"
},
"app": {
"windows": [
{
"label": "main",
"title": "ERitors Scribe",
"width": 1200,
"height": 800,
"resizable": true,
"fullscreen": false,
"minWidth": 900,
"minHeight": 600
}
],
"security": {
"csp": "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://scribe.eritors.com; connect-src 'self' ipc: http://ipc.localhost https://api.eritors.com https://scribe.eritors.com; font-src 'self' data:"
}
},
"plugins": {
"updater": {
"endpoints": ["https://api.eritors.com/download/app/desktop/update/{{target}}/{{current_version}}"],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDI5OTQwMjI3Qjg3REZDNjgKUldSby9IMjRKd0tVS2NDQTVZNnphYUtPMElXTHBqYXpsSDFFVnNXQm01U1BZWjB2MVNicHRKN0EK"
}
},
"bundle": {
"active": true,
"createUpdaterArtifacts": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"macOS": {
"signingIdentity": null,
"hardenedRuntime": true,
"entitlements": "entitlements.mac.plist"
}
}
}