Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/langchain-ai/langchain-template-supabase
https://github.com/langchain-ai/langchain-template-supabase
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/langchain-ai/langchain-template-supabase
- Owner: langchain-ai
- License: mit
- Created: 2023-03-19T18:07:33.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-13T15:37:34.000Z (over 1 year ago)
- Last Synced: 2025-01-19T11:11:57.226Z (11 days ago)
- Language: TypeScript
- Size: 149 KB
- Stars: 501
- Watchers: 6
- Forks: 56
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# supabase-template
## Get started
0. Make sure you have [Docker](https://www.docker.com/) installed and running1. Clone this repo
2. Install dependencies, including the Supabase CLI
```bash
yarn
```**Note**: If you install the Supabase CLI using a different method you have to make sure you are on version 1.49.4 as more recent versions currently suffer from an issue which prevents this from working correctly.
3. Create frontend env file
```bash
cp .env.example .env
```4. Create supabase functions env file
```bash
echo "OPENAI_API_KEY=sk-xxx" > supabase/.env
```5. If not already running, start Docker. Learn how to do this for your OS [here](https://docs.docker.com/desktop/).
6. Start the supabase project.
```bash
npx supabase start
```7. Start the supabase functions locally
```bash
yarn supabase:dev
```8. Start the frontend locally
```bash
yarn dev
```9. Open [http://localhost:3100](http://localhost:3100) with your browser to see the result.
## Deploy
1. Create a new project on [Supabase](https://supabase.io)
2. Create a new project on [Vercel](https://vercel.com)
3. To deploy the frontend, connect your Vercel project to your GitHub repo and push to main.
4. To deploy the supabase functions, first login to Supabase:
```bash
npx supabase login
```Then, link your project:
```bash
npx supabase link --project-ref
```Then, deploy the functions:
```bash
yarn supabase:deploy
```Optionally, if you're also using the Supabase Vector Store from LangcChain, you'll need to push the schema to the database:
```bash
supabase db push
```