Skip to content

Companion AI is a website application where you can build and converse with your personalized AI buddy. You have the option to select various personalities, interests, and communication styles for your companion. Additionally, you can educate them and exchange your experiences with them.

Notifications You must be signed in to change notification settings

HapticHash/companion-ai

Repository files navigation

Companion AI

This application is built using Next.js 13, React, Tailwind, Prisma, Stripe, PlanetScale, Upstash, Pinecone & Replicate API.

Screenshots

Companion AI - Login screen | haptichash

Companion AI - Main screen - Dark | haptichash

Companion AI - Main screen - Light | haptichash

Companion AI - Create companion screen | haptichash

Companion AI - Conversation screen | haptichash

Companion AI - Upgrade modal screen | haptichash

Features:

  • Tailwind design, animations and effects (shadcn/ui)
  • Full responsiveness
  • Clerk Authentication (Email, Google, 9+ Social Logins)
  • Client form validation and handling using react-hook-form
  • Server error handling using react-toast
  • Page loading state
  • Stripe monthly subscription
  • Free tier with API limiting
  • Fetch data in server react components
  • Handle relations between Server and Child components!
  • Create new companion & ask them questions
  • Redis DB with Upstash
  • Pinecone: Vector Database for Vector Search
  • PlanetScale MySQL DB
  • Hotpot AI Image for Companion

Prerequisites

Node version 18.x.x

Cloning the repository

git clone https://github.com/HapticHash/companion-ai.git

Install packages

npm i

Setup .env file

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=

NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard

OPENAI_API_KEY=
REPLICATE_API_TOKEN=

PINECONE_API_KEY=
PINECONE_ENVIRONMENT=
PINECONE_INDEX=

UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=

DATABASE_URL=

STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=

NEXT_PUBLIC_APP_URL="http://localhost:3000"

Setup Prisma

Add MySQL Database (I used PlanetScale)

npx prisma db push

Seed categories:

node scripts/seed.ts

Start the app

npm run dev

Available commands

Running commands with npm npm run [command]

command description
dev Starts a development instance of the app

About

Companion AI is a website application where you can build and converse with your personalized AI buddy. You have the option to select various personalities, interests, and communication styles for your companion. Additionally, you can educate them and exchange your experiences with them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published