khoj/src/interface/desktop
sabaimran e8a13f0813
Add multi-user support to Khoj and use Postgres for backend storage (#549)
- Adds support for multiple users to be connected to the same Khoj instance using their Google login credentials
- Moves storage solution from in-memory json data to a Postgres db. This stores all relevant information, including accounts, embeddings, chat history, server side chat configuration
- Adds the concept of a Khoj server admin for configuring instance-wide settings regarding search model, and chat configuration
- Miscellaneous updates and fixes to the UX, including chat references, colors, and an updated config page
- Adds billing to allow users to subscribe to the cloud service easily
- Adds a separate GitHub action for building the dockerized production (tag `prod`) and dev (tag `dev`) images, separate from the image used for local building. The production image uses `gunicorn` with multiple workers to run the server.
- Updates all clients (Obsidian, Emacs, Desktop) to follow the client/server architecture. The server no longer reads from the file system at all; it only accepts data via the indexer API. In line with that, removes the functionality to configure org, markdown, plaintext, or other file-specific settings in the server. Only leaves GitHub and Notion for server-side configuration.
- Changes license to GNU AGPLv3

Resolves #467 
Resolves #488 
Resolves #303 
Resolves #345 
Resolves #195 
Resolves #280 
Resolves #461 
Closes #259 
Resolves #351
Resolves #301
Resolves #296
2023-11-16 11:48:01 -08:00
..
assets Remove references to demo 2023-11-04 17:17:04 -07:00
about.html Add About page for Khoj to Desktop app. Expose it via system tray 2023-11-03 23:59:21 -07:00
chat.html Update first run message on Desktop app with API token setup instructions 2023-11-15 22:44:11 -08:00
config.html Keep single Save button, Show next sync, default to prod Khoj URL in Desktop app 2023-11-09 14:04:58 -08:00
loading-animation.js Make splash screen wider, opaque and fix it's spinner radius 2023-11-03 23:59:21 -07:00
main.js Update first run message on Desktop app with API token setup instructions 2023-11-15 22:44:11 -08:00
package.json Add multi-user support to Khoj and use Postgres for backend storage (#549) 2023-11-16 11:48:01 -08:00
preload.js Update first run message on Desktop app with API token setup instructions 2023-11-15 22:44:11 -08:00
README.md Add front-end Electron application for Khoj local file syncing (#473) 2023-09-06 12:04:18 -07:00
renderer.js Remove the old syncData reference as it no longer exists 2023-11-10 10:10:07 -08:00
search.html Reduce data dumped in console log from web, desktop app 2023-11-11 02:05:07 -08:00
splash.html Show splash screen on starting desktop app 2023-11-03 03:19:08 -07:00
todesktop.json Add front-end Electron application for Khoj local file syncing (#473) 2023-09-06 12:04:18 -07:00
utils.js Add About page for Khoj to Desktop app. Expose it via system tray 2023-11-03 23:59:21 -07:00
yarn.lock Upgrade server, desktop app dependencies to resolve CVE bugs 2023-11-15 01:47:53 -08:00

Run it locally

Prerequisites

Install the runtime dependencies. This command should install all dev dependencies.

yarn add

Run the application

yarn start

Deploying the Electron App

Prerequisites

Install the ToDesktop CLI. Full documentation can be found here: https://www.npmjs.com/package/@todesktop/cli

yarn global add @todesktop/cli

Configure the todesktop.json file. Fill in the id based on the application ID.

Build

This will prompt you to login. It triggers builds for all platforms.

todesktop build

If you get an error saying the command is not found, make sure that your yarn global bin directory is in your PATH environment variable. You can find the location of the global bin directory by running yarn global bin. Add this line to your .bashrc or .zshrc file: export PATH="$PATH:$(yarn global bin)".