_README.md is a work-in-progress.
The AI-native, open source research workspace. Accelerating science.
Isaac is an AI-native, open-source research workspace that focuses on enhancing the scientific research experience by offering tools for writing, reference management, and literature discovery. It presents an IDE-like interface, streamlining the process of drafting research papers, organizing bibliographic information, and accessing a wide array of academic sources. The platform is designed to centralize these key aspects of research, making it easier for researchers to manage their writing process, keep track of references, and find relevant literature efficiently. Isaac aims to reduce the time and effort typically spent on these tasks, allowing researchers to focus more on the core aspects of their studies. This approach intends to bring a more systematic and organized methodology to scientific research, catering specifically to the needs of researchers looking for a comprehensive and integrated research workspace.
- Python 3.x
- Nodejs
- Supabase Account
- You can use the one-line installation script to install Isaac on your local machine. This script will bootstrap the Supabase instance and create the docker containers.
python ./setup.py
Don't forget to add the OpenAI and Stripe keys to the environment variables in
api/.env
andweb/.env
to unlock related features.
-
Install the Supabase CLI following the instructions here
-
Setup Supabase locally and migrate database schema by running the following command
npx supabase start
- Add the following environment variables to
api/.env.example
,web/.env.example
andweb/Dockerfile
. The values can be found in the output ofnpx supabase start
command.
Variable Name | Value |
---|---|
SUPABASE_KEY | anon key |
NEXT_PUBLIC_SUPABASE_KEY | anon key |
SUPABASE_SERVICE_KEY | service role key |
-
npx supabase status
can be used to check the status of the local Supabase instance. -
Fork the repo from here
-
Clone the forked repo to your local machine
git clone https://github.com/aietal/isaac.git
-
Add the other required environment variables to
api/.env.example
,web/.env.example
andweb/Dockerfile
-
Remove the "_local" suffix from the Dockerfile inside of the
web
directory. -
Start the
isaac-web
andisaac-api
containers with compose and remove-d
flag to see logs if needed
docker-compose up -d
-
Fork the repo from here
-
Clone the forked repo to your local machine
git clone https://github.com/aietal/isaac.git
Step 1: Go to api directory
cd api
Step 2: Create and activate Python virtual environment
For Mac/Linux:
python3 -m venv env
source env/bin/activate
For Windows:
py -m venv env
.\env\Scripts\activate
Step 3: Install dependencies
pip3 install --no-cache-dir -r requirements.txt "unstructured[all-docs]==0.10.10" "psycopg2-binary"
Step 4: Run api
OPENAI_API_KEY=sk-... python3 -m uvicorn app.main:app --host 0.0.0.0 --port 5001 --reload
Step 1: Set Up Your Supabase Account
To use Isaac, you first need a Supabase account. If you don't have one, sign up at Supabase. After signing up, create a new project in your Supabase account.
Step 2: Create Database Schema
Once your project is set up, you'll need to create a specific database schema for Isaac to work correctly. To do this, go to the SQL editor in your Supabase project and run the following scripts:
create table projects (
id uuid default uuid_generate_v4() primary key,
created_at timestamp default now(),
title text,
updated_at timestamp default now(),
"userId" uuid,
description text,
emoji text,
"sortingOrder" smallint
);
create table chat_sessions (
id uuid default uuid_generate_v4() primary key,
created_at timestamp default now() not null,
title text not null,
updated_at timestamp default now(),
type text not null,
project_id uuid references projects (id)
);
create table documents (
created_at timestamp default now(),
text json,
type text,
"userId" text,
title text not null,
id uuid default uuid_generate_v4() primary key,
"projectId" uuid,
updated_at timestamp default now()
);
create table isaac_messages (
id bigint not null primary key,
created_at timestamp default now(),
"userId" uuid,
"projectId" uuid,
type character,
content jsonb,
updated_at timestamp default now()
);
create table profile (
id uuid not null references auth.users on delete cascade,
created_at timestamp default now(),
is_subscribed boolean,
interval text,
stripe_customer text,
email text,
first_name text,
last_name text,
plan text,
has_seen_tour boolean,
expiration_date date default now(),
updated_at timestamp default now(),
has_seen_latest_update boolean,
daily_free_token smallint,
has_seen_community_banner boolean not null,
custom_instructions jsonb,
editor_language text not null
);
create function create_profile_for_user()
returns trigger
language plpgsql
security definer
as $$
begin
insert into public.profile(id, email)
values (new.id, new.email);
return new;
end;
$$;
create table notes (
id uuid default uuid_generate_v4() primary key,
"projectId" uuid references projects (id),
text json,
created_at timestamp default now(),
updated_at timestamp default now()
);
create table "references" (
id uuid default uuid_generate_v4() primary key,
created_at timestamp default now(),
title text,
authors json,
year text,
doi text,
"projectId" uuid default uuid_generate_v4(),
tldr text,
pdf text,
updated_at timestamp default now(),
type text,
source text,
sourceId text,
url text,
abstract text
);
create table comments (
id uuid default uuid_generate_v4() primary key,
quote text,
type text,
comments json[],
"documentId" text,
created_at timestamp default now() not null,
updated_at timestamp default now()
);
CREATE TYPE upload_processing_status AS ENUM ('pending', 'processing', 'completed');
create extension vector with schema extensions;
create table uploads (
id uuid default uuid_generate_v4() primary key,
created_at timestamp default now(),
user_id uuid default uuid_generate_v4(),
status public.upload_processing_status not null,
citation jsonb,
project_id uuid references projects (id),
file_name text,
custom_citation jsonb,
updated_at timestamp default now(),
type text,
abstract text,
tldr text
);
create table chat_messages (
id uuid default uuid_generate_v4() primary key,
created_at timestamp default now() not null,
content text,
session_id uuid references chat_sessions (id),
metadata jsonb,
role text not null,
note_id uuid references notes (id)
);
create table document_embeddings (
id bigint not null primary key,
content text,
metadata jsonb,
embedding extensions.vector(1536),
upload_id uuid references uploads (id),
searchable_content tsvector,
updated_at timestamp default now()
);
create table user_integrations (
id uuid default uuid_generate_v4() primary key,
created_at timestamp default now() not null,
zotero jsonb,
mendeley jsonb
);
- Go to web directory
cd web
- Create .env file
Please refer to the .env.example in the /web directory.
- Install dependencies
npm install
- Run the app
npm run dev
First off, thanks for taking the time to contribute! ❤️
All types of contributions are encouraged and valued. Please read our Code of Conduct to get started.
Join our Discord Community, if you're interested to make your mark in the annals of research tool history or not.
Isaac is open-source under GNU Affero General Public License Version 3 (AGPLv3)