Skip to content

Commit

Permalink
Merge pull request #131 from brainless/marketing/update_setup_instruc…
Browse files Browse the repository at this point in the history
…tions

Added documentation for setup; updated versions
  • Loading branch information
brainless authored Jun 13, 2024
2 parents 568ea51 + a080de7 commit 5e3cd76
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 10 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
59 changes: 59 additions & 0 deletions docs/SETUP.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sumitd@dwata.com>"]
license = "Apache-2.0 license"
Expand Down
12 changes: 6 additions & 6 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ mod workspace;
fn setup(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
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
Expand Down

0 comments on commit 5e3cd76

Please sign in to comment.