-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2e4cb4
commit 461ac75
Showing
3 changed files
with
42 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
OPENAI_API_KEY= | ||
LANGCHAIN_TRACING_V2="true" | ||
LANGCHAIN_API_KEY= | ||
LANGCHAIN_PROJECT="ProjectName" | ||
LANGCHAIN_CALLBACKS_BACKGROUND=true | ||
OPENWEATHER_API_KEY= | ||
DATABASE_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,49 @@ | ||
# Welcome to Remix + Vite + shadcn/ui! | ||
# Build AI Applications with Node.js and LangChain | ||
|
||
📖 See the [Remix docs](https://remix.run/docs) and the [Remix Vite docs](https://remix.run/docs/en/main/future/vite) for details on supported features. | ||
## Install | ||
|
||
## Getting Started | ||
Use pnpm! | ||
|
||
Node Server: | ||
|
||
```sh | ||
npx create-remix@latest --template jacob-ebey/remix-shadcn | ||
```shell | ||
corepack install pnpm | ||
``` | ||
|
||
Cloudflare Pages: | ||
|
||
```shellscript | ||
npx create-remix@latest --template https://github.com/jacob-ebey/remix-shadcn/tree/cloudflare | ||
``` | ||
|
||
Or for a more flushed out template with a login flow and a SQLite database backed by Drizzle ORM: | ||
|
||
Node Server: | ||
Then install dependencies | ||
|
||
```shellscript | ||
npx create-remix@latest --template https://github.com/jacob-ebey/remix-shadcn/tree/drizzle | ||
```shell | ||
pnpm install | ||
``` | ||
|
||
Cloudflare Pages: | ||
|
||
```shellscript | ||
npx create-remix@latest --template https://github.com/jacob-ebey/remix-shadcn/tree/drizzle-cloudflare | ||
``` | ||
|
||
## Built in theme switcher | ||
|
||
![image](https://github.com/jacob-ebey/remix-shadcn/assets/12063586/c6ed812c-764f-46b7-af30-26284f55535c) | ||
## Development | ||
|
||
![image](https://github.com/jacob-ebey/remix-shadcn/assets/12063586/4e378230-3b4b-4b78-8af4-096b30aacf79) | ||
Setup `.env` file following `.env.sample` example | ||
|
||
## Development | ||
- Register for OpenAI API | ||
- Register for Langsmith API | ||
|
||
Run the Vite dev server: | ||
Run development mode | ||
|
||
```sh | ||
npm run dev | ||
```shell | ||
pnpm dev | ||
``` | ||
|
||
## Deployment | ||
|
||
First, build your app for production: | ||
Create an Heroku app and add Postgres support | ||
|
||
```sh | ||
npm run build | ||
```shell | ||
heroku create <app-name> | ||
heroku addons:create heroku-postgresql:essential-0 | ||
``` | ||
|
||
Setup your environment: | ||
Setup the schema | ||
|
||
```sh | ||
NODE_ENV='production' | ||
```shell | ||
heroku pg:psql -f data/schema.sql | ||
``` | ||
|
||
Then run the app in production mode: | ||
Deploy to Heroku! | ||
|
||
```sh | ||
npm start | ||
```shell | ||
git push heroku main | ||
``` | ||
|
||
Now you'll need to pick a host to deploy it to. | ||
|
||
### DIY | ||
|
||
If you're familiar with deploying Node applications, the built-in Remix app server is production-ready. | ||
|
||
Make sure to deploy the output of `npm run build` and the server | ||
|
||
- `server.js` | ||
- `build/server` | ||
- `build/client` | ||
|
||
Take a look at the provided Dockerfile for further details on how to configure a production environment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE EXTENSION IF NOT EXISTS vector; | ||
|
||
CREATE TABLE IF NOT EXISTS videos ( | ||
id SERIAL PRIMARY KEY, | ||
title TEXT, | ||
description TEXT, | ||
source TEXT | ||
); | ||
|
||
-- video_embeddings table will be created by LangChain |