Initial commit

This commit is contained in:
Aodhan Collins
2025-10-06 00:33:04 +01:00
commit 66749a5ce7
71 changed files with 22041 additions and 0 deletions

4291
src-tauri/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

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

@@ -0,0 +1,25 @@
[package]
name = "eve-assistant"
version = "0.1.0"
description = "EVE - Personal Desktop Assistant"
authors = ["you"]
license = ""
repository = ""
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1.5", features = [] }
[dependencies]
dotenvy = "0.15"
tauri = { version = "1.5", features = ["shell-open", "window-all"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", features = ["full"] }
[features]
# this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]

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

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

8
src-tauri/icons/.gitkeep Normal file
View File

@@ -0,0 +1,8 @@
# Placeholder for icons
# You'll need to add proper icon files here:
# - 32x32.png
# - 128x128.png
# - 128x128@2x.png
# - icon.icns (macOS)
# - icon.ico (Windows)
# - icon.png (Linux)

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

48
src-tauri/src/main.rs Normal file
View File

@@ -0,0 +1,48 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use serde::Serialize;
#[derive(Serialize, Clone)]
struct Keys {
openrouter_api_key: Option<String>,
elevenlabs_api_key: Option<String>,
}
#[tauri::command]
fn get_env_keys() -> Keys {
// In development, the CWD is `src-tauri/target/debug`, so we go up two levels
// to find the project root.
if let Ok(path) = std::env::current_dir() {
if let Some(p) = path.ancestors().nth(2) {
let env_path = p.join(".env");
dotenvy::from_path(env_path).ok();
}
} else {
dotenvy::dotenv().ok();
}
let openrouter_api_key = std::env::var("OPENROUTER_API_KEY").ok();
let elevenlabs_api_key = std::env::var("ELEVENLABS_API_KEY").ok();
Keys { openrouter_api_key, elevenlabs_api_key }
}
// Commands that can be called from the frontend
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! Welcome to EVE.", name)
}
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![greet, get_env_keys])
.setup(|_app| {
#[cfg(debug_assertions)]
{
// DevTools are available via F12 or the context menu
}
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

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

@@ -0,0 +1,57 @@
{
"build": {
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build",
"devPath": "http://localhost:1420",
"distDir": "../dist",
"withGlobalTauri": false
},
"package": {
"productName": "EVE",
"version": "0.1.0"
},
"tauri": {
"allowlist": {
"all": false,
"shell": {
"all": false,
"open": true
},
"window": {
"all": true,
"close": true,
"hide": true,
"show": true,
"maximize": true,
"minimize": true,
"unmaximize": true,
"unminimize": true,
"startDragging": true,
"setAlwaysOnTop": true
}
},
"bundle": {
"active": true,
"targets": "all",
"identifier": "com.eve.assistant"
},
"security": {
"csp": null,
"devCsp": "default-src 'self' 'unsafe-inline' 'unsafe-eval' http://localhost:1420; connect-src 'self' ws://localhost:1420"
},
"windows": [
{
"fullscreen": false,
"resizable": true,
"title": "EVE - Personal Desktop Assistant",
"width": 1200,
"height": 800,
"minWidth": 800,
"minHeight": 600,
"decorations": true,
"alwaysOnTop": false,
"transparent": false
}
]
}
}