From a080de7c5b8cdfb4567e7bfb8ac2b930ac03899d Mon Sep 17 00:00:00 2001 From: Sumit Datta Date: Thu, 13 Jun 2024 21:30:13 +0530 Subject: [PATCH] Added documentation for setup; updated versions --- README.md | 4 +++ docs/SETUP.md | 59 +++++++++++++++++++++++++++++++++++++++++++ package.json | 4 +-- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/src/main.rs | 12 ++++----- 6 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 docs/SETUP.md diff --git a/README.md b/README.md index 768ed94e..76ca2376 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ In Dwata, we can have a chat with AI (Artificial Intelligence). We break the pro ![Recent chats with AI models](docs/assets/Home_screen_recent_chat_threads_0.0.2.png?raw=true "Recent chats with AI models") +## Want to try out Dwata? + +[Instructions to setup Dwata from sources](./docs/SETUP.md) + ## What does general purpose mean? Dwata is not geared toward a type of problem. It centers around the fact that recent AI models have become really good at comprehending human language. It is a new interface to the computer. diff --git a/docs/SETUP.md b/docs/SETUP.md new file mode 100644 index 00000000..09d20b88 --- /dev/null +++ b/docs/SETUP.md @@ -0,0 +1,59 @@ +# Setup Dwata from sources + +Note: I assume that we have some experience with running Git, Node.js (`npm` or `yarn` or `pnpm`) and similar commands on our terminals. + +## Software needed + +Dwata is built with Tauri, which is: + +> Tauri is a framework for building tiny, fast binaries for all major desktop and mobile platforms. Developers can integrate any frontend framework that compiles to HTML, JavaScript, and CSS for building their user experience while leveraging languages such as Rust, Swift, and Kotlin for backend logic when needed. + +[From: What is Tauri?](https://v2.tauri.app/start/) + +To setup Dwata, we need Rust and Node.js setup locally. Rust can be installed using rustup (please check if we already have Rust installed): + +[rustup](https://rustup.rs/) + +Node.js can be installed using (please check if we already have Node.js installed): + +[Node.js](https://nodejs.org/en/download/package-manager) + +After this, we will need `pnpm`, which is a package manager for Node.js: + +[pnpm](https://pnpm.io/installation) + +we will also need Git: + +[Git](https://git-scm.com/downloads) + +## Clone the repository + +I will use a dedicated directory where I store all my projects. We may create one for our needs or use our home folder. Open the terminal and clone the Dwata repository using: + +Note: `~`, tilde, means home folder on Linux, please change as we need. + +``` +cd ~/Projects +git clone git@github.com:brainless/dwata.git +``` + +## Setup dwata related dependencies + +Once we have cloned, we can change into this directory and installed needed dependencies. + +Assuming we are in the Projects or similar folder where we ran the previous commands: + +``` +cd dwata +pnpm install +``` + +## Run the project + +Once we have installed the dependencies, then we can run the project in development mode like this: + +``` +pnpm tauri dev +``` + +This will run the project in development mode. Documentation will soon be updated to build the app in release mode once we are ready. diff --git a/package.json b/package.json index dab648b4..12892b49 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dwata", - "version": "0.0.1", - "description": "AI enabled Business Intelligence (desktop) app", + "version": "0.0.8", + "description": "General purpose AI Studio", "type": "module", "scripts": { "start": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index eff7b631..cff3d8ee 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1038,7 +1038,7 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dwata" -version = "0.0.7" +version = "0.0.8" dependencies = [ "chrono", "comrak", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 6e33fc38..f58dc197 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -3,7 +3,7 @@ members = ["openai"] [package] name = "dwata" -version = "0.0.7" +version = "0.0.8" description = "An AI studio whee you connect your data sources and have convesations with AI" authors = ["Sumit Datta "] license = "Apache-2.0 license" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 2d37c477..c35159b5 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -26,12 +26,12 @@ mod workspace; fn setup(app: &mut App) -> Result<(), Box> { env_logger::init(); info!("Setting up Dwata"); - #[cfg(debug_assertions)] // only include this code on debug builds - { - let window = app.get_webview_window("main").unwrap(); - window.open_devtools(); - window.close_devtools(); - } + // #[cfg(debug_assertions)] // only include this code on debug builds + // { + // let window = app.get_webview_window("main").unwrap(); + // window.open_devtools(); + // window.close_devtools(); + // } let app_config_dir: PathBuf = app.path().app_config_dir().unwrap(); match tauri::async_runtime::block_on(async { workspace::helpers::get_database_connection(&app_config_dir).await