Skip to content

Commit 72f09af

Browse files
init commit
0 parents  commit 72f09af

File tree

535 files changed

+42657
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

535 files changed

+42657
-0
lines changed

.backend_env.example

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
SUPABASE_URL=<change-me>
2+
SUPABASE_SERVICE_KEY=<change-me>
3+
PG_DATABASE_URL=notimplementedyet
4+
OPENAI_API_KEY=<change-me>
5+
ANTHROPIC_API_KEY=null
6+
JWT_SECRET_KEY=<change-me>
7+
AUTHENTICATE=true
8+
GOOGLE_APPLICATION_CREDENTIALS=<change-me>
9+
GOOGLE_CLOUD_PROJECT=<change-me>
10+
11+
MAX_BRAIN_SIZE=52428800
12+
MAX_REQUESTS_NUMBER=200
13+
MAX_BRAIN_PER_USER=5
14+
15+
#Private LLM Variables
16+
PRIVATE=False
17+
MODEL_PATH=./local_models/ggml-gpt4all-j-v1.3-groovy.bin
18+
19+
#RESEND
20+
RESEND_API_KEY=<change-me>
21+

.flake8

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
; Minimal configuration for Flake8 to work with Black.
3+
max-line-length = 100
4+
ignore = E101,E111,E112,E221,E222,E501,E711,E712,W503,W504,F401

.frontend_env.example

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
NEXT_PUBLIC_ENV=local
2+
NEXT_PUBLIC_BACKEND_URL=http://localhost:5050
3+
NEXT_PUBLIC_SUPABASE_URL=<change-me>
4+
NEXT_PUBLIC_SUPABASE_ANON_KEY=<change-me>
5+
NEXT_PUBLIC_JUNE_API_KEY=<change-me>

.gitignore

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
secondbrain/
2+
.env
3+
.streamlit/secrets.toml
4+
**/*.pyc
5+
toto.txt
6+
*.ipynb
7+
log.txt
8+
9+
10+
11+
12+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
13+
14+
# dependencies
15+
**/node_modules
16+
**/.pnp
17+
.pnp.js
18+
19+
# testing
20+
**/coverage
21+
22+
# next.js
23+
**/.next/
24+
**/out/
25+
26+
# production
27+
**/build
28+
29+
# misc
30+
.DS_Store
31+
*.pem
32+
33+
# debug
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
38+
# local env files
39+
.env*.local
40+
41+
# vercel
42+
.vercel
43+
44+
# typescript
45+
*.tsbuildinfo
46+
next-env.d.ts
47+
quivr/*
48+
streamlit-demo/.streamlit/secrets.toml
49+
.backend_env
50+
.frontend_env
51+
backend/core/pandoc-*
52+
**/.pandoc-*
53+
backend/core/application_default_credentials.json
54+
55+
#local models
56+
backend/core/local_models/*
57+
58+
59+
## scripts
60+
.migration_info
+189
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# Quivr - Your Second Brain, Empowered by Generative AI
2+
3+
<div align="center">
4+
<img src="./logo.png" alt="Quivr-logo" width="30%" style="border-radius: 50%; padding-bottom: 20px"/>
5+
</div>
6+
7+
8+
[![Discord Follow](https://dcbadge.vercel.app/api/server/HUpRgp2HG8?style=flat)](https://discord.gg/HUpRgp2HG8)
9+
[![GitHub Repo stars](https://img.shields.io/github/stars/stangirard/quivr?style=social)](https://github.com/stangirard/quivr)
10+
[![Twitter Follow](https://img.shields.io/twitter/follow/StanGirard?style=social)](https://twitter.com/_StanGirard)
11+
12+
Quivr, your second brain, utilizes the power of GenerativeAI to store and retrieve unstructured information. Think of it as Obsidian, but turbocharged with AI capabilities.
13+
14+
[Roadmap here](https://brain.quivr.app/docs/roadmap)
15+
16+
## Key Features 🎯
17+
18+
- **Universal Data Acceptance**: Quivr can handle almost any type of data you throw at it. Text, images, code snippets, we've got you covered.
19+
- **Generative AI**: Quivr employs advanced AI to assist you in generating and retrieving information.
20+
- **Fast and Efficient**: Designed with speed and efficiency at its core. Quivr ensures rapid access to your data.
21+
- **Secure**: Your data, your control. Always.
22+
- **OS Compatible**: Ubuntu 22 or upper.
23+
- **File Compatibility**:
24+
- Text
25+
- Markdown
26+
- PDF
27+
- Powerpoint
28+
- Excel (Not Yet)
29+
- CSV
30+
- Word
31+
- Audio
32+
- Video
33+
- **Open Source**: Freedom is beautiful, and so is Quivr. Open source and free to use.
34+
35+
## Demo Highlights 🎥
36+
37+
https://github.com/StanGirard/quivr/assets/19614572/a6463b73-76c7-4bc0-978d-70562dca71f5
38+
39+
## Disclaimer ⚠️
40+
41+
For a little while, Quivr will be only compatible with OpenAI API.
42+
43+
If you want to use a Local LLM please refer to [v0.0.46](https://github.com/StanGirard/quivr/releases/tag/v0.0.46).
44+
45+
This is due to us preparing a big feature and needing to clean the code a bit.
46+
47+
## Getting Started 🚀
48+
49+
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
50+
51+
You can find everything on the [documentation](https://brain.quivr.app/).
52+
53+
### Prerequisites 📋
54+
55+
Ensure you have the following installed:
56+
57+
- Docker
58+
- Docker Compose
59+
60+
Additionally, you'll need a [Supabase](https://supabase.com/) account for:
61+
62+
- Creating a new Supabase project
63+
- Supabase Project API key
64+
- Supabase Project URL
65+
66+
### Installation Steps 💽
67+
68+
- **Step 0**: If needed, the installation is explained on Youtube [here](https://youtu.be/rC-s4QdfY80)
69+
70+
- **Step 1**: Clone the repository using **one** of these commands:
71+
72+
- If you don't have an SSH key set up:
73+
74+
```bash
75+
git clone https://github.com/StanGirard/Quivr.git && cd Quivr
76+
```
77+
78+
- If you have an SSH key set up or want to add it ([guide here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account))
79+
80+
```bash
81+
git clone [email protected]:StanGirard/Quivr.git && cd Quivr
82+
```
83+
84+
- **Step 2**: Use the install helper
85+
86+
You can use the install_helper.sh script to setup your env files
87+
88+
```bash
89+
brew install gum # Windows (via Scoop) scoop install charm-gum
90+
91+
chmod +x install_helper.sh
92+
./install_helper.sh
93+
```
94+
95+
- **Step 2 - Bis**: Copy the `.XXXXX_env` files
96+
97+
```bash
98+
cp .backend_env.example backend/core/.env
99+
cp .frontend_env.example frontend/.env
100+
```
101+
102+
- **Step 3**: Update the `backend/core/.env` and `frontend/.env` file
103+
104+
> _Your `supabase_service_key` can be found in your Supabase dashboard under Project Settings -> API. Use the `anon` `public` key found in the `Project API keys` section._
105+
106+
> _Your `JWT_SECRET_KEY`can be found in your supabase settings under Project Settings -> API -> JWT Settings -> JWT Secret_
107+
108+
> _The `NEXT_PUBLIC_BACKEND_URL` is set to localhost:5050 for the docker. Update it if you are running the backend on a different machine._
109+
110+
> _To activate vertexAI with PaLM from GCP follow the instructions [here](https://python.langchain.com/en/latest/modules/models/llms/integrations/google_vertex_ai_palm.html) and update `backend/core/.env`- It is an advanced feature, please be expert in GCP before trying to use it_
111+
112+
- [ ] Change variables in `backend/core/.env`
113+
- [ ] Change variables in `frontend/.env`
114+
115+
- **Step 4**: Use the `migration.sh` script to run the migration scripts
116+
117+
```bash
118+
chmod +x migration.sh
119+
./migration.sh
120+
```
121+
122+
Choose either `Create all tables` if it's your first time or `Run migrations`
123+
if you are updating your database.
124+
125+
Alternatively you can run the script on the Supabase database via the web
126+
interface (SQL Editor -> `New query` -> paste the script -> `Run`)
127+
128+
All the scripts can be found in the [scripts](scripts/) folder
129+
130+
> _If you come from an old version of Quivr, run the scripts in [migration script](scripts/) to migrate your data to the new version in the order of date_
131+
132+
- **Step 5**: Launch the app
133+
134+
```bash
135+
docker compose -f docker-compose.yml up --build
136+
```
137+
138+
- **Step 6**: Navigate to `localhost:3000` in your browser
139+
140+
- **Step 7**: Want to contribute to the project?
141+
142+
```
143+
docker compose -f docker-compose.dev.yml up --build
144+
```
145+
146+
## Contributors ✨
147+
148+
Thanks go to these wonderful people:
149+
<a href="https://github.com/stangirard/quivr/graphs/contributors">
150+
<img src="https://contrib.rocks/image?repo=stangirard/quivr" />
151+
</a>
152+
153+
## Contribute 🤝
154+
155+
Got a pull request? Open it, and we'll review it as soon as possible. Check out our project board [here](https://github.com/users/StanGirard/projects/5) to see what we're currently focused on, and feel free to bring your fresh ideas to the table!
156+
157+
- [Open Issues](https://github.com/StanGirard/quivr/issues)
158+
- [Open Pull Requests](https://github.com/StanGirard/quivr/pulls)
159+
- [Good First Issues](https://github.com/StanGirard/quivr/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
160+
- [Frontend Issues](https://github.com/StanGirard/quivr/issues?q=is%3Aopen+is%3Aissue+label%3Afrontend)
161+
- [Backend Issues](https://github.com/StanGirard/quivr/issues?q=is%3Aopen+is%3Aissue+label%3Abackend)
162+
163+
## Sponsors ❤️
164+
165+
This project could not be possible without the support of our sponsors. Thank you for your support!
166+
167+
<a href="https://www.theodo.fr/">
168+
<img src="https://avatars.githubusercontent.com/u/332041?s=200&v=4" alt="Theodo" style="padding: 10px" width="70px">
169+
</a>
170+
<a href="https://www.padok.fr/">
171+
<img src="https://avatars.githubusercontent.com/u/46325765?s=200&v=4" alt="Padok" style="padding: 10px" width="70px">
172+
</a>
173+
<a href="https://www.aleios.com/">
174+
<img src="https://avatars.githubusercontent.com/u/97908131?s=200&v=4" alt="Aleios" style="padding: 10px" width="70px">
175+
</a>
176+
<a href="https://www.bam.tech/">
177+
<img src="https://avatars.githubusercontent.com/u/9597329?s=200&v=4" alt="BAM" style="padding: 10px" width="70px">
178+
</a>
179+
<a href="https://www.sicara.fr/">
180+
<img src="https://avatars.githubusercontent.com/u/23194788?s=200&v=4" alt="Sicara" style="padding: 10px" width="70px">
181+
</a>
182+
183+
## License 📄
184+
185+
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details
186+
187+
## Stars History 📈
188+
189+
[![Star History Chart](https://api.star-history.com/svg?repos=StanGirard/quivr&type=Timeline)](https://star-history.com/#StanGirard/quivr&Timeline)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: "3"
2+
3+
services:
4+
frontend:
5+
env_file:
6+
- ./frontend/.env
7+
build:
8+
context: frontend
9+
dockerfile: Dockerfile
10+
container_name: web
11+
restart: always
12+
ports:
13+
- 3000:3000
14+
backend-core:
15+
env_file:
16+
- ./backend/core/.env
17+
build:
18+
context: backend/core
19+
dockerfile: Dockerfile
20+
container_name: backend-core
21+
restart: always
22+
volumes:
23+
- ./backend/core/:/code/
24+
- ~/.config/gcloud:/root/.config/gcloud
25+
ports:
26+
- 5050:5050
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: "3"
2+
3+
services:
4+
frontend:
5+
env_file:
6+
- ./frontend/.env
7+
build:
8+
context: frontend
9+
dockerfile: Dockerfile.dev
10+
container_name: web
11+
restart: always
12+
volumes:
13+
- ./frontend/:/app
14+
- /app/node_modules
15+
- /app/.next
16+
ports:
17+
- 3000:3000
18+
backend-core:
19+
env_file:
20+
- ./backend/core/.env
21+
build:
22+
context: backend/core
23+
dockerfile: Dockerfile
24+
container_name: backend-core
25+
restart: always
26+
volumes:
27+
- ./backend/core/:/code/
28+
- ~/.config/gcloud:/root/.config/gcloud
29+
ports:
30+
- 5050:5050
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: "3"
2+
3+
services:
4+
frontend:
5+
env_file:
6+
- ./frontend/.env
7+
build:
8+
context: frontend
9+
dockerfile: Dockerfile
10+
container_name: web
11+
restart: always
12+
ports:
13+
- 3000:3000

0 commit comments

Comments
 (0)