Skip to content

piyushzingade/t3plus

 
 

Repository files navigation

T3 Plus

T3 Chat is a modern AI-powered chat application built with Next.js, TypeScript, Prisma, and NextAuth. It supports multiple LLM providers (Gemini, OpenAI), file attachments, and user authentication.

Features

  • Next.js 14+ App Router
  • TypeScript & ESLint integration
  • User authentication with NextAuth
  • Chat with LLMs (Gemini, OpenAI)
  • File attachment support
  • Prisma ORM with PostgreSQL (or other supported DBs)
  • Tailwind CSS for styling
  • Modular, scalable codebase

Getting Started

1. Clone the Repository

git clone https://github.com/your-username/t3plus.git
cd t3plus

2. Install Dependencies

npm install
# or
yarn install

3. Configure Environment Variables

Copy the example environment file and fill in your credentials:

cp .env.example .env

Edit .env and set the following variables:

  • DATABASE_URL (Prisma DB connection string)
  • NEXTAUTH_SECRET
  • NEXTAUTH_URL
  • OPENAI_API_KEY (for OpenAI integration)
  • GOOGLE_API_KEY (for Gemini integration, if used)
  • Any other required keys as per .env.example

4. Set Up the Database

Run Prisma migrations to set up your database schema:

npx prisma migrate dev

(Optional) Generate Prisma client:

npx prisma generate

5. Run the Development Server

npm run dev
# or
yarn dev

Open http://localhost:3000 in your browser.


Project Structure

  • app/ - Next.js app directory (routes, API, pages)
  • components/ - Reusable React components
  • libs/ - Utility libraries (auth, helpers, etc.)
  • prisma/ - Prisma schema and migrations
  • public/ - Static assets
  • types/ - TypeScript types

Linting & Formatting

Run ESLint:

npm run lint

Deployment

Deploy easily on Vercel or your preferred platform.

See Next.js deployment docs.


Contributing

We welcome contributions! To get started:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature-name
  3. Make your changes and commit: git commit -m "Add your feature"
  4. Push to your fork: git push origin feature/your-feature-name
  5. Open a Pull Request describing your changes.

Guidelines:

  • Write clear, concise commit messages.
  • Follow the existing code style and structure.
  • Add tests for new features when possible.
  • Ensure the app builds and passes linting before submitting.

License

This project is licensed under the MIT License.


Learn More

About

This is t3.chat clone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.0%
  • CSS 4.7%
  • JavaScript 0.3%