chatcopilot
chatcopilot copied to clipboard
An open source modern ChatGPT clone with authentication
chatcopilot.app
An open-source ChatGPT UI with a fresh coat of paint and authentication.
Introduction
Chatcopilot is a chat UI for ChatGPT built with Next.js, Tailwind, and Supabase. You paste in your OpenAI API key and you're good to go.
Running Locally
Cloning the repository the local machine.
git clone https://github.com/sambarrowclough/chatcopilot.git
Storing the API keys in .env
Create a file in root directory of project with env. And store your API key in it, as shown in the .example.env file.
Installing the dependencies.
npm install
Running the application.
Then, run the application in the command line and it will be available at http://localhost:3000
.
npm run dev
Auth setup
- Use
openssl rand -base64 32
to generate NEXTAUTH_SECRET - Create a new project in supabase.io
- Follow the Supabase Prisma Integration guide to setup Prisma
- Run
npx prisma db push && prisma migrate dev && prisma generate
Email setup
- Create a new project in postmark
- Create a server
- Generate a Server API tokens
- Paste in the API token in
POSTMARK_API_TOKEN
in.env
Tech Stack
- Next.js – framework
- Typescript – language
- Tailwind – CSS
- Postmark – email
- Supabase – database
- NextAuth.js – auth
- Vercel – hosting
One-Click Deploy
Deploy the example using Vercel:
Note: You will need to configure auth by following the setup above by using Supabase and next-auth