Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Open-source ChatGPT clone template built with Next.js, Tailwind CSS, and OpenAI API for building custom GPT chat interfaces.
myChat is an open-source Next.js template for building ChatGPT-style web interfaces that talk to OpenAI's GPT models.
myChat is an open-source template for creating a ChatGPT-like web application. It takes an OpenAI API key as the core input and produces a functional chat interface where users can converse with GPT models. The template runs on Next.js (React) and is designed for deployment on Vercel, with MongoDB for user and session data, Redis for rate limiting, and NextAuth.js for authentication. The project is not affiliated with OpenAI and is published under the MIT License.
.env.local.npm install to install dependencies..env.local file with values for NEXTAUTH_URL, MONGODB_URI, NEXTAUTH_SECRET, ENCRYPTION_KEY, and REDIS_URL.npm run dev; the app connects to your OpenAI account and lets users log in and chat.myChat itself is free and open-source under the MIT License. Running the application requires your own OpenAI API key, a MongoDB database (a free tier is available from MongoDB Atlas), and a Redis instance (a free tier is available from RedisLabs), so usage costs depend on those external services.
Yes. The template is open-source and licensed under the MIT License, so you can use, modify, and distribute it without paying a license fee. You do need to pay for OpenAI API usage and any hosting or database services you choose.
You need Node.js version 14 or newer, an OpenAI API key, a MongoDB database (local, Docker, or Atlas), and a Redis instance (local, Docker, or RedisLabs). The README provides setup instructions for each.
Install the Vercel CLI, log in, and run vercel --prod from the project root. During deployment, you'll be prompted to enter the same environment variables you used locally: NEXTAUTH_URL, MONGODB_URI, NEXTAUTH_SECRET, ENCRYPTION_KEY, and REDIS_URL.
No. The template's chat functionality depends on the OpenAI API to generate responses. You must supply an OpenAI API key, and the project is not affiliated with OpenAI.
Individual user API keys are encrypted using AES-128 before being stored, using a 32-digit hexadecimal ENCRYPTION_KEY that you set in the environment variables. This prevents keys from being stored as plain text in the database.
