๐Ÿ—๏ธ Prompt Architect

June 10, 2026 ยท View on GitHub

Engineer, refine, and save professional AI prompts for ChatGPT, Claude, Midjourney, and Stable Diffusion in seconds. A production-ready, self-hostable Next.js SaaS boilerplate with conversational refinement threads, a saved prompt library, multi-engine targeting, and built-in Stripe billing. A free open-source alternative to PromptBase, PromptPerfect, PromptHero, and FlowGPT โ€” powered by the MuAPI AI engine.

Tech stack: Next.js 14 (App Router) ยท Prisma ยท PostgreSQL ยท NextAuth (Google OAuth) ยท Stripe ยท Tailwind CSS ยท MuAPI any-llm Use cases: AI developers ยท Prompt engineers ยท ChatGPT power users ยท Content creators ยท Midjourney artists ยท LLM workflow builders ยท AI product teams ยท Technical writers

Awesome Generative AI Apps

๐ŸŽจ Explore 50+ more open-source AI apps โ†’

๐ŸŒ Try the Live Workspace

Hosted Demo: prompt-architect-one-nu.vercel.app

Experience the full glassmorphic, responsive workspace. Sign in with Google to explore the Prompt Architect Studio, refinement threads, and pricing credit packages directly from your browser.


AI Prompt Architect is a production-ready, highly-optimized prompt design workspace. Out of the box, it seamlessly manages User Authentication, Credits & Billing, Conversational Prompt History, and asynchronous AI generation polling using a sleek Next.js App Router architecture. It empowers developers and prompt designers to build professional-grade AI instructions with built-in mobile optimization, making it the perfect SaaS application template.

Why use AI Prompt Architect?

  • Production-Ready SaaS โ€” Complete with Google OAuth and Stripe Checkout workflows built-in.
  • Conversational Refinement โ€” Engage in iterative Q&A rounds with the AI to discover constraints, context, and goals before prompt generation.
  • Historical Library โ€” All completed prompt frameworks are securely persisted to a PostgreSQL database for a custom search-ready gallery.
  • Responsive UX โ€” Custom select dropdowns, sliding toggle switches, micro-animations, and complete mobile-stacked responsiveness.
  • Extensible API โ€” Easily swap out the underlying AI engine without breaking the application UI.

AI Prompt Architect Studio

โœจ Core Features

  • Kinetic Prompt Studio โ€” Input raw prompt ideas and choose the target AI engine (ChatGPT, Claude, Midjourney, Stable Diffusion) and custom style format (Professional, Creative, Academic, Technical).
  • Refinement Chat timeline โ€” Collaborate with the expert system AI. Iterative prompts charge 4 credits per call, polling results dynamically with automatic fallback support.
  • โœจ Engineered System Prompt Card โ€” Completed generations trigger confetti animations and present ready-to-use markdown codes with 1-click clipboard copies, direct ChatGPT intent redirects, and conversational refinement hooks.
  • My Prompt Library (Gallery) โ€” A dedicated archive for logged-in users. Displays past final prompts fetched from the database, filterable using a live search query.
  • Credit Tiers & Billing โ€” Complete Stripe checkout integration. Top up credits with Basic, Pro, or Business packs. Includes webhook completion callbacks.
  • Premium Aesthetics โ€” Vibrant purple/pink dark glow meshes, backdrop filters, custom slider toggles, and scroll-chaining isolation (prevent-scroll-chaining).

โšก Deployment: Vercel & Production

Deploying an instance of AI Prompt Architect to the web requires minimal configuration. The architecture is engineered explicitly for Vercel serverless environments.

One-Click Deploy

Deploy with Vercel

Pro Tip: Fork this repository, replace YOUR_GITHUB_USER in the link above, to streamline deployments for your private forks.

๐Ÿ”‘ Required Environment Variables

To successfully deploy and run, you must populate the following environment variables in your Vercel project settings:

ServiceVariableDescription & Source
DatabaseDATABASE_URLPostgreSQL connection string (Supabase or Neon)
DIRECT_URLDirect DB connection for Prisma migrations
NextAuth / GoogleNEXTAUTH_SECRETSecure random string generated via openssl rand -base64 32
NEXTAUTH_URLYour production domain (e.g. https://my-app.vercel.app)
GOOGLE_CLIENT_IDGet from Google Cloud Console
GOOGLE_CLIENT_SECRETGet from Google Cloud Console
Stripe BillingSTRIPE_SECRET_KEYGet from Stripe Dashboard
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYGet from Stripe Dashboard
STRIPE_WEBHOOK_SECRETWebhook secret for resolving credit purchases
AI GeneratorMU_API_KEYCreate an account and get key from muapi.ai/access-keys

๐Ÿš€ Launching on Vercel: Step-by-Step

  1. Database Provisioning: Create a new Postgres database (via Supabase or Neon). Retrieve the pooling connection string (DATABASE_URL) and direct connection string (DIRECT_URL).
  2. Project Creation: Import your GitHub fork into the Vercel dashboard.
  3. Configure Environment Variables: Copy the variables above into the Vercel project settings environment tab.
  4. Deploy: Hit "Deploy". Vercel will automatically run the build steps (npm run build).
  5. Database Push: Since Prisma does not automatically migrate via Vercel builds by default, you may want to append npx prisma db push && to your Vercel build command, or manually run it locally pointing to your production database URL.
  6. Integrations Setup:
    • Establish a Google Cloud OAuth app, enabling the callback URL: https://your-app.vercel.app/api/auth/callback/google
    • Setup a Stripe Webhook, pointing to https://your-app.vercel.app/api/billing/webhook and selecting the checkout.session.completed event to grab your webhook signing secret.

๐Ÿ› ๏ธ Local Development

Ready to iterate locally? Setup is straightforward.

Prerequisites

  • Node.js (v18 or higher)
  • A local PostgreSQL instance or a free cloud Database URL.

Setup

# 1. Clone the repository
git clone https://github.com/SamurAIGPT/prompt-architect
cd prompt-architect/apps/prompt-architect

# 2. Install dependencies
npm install

# 3. Setup Environment
cp .env.example .env
# Open .env and insert your specific keys. You can use a local DB or your dev cloud DB.

# 4. Initialize Database Schema
npx prisma generate
npx prisma db push

# 5. Start the Development Server
npm run dev

The graphical console should now be heavily responsive on http://localhost:3000.


๐Ÿ—๏ธ Technical Architecture

This application decouples visually rich UI elements from core business logic layers, emphasizing modularization.

prompt-architect/
โ”œโ”€โ”€ prisma/
โ”‚   โ””โ”€โ”€ schema.prisma           # Postgres tables: Users, Accounts, PromptSessions, PromptMessages
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/                    # Next.js 16 App Router
โ”‚   โ”‚   โ”œโ”€โ”€ api/                # Backend API Routes (Stripe, AI chat, Auth)
โ”‚   โ”‚   โ”œโ”€โ”€ chat/               # Conversational prompt refinement threads
โ”‚   โ”‚   โ”œโ”€โ”€ gallery/            # Saved Engineered Prompt Library
โ”‚   โ”‚   โ”œโ”€โ”€ pricing/            # Interactive tier and credit purchase view
โ”‚   โ”‚   โ”œโ”€โ”€ globals.css         # Styling, glassmorphic layout rules, overscroll isolation
โ”‚   โ”‚   โ”œโ”€โ”€ layout.js           # Wraps layout inside auth session provider
โ”‚   โ”‚   โ””โ”€โ”€ page.js             # Main kinetic prompt input workspace page
โ”‚   โ”œโ”€โ”€ components/             # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ CustomSelect.jsx    # Custom dropdown selection cards
โ”‚   โ”‚   โ”œโ”€โ”€ CustomToggle.jsx    # sliding pill custom switches
โ”‚   โ”‚   โ”œโ”€โ”€ FeaturesSection.jsx # App features list grid
โ”‚   โ”‚   โ”œโ”€โ”€ PricingSection.jsx  # Credit billing packages
โ”‚   โ”‚   โ””โ”€โ”€ Navbar.jsx          # Sticky, responsive global navigation (Vercel button)
โ”‚   โ””โ”€โ”€ lib/
โ”‚       โ”œโ”€โ”€ auth.js             # auth session config (casing requirement updates)
โ”‚       โ”œโ”€โ”€ config.js           # stripe tiers, credits cost, model definitions
โ”‚       โ””โ”€โ”€ services/           # DB service controllers (AI generation, billing checkout)
โ”œโ”€โ”€ next.config.mjs             # Next Configuration
โ””โ”€โ”€ package.json

๐Ÿ“„ License

MIT Licensed.


AI Prompt Architect: A modular, mobile-ready, production-grade AI prompt workspace built for creators and builders.