Skip to content

MuhammadTanveerAbbas/PromptCraft

Repository files navigation

PromptCraft Logo

PromptCraft

AI-powered prompt generator that crafts production-ready prompts for any model in seconds

Live Demo License TypeScript Next.js Tailwind CSS Groq


Overview

PromptCraft solves the blank-page problem in prompt engineering. Instead of guessing what makes a good prompt, you describe your goal, pick a tone and category, and get a production-ready prompt instantly, streamed token by token via Llama 3.3 70B on Groq. It's built for developers, marketers, and power users who work with AI daily and need prompts that actually work, not generic templates.

✨ Features

  • Real-time streaming: Prompts stream token-by-token via Groq's ultra-fast inference, no waiting for a full response
  • 🧠 AI prompt enhancement: One-click enhancement rewrites your generated prompt using expert prompt engineering principles
  • 🎯 Platform-optimised output: Target ChatGPT, Claude, Gemini, Mistral, or Cursor and get prompts tuned to each model's strengths and syntax
  • 🌐 URL context scraping: Paste any URL and the app scrapes its content into your prompt context automatically
  • 📂 10 categories & 10 tones: Fine-tune prompts across Assistant, Code & Dev, Marketing, Legal, Healthcare, and more with tones from Professional to Storytelling
  • 🕓 Session history: Every generated prompt is saved in-session with search, copy, delete, and one-click reload
  • 💾 Download as .txt: Export any prompt directly to a text file
  • 📊 Word & character count: Live stats on every generated output

🛠 Tech Stack

Category Technology
Framework Next.js 16 + React 19 + TypeScript
Styling Tailwind CSS v4 + shadcn/ui (Radix UI)
AI Groq API Llama 3.3 70B Versatile
Streaming Native ReadableStream + SSE parsing
Fonts Geist Sans + Geist Mono
Analytics Vercel Analytics
Deployment Vercel

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • Groq API key get one free at console.groq.com

Installation

# 1. Clone the repo
git clone https://github.com/MuhammadTanveerAbbas/PromptCraft.git
cd PromptCraft

# 2. Install dependencies
pnpm install

# 3. Set up environment variables
cp .env.example .env.local
# Add your GROQ_API_KEY to .env.local

# 4. Run the development server
pnpm dev

# 5. Open in browser
http://localhost:3000

🔐 Environment Variables

Create a .env.local file in the root directory:

# Groq API get yours at https://console.groq.com/keys
GROQ_API_KEY=your_groq_api_key

📁 Project Structure

PromptCraft/
├── app/
│   ├── api/
│   │   ├── enhance/route.ts   # AI prompt enhancement endpoint
│   │   ├── generate/route.ts  # Prompt generation endpoint
│   │   └── scrape/route.ts    # URL scraping endpoint
│   ├── globals.css
│   ├── layout.tsx
│   └── page.tsx               # Main app page
├── components/
│   ├── prompt-form.tsx        # Input form (topic, tone, category, platform, context)
│   ├── prompt-history.tsx     # Session history with search
│   └── prompt-output.tsx      # Streaming output with actions
├── lib/
│   └── utils.ts
├── public/
├── .env.example
├── package.json
└── README.md

📦 Available Scripts

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm start Start production server
pnpm lint Run ESLint

🌐 Deployment

This project is deployed on Vercel.

Deploy Your Own

Deploy with Vercel

  1. Click the button above
  2. Connect your GitHub account
  3. Add GROQ_API_KEY in the Vercel environment variables dashboard
  4. Deploy

🗺 Roadmap

  • Prompt generation with Llama 3.3 on Groq
  • Real-time token streaming
  • AI-powered prompt enhancement
  • Platform-specific optimisation (ChatGPT, Claude, Gemini, Mistral, Cursor)
  • URL context scraping
  • Session history with search
  • Download prompt as .txt
  • Prompt templates library
  • User accounts + saved prompts
  • Prompt comparison (before/after enhance)
  • API access for developers

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.

👨‍💻 Built by The MVP Guy

Muhammad Tanveer Abbas SaaS Developer | Building production-ready MVPs in 14–21 days

Portfolio Twitter LinkedIn GitHub

If this project helped you, please consider giving it a ⭐

About

Generate, refine, and enhance AI prompts in seconds powered by Google Gemini Flash with real-time streaming, URL context scraping, and session history.

Topics

Resources

License

Stars

Watchers

Forks

Contributors