Kraton - AI PPT Builder is a next-gen SaaS tool that helps you create beautiful, professional presentations in just one click. Using AI (OpenAI GPT + DALLΒ·E), Kraton generates slide outlines, themes, layouts, and visuals while allowing full customization with an intuitive drag-and-drop editor.
This project was built with Next.js, Clerk, Prisma, and Lemon Squeezy to ensure scalability, secure authentication, and monetization.
- π Clerk Authentication β Secure login and signup.
- π§ AI Outline Generator β Turn prompts into structured slides.
- π¨ Themes & Layouts β Choose from prebuilt or AI-generated themes.
- πΌ AI-Powered Images β Generate visuals using DALLΒ·E.
- π± Drag-and-Drop Editor β Fully customizable.
- πΎ Save & Manage Projects β Keep all your presentations in one place.
- π³ Monetization β Integrated with Lemon Squeezy.
The project is organized as follows:
Directory structure:
βββ ai-ppt-builder/
βββ README.md
βββ components.json
βββ eslint.config.mjs
βββ LICENSE
βββ next.config.ts
βββ package.json
βββ postcss.config.mjs
βββ tsconfig.json
βββ .env.samples
βββ .prettierignore
βββ .prettierrc.json
βββ prisma/
β βββ schema.prisma
βββ public/
β βββ slide.webp
βββ src/
βββ middleware.ts
βββ actions/
β βββ chatGPT.ts
β βββ lemonSqueezy.ts
β βββ openAI.ts
β βββ projects.ts
β βββ user.ts
βββ app/
β βββ globals.css
β βββ layout.tsx
β βββ page.tsx
β βββ (auth)/
β β βββ layout.tsx
β β βββ callback/
β β β βββ loading.tsx
β β β βββ page.tsx
β β βββ sign-in/
β β β βββ [[...sign-in]]/
β β β βββ page.tsx
β β βββ sign-up/
β β βββ [[...sign-up]]/
β β βββ page.tsx
β βββ (protected)/
β β βββ layout.tsx
β β βββ (pages)/
β β β βββ layout.tsx
β β β βββ (dashboardPages)/
β β β βββ create-page/
β β β β βββ page.tsx
β β β β βββ _components/
β β β β βββ renderPage.tsx
β β β β βββ common/
β β β β β βββ addCardButton.tsx
β β β β β βββ card.tsx
β β β β β βββ cardList.tsx
β β β β βββ create-page/
β β β β β βββ createPage.tsx
β β β β β βββ createPageSkeleton.tsx
β β β β βββ generate-ai/
β β β β β βββ creativeAI.tsx
β β β β β βββ recentPrompts.tsx
β β β β βββ scratch/
β β β β βββ scratchPage.tsx
β β β βββ dashboard/
β β β β βββ page.tsx
β β β βββ settings/
β β β β βββ page.tsx
β β β β βββ _components/
β β β β βββ userSettings.tsx
β β β βββ share/
β β β β βββ [shareID]/
β β β β βββ page.tsx
β β β βββ templates/
β β β β βββ page.tsx
β β β β βββ [templates]/
β β β β βββ page.tsx
β β β βββ trash/
β β β βββ page.tsx
β β β βββ _components/
β β β βββ deleteAllButton.tsx
β β βββ presentation/
β β βββ layout.tsx
β β βββ page.tsx
β β βββ [presentationID]/
β β βββ page.tsx
β β βββ _components/
β β β βββ editor/
β β β β βββ dropZone.tsx
β β β β βββ editor.tsx
β β β β βββ masterRecursiveComponent.tsx
β β β βββ editor-sidebar/
β β β β βββ left-sidebar/
β β β β β βββ dragableSlidePreview.tsx
β β β β β βββ layoutPreview.tsx
β β β β β βββ scaledPreview.tsx
β β β β βββ right-sidebar/
β β β β βββ index.tsx
β β β β βββ tabs/
β β β β βββ layoutChooser.tsx
β β β β βββ themeChooser.tsx
β β β β βββ components-tabs/
β β β β βββ componentPreview.tsx
β β β β βββ layoutPreviewItem.tsx
β β β βββ navbar/
β β β βββ navbar.tsx
β β β βββ presentationMode.tsx
β β βββ select-theme/
β β βββ page.tsx
β β βββ _components/
β β βββ themeCard.tsx
β β βββ themePicker.tsx
β β βββ themePreview.tsx
β βββ api/
β βββ webhook/
β βββ subscriptions/
β βββ route.ts
βββ components/
β βββ global/
β β βββ alert-dialog/
β β β βββ index.tsx
β β βββ app-sidebar/
β β β βββ index.tsx
β β β βββ navFooter.tsx
β β β βββ navMain.tsx
β β β βββ recentOpen.tsx
β β βββ editor/
β β β βββ components/
β β β βββ blockQuote.tsx
β β β βββ calloutBox.tsx
β β β βββ codeBlock.tsx
β β β βββ columnComponent.tsx
β β β βββ divider.tsx
β β β βββ headings.tsx
β β β βββ imageComponent.tsx
β β β βββ listComponent.tsx
β β β βββ paragraph.tsx
β β β βββ tableComponet.tsx
β β β βββ tableOfContents.tsx
β β β βββ uploadImage.tsx
β β βββ mode-toggle/
β β β βββ index.tsx
β β βββ not-found/
β β β βββ index.tsx
β β βββ project-card/
β β β βββ index.tsx
β β β βββ thumbnailPreview.tsx
β β βββ projects/
β β β βββ index.tsx
β β βββ upper-infobar/
β β βββ index.tsx
β β βββ newProjectButton.tsx
β β βββ sellButton.tsx
β β βββ upperInfoSearchBar.tsx
β βββ ui/
β βββ accordion.tsx
β βββ alert-dialog.tsx
β βββ alert.tsx
β βββ aspect-ratio.tsx
β βββ avatar.tsx
β βββ badge.tsx
β βββ breadcrumb.tsx
β βββ button.tsx
β βββ calendar.tsx
β βββ card.tsx
β βββ carousel.tsx
β βββ chart.tsx
β βββ checkbox.tsx
β βββ collapsible.tsx
β βββ command.tsx
β βββ context-menu.tsx
β βββ dialog.tsx
β βββ drawer.tsx
β βββ dropdown-menu.tsx
β βββ form.tsx
β βββ hover-card.tsx
β βββ input-otp.tsx
β βββ input.tsx
β βββ label.tsx
β βββ menubar.tsx
β βββ navigation-menu.tsx
β βββ pagination.tsx
β βββ popover.tsx
β βββ progress.tsx
β βββ radio-group.tsx
β βββ resizable.tsx
β βββ scroll-area.tsx
β βββ select.tsx
β βββ separator.tsx
β βββ sheet.tsx
β βββ sidebar.tsx
β βββ skeleton.tsx
β βββ slider.tsx
β βββ sonner.tsx
β βββ switch.tsx
β βββ table.tsx
β βββ tabs.tsx
β βββ textarea.tsx
β βββ toggle-group.tsx
β βββ toggle.tsx
β βββ tooltip.tsx
βββ hooks/
β βββ use-mobile.ts
βββ lib/
β βββ axios.ts
β βββ constant.ts
β βββ IconsComponent.tsx
β βββ prisma.ts
β βββ slideComponents.ts
β βββ slideLayouts.ts
β βββ types.ts
β βββ utils.ts
βββ provider/
β βββ theme-provider.tsx
βββ store/
βββ useCreativeAIStore.tsx
βββ usePromptStore.tsx
βββ useSlideStore.tsx
βββ useStartScratchStore.tsx
- /components: Contains reusable.
- /pages: Includes the main routes for pages like login, createve page, and ppt pages.
- /api: Server-side route handlers for database interactions and ppt creation.
- /prisma: Prisma schema and client for database interaction.
- /styles: TailwindCSS styles and global styling.
The system architecture is built to balance performance, scalability, and modularity. It follows a client-server model with clear responsibilities:
- Frontend (Next.js + TailwindCSS + ShadCN UI): Renders the dashboard, editor, and presentation views. Handles client-side logic and state with Zustand.
- Backend (Next.js API Routes): Handles slide generation requests, image creation, and data persistence.
- AI Integration (OpenAI GPT + DALLΒ·E): Powers content generation (outlines, text, images).
- Database (Prisma + PostgreSQL): Stores user accounts, projects, slides, and history.
- Authentication (Clerk): Provides secure user login and session management.
- Payments (Lemon Squeezy): Handles subscriptions and monetization for premium features.
graph TD
%% ==============================
%% CLIENT LAYER
%% ==============================
subgraph Client
U[π₯οΈ User Browser] --> F[π» Next.js Frontend]
end
%% ==============================
%% BACKEND & API LAYER
%% ==============================
subgraph Backend
F --> API[βοΈ Next.js API Routes]
API --> AI[π€ OpenAI GPT & π¨ DALLΒ·E]
API --> DB[(ποΈ PostgreSQL via Prisma)]
end
%% ==============================
%% SERVICES LAYER
%% ==============================
subgraph Services
F --> Clerk[π Clerk Authentication]
API --> LS[π³ Lemon Squeezy Payments]
end
%% ==============================
%% FLOWS
%% ==============================
U -->|π Login / Sign Up| Clerk
Clerk -->|β
Auth Response| F
U -->|π° Buy Premium Plan| LS
LS -->|π Subscription Verified| API
API -->|β¨ Generate Content| AI
API -->|πΎ Store / Retrieve Data| DB
%% ==============================
%% STYLING
%% ==============================
classDef client fill:#6ac6b7,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
classDef backend fill:#f1a4cb,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
classDef services fill:#82c7f9,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
classDef user fill:#ffcc00,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
classDef db fill:#f1e1a4,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
classDef ai fill:#c6a0f6,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
%% Apply Classes
class U user;
class F client;
class API backend;
class DB db;
class AI ai;
class Clerk,LS services;
- Frontend: Next.js 15, TypeScript, TailwindCSS, ShadCN UI
- Backend: Prisma ORM, PostgreSQL
- AI: OpenAI GPT + DALLΒ·E
- Auth: Clerk
- Payments: Lemon Squeezy
- State Management: Zustand
- Node.js 18+
- PostgreSQL instance
- OpenAI API Key
- Clerk API Key
- Lemon Squeezy API Key
git clone https://github.com/username/ai-ppt-builder.git
cd ai-ppt-builder
npm install
Rename .env.example
to .env.local
and update:
DATABASE_URL=your_postgres_url
OPENAI_API_KEY=your_openai_key
CLERK_SECRET_KEY=your_clerk_secret
LEMON_SQUEEZY_API_KEY=your_api_key
- Install Prisma CLI:
npm install prisma --save-dev
- Initialize Prisma:
npx prisma init
- Generate Prisma client:
npx prisma generate
- Push database schema to PostgreSQL:
npx prisma db push
- (Optional) Open Prisma Studio to explore/manage DB:
npx prisma studio
npm run dev
Visit http://localhost:3000
- AI Slide Generator
- AI Themes & Images
- Clerk Authentication
- Lemon Squeezy Integration
- Team Collaboration
- Export as PPTX/PDF
- Cloud Deployment (Vercel/AWS)
MIT License Β© 2025 Aryan Baadlas
π¨βπ» Aryan Baadlas
π§ aryanbaadlas@gmail.com
If you like this project, give it a star β on GitHub!