Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nayak-nirmalya/ai-companion
AI SaaS Companion with Next.js 13, React, Tailwind, Prisma, Stripe, PlanetScale, Upstash, Pinecone & Replicate API.
https://github.com/nayak-nirmalya/ai-companion
cloudinary nextjs13 pinecone planetscale prisma reactjs replicate-api saas stripe-api tailwindcss typescript upstash-redis vercel-deployment
Last synced: 11 days ago
JSON representation
AI SaaS Companion with Next.js 13, React, Tailwind, Prisma, Stripe, PlanetScale, Upstash, Pinecone & Replicate API.
- Host: GitHub
- URL: https://github.com/nayak-nirmalya/ai-companion
- Owner: nayak-nirmalya
- License: mit
- Created: 2023-07-31T06:23:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-30T07:23:25.000Z (5 months ago)
- Last Synced: 2024-11-21T20:30:35.661Z (2 months ago)
- Topics: cloudinary, nextjs13, pinecone, planetscale, prisma, reactjs, replicate-api, saas, stripe-api, tailwindcss, typescript, upstash-redis, vercel-deployment
- Language: TypeScript
- Homepage: https://www.nirmalya.xyz
- Size: 785 KB
- Stars: 7
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AI SaaS Companion with Next.js 13, React, Tailwind, Prisma, Stripe, PlanetScale, Upstash, Pinecone & Replicate API
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](https://hotpot.ai/) AI Image for CompanionCredits: [Antonio Erdeljac](https://github.com/AntonioErdeljac)
### Prerequisites
**Node version 18.x.x**
### Cloning the Repository
```shell
git clone https://github.com/nayak-nirmalya/ai-companion.git
```### Install Packages
```shell
npm i
```### Setup .env File
```js
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=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/DATABASE_URL=
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
PINECONE_INDEX=
PINECONE_ENVIRONMENT=
PINECONE_API_KEY=UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=OPENAI_API_KEY=
REPLICATE_API_TOKEN=
STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=NEXT_PUBLIC_APP_URL=
```### Setup Prisma
Add MySQL Database URL in .env file, then run:
```shell
npx prisma db push
```Seed Categories to DB:
```shell
node scripts/seed.ts
```### Start the App
```shell
npm run dev
```## Available Commands
Running commands with npm `npm run [command]`
| command | description |
| :------ | :--------------------------------------- |
| `dev` | Starts a development instance of the app |
| `lint` | Run lint check |
| `build` | Start building app for deployment |
| `start` | Run build version of app |