AIer is a web application that allows you to create and share AI Avatars with your friends. It is built with Next.js, Supabase and OpenAI.
- write memo and train AI Avatar
- chat with AI Avatar
2023-06-05: I have decided to use Next.js Page Router and client-side data fetching to build this app, I won't upgrate to Next.js App Router by myself.
If you want to use Next.js App Router and server-side data fetching, pull request is welcome.
- Create AI Avatars
- Train AI Avatars with your own data, like your tweets, your blog posts, your notes, etc.
- Share AI Avatars
- Chat with AI Avatars who are trained with real people's data
- install dependencies
npm install
- setup env vars
cp .env-vercel.local.example .env.local
# modify env vars
- run
npm run dev
- modify env vars
cp .env-emb.local.example .env.local
# modify env vars
-
download datasets from AIer-data
-
run
npm run embed:t
- To install supabase cli
npm install supabase --save-dev
- Connect to supabase
npx supabase login
- Enter your access token. You can generate an access token from https://app.supabase.com/account/tokens
- Generate types
npx supabase gen types typescript --project-id [YOUR-PROJECT-REF] --schema public > types_db.ts
- install vercel cli
npm i -g vercel
- sync env vars
vercel login
vercel link
vercel env pull .env.local
To get started, click the "Deploy with Vercel" button below.
Once the project has deployed, continue with the configuration steps below.
The initial build will fail due to missing Stripe environment variables. After configuring Stripe, redeploy the application.
For auth redirects (magic links, OAuth providers) to work correctly in deploy previews, navigate to the auth settings (i.e. https://app.supabase.com/project/:project-id/auth/url-configuration
) and add the following wildcard URL to "Redirect URLs": https://**vercel.app/*/*
.
You can read more about redirect wildcard patterns in the docs.
You can use third-party login providers like GitHub or Google. Refer to the docs to learn how to configure these. Once configured you can add them to the provider
array of the Auth
component on the signin.tsx
page.