An ai based sass application where user can create or share ai templates and generate their desired content using those templates.
- User Authentication: Secure sign-in and sign-up functionality using Clerk.
- AI Content Generation: Generate content using Google's Gemini Api.
- Template Management: Create, edit, and delete custom templates for content generation.
- Credits System: Users can purchase credits to use for content generation. For first time sign up users will recive some free credits.
- Payment Integration: Seamless payment processing with SSLCommerz
- Content History: View and manage previously generated content.
- Dashboard: A user-friendly dashboard to manage all activities.
- Responsive Design: A beautiful and responsive UI built with Tailwind CSS and Shadcn UI.
- Dark Mode Support:User can Switch between light or dark modes or select the default system mode.
- Demo : EasyAi
- Video Preview: Click here 👈
- Tablet View: (will be updated soon)
- Mobile View: (will be updated soon)
- Framework: Next.js
- Language: TypeScript
- Authentication: Clerk
- Database: PostgreSQL with Drizzle ORM
- AI: Google Gemini
- Payments: SSLCommerz
- Image Storage: Cloudinary
- Styling: Tailwind CSS, Shadcn
- Linting: ESLint
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
- Node.js (v20 or higher)
- pnpm (optional)
- PostgreSQL database
-
Clone the repository:
git clone https://github.com/SABBIR-H0SSAIN/ai-content-generator.git
cd ai-content-generator -
Install dependencies:
pnpm install #or npm install -
Set up environment variables:
-
Create a
.envfile in the root of the project by copying the.env.examplefile -
Fill in the required values in the
.envfile. See the Environment Variables section for more details.
-
-
Run the development server:
pnpm dev
The application will be available at
http://localhost:3000.
| Script | Description |
|---|---|
dev |
Starts the development server with Turbopack. |
build |
Builds the application for production. |
start |
Starts the production server. |
lint |
Lints the codebase using ESLint. |
db:generate |
Generates Drizzle ORM migration files based on schema changes. |
db:migrate |
Applies pending migrations to the database. |
db:studio |
Opens the Drizzle Studio to interact with the database. |
db:seed |
Seeds the database with initial data. |
db:reset |
Resets the database by rolling back all migrations. |
db:all |
A utility script to reset, generate, migrate, and seed the database. |
tunnel |
Exposes the local development server to the internet using ngrok. |
The following environment variables are required to run the application. You can find them in the .env.example file for reference.
| Variable | Description |
|---|---|
BASE_URL |
The base URL of your application (e.g., http://localhost:3000). |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Your Clerk publishable key. |
CLERK_SECRET_KEY |
Your Clerk secret key. |
DATABASE_URL |
The connection string for your PostgreSQL database. |
GEMINI_API_KEY |
Your API key for the Google Gemini AI. |
GEMINI_MODEL_NAME |
The Gemini model you want to use (e.g., gemini-1.5-flash). |
GEMINI_SYSTEM_INSTRUCTION |
System instructions for the Gemini model. |
SSLCOMMERZ_STORE_ID |
Your SSLCommerz store ID. |
SSLCOMMERZ_STORE_PASSWORD |
Your SSLCommerz store password. |
SSLCOMMERZ_IPN_URL |
The URL for reading SSLCommerz Instant Payment Notification (IPN). |
CLOUDINARY_CLOUD_NAME |
Your Cloudinary cloud name. |
CLOUDINARY_API_KEY |
Your Cloudinary API key. |
CLOUDINARY_API_SECRET |
Your Cloudinary API secret. |
If you found this project helpful or interesting, please consider giving it a ⭐️