Skip to content

๐Ÿš€ An AI co-founder that turns your vague MERN/NEXT.js ideas into expert-level meta-prompts for your coding AI.

Notifications You must be signed in to change notification settings

AegisX-dev/PromptCraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ PromptCraft

An AI co-founder that turns your vague MERN/NEXT.js ideas into expert-level meta-prompts for your coding AI.

PromptCraft Hero Demo

๐Ÿ”ด Live Demo & Case Study


The "Blank Page" Problem

As AI-assisted developers, we all know this frustrating loop:

You: "Hey Copilot/ChatGPT, build me a MERN pet store website."

Useless AI: "Sure! That's a great idea. Here's a 5-part blog post on what you'll need: 1. Set up React. 2. Choose a database. 3. Build an Express server..."

This is a failure of context. The AI doesn't know your stack, your goals, or your schemas, so it gives you a generic, high-level guide instead of actionable code.

โœจ The "Expert Co-Founder" Solution

PromptCraft solves this. It's an AI-powered "Strategic Co-Founder" that you have a conversation with.

It takes your vague, project-level idea and turns it into a structured, expert-level "meta-prompt"โ€”the exact prompt an expert orchestrator would write. This single meta-prompt contains the mission, stack, schemas, and first tasks, all in one.

You just copy this one "meta-prompt" and paste it into your code assistant (Copilot, Gemini, etc.) to get cohesive, context-aware code from the very first line.

๐Ÿ› ๏ธ Core Features

  • ๐Ÿง  AI-Powered "Pro Refiner": Our main feature. It takes your idea (e.g., "MERN Twitter Clone") and generates a complete, structured "Catalyst" meta-prompt with sections for ## CORE_MISSION, ## TECH_STACK, ## DATABASE_SCHEMAS, and ## YOUR_FIRST_TASK.

  • โšก Fast "Basic Refiner": A high-speed refiner (powered by Llama 3.2 on OpenRouter) for smaller tasks, like improving a single, existing prompt.

  • ๐Ÿ’ฐ $0-Budget Architecture: This project is a case study in $0-budget, resilient architecture.

    • Dual-Model AI Router: It intelligently routes requests between the "Pro" tier (Gemini API) and the "Basic" tier (OpenRouter's free models).
    • Per-User Quota System: To stay 100% free, the app manages global API keys and gives every registered user their own daily quota (e.g., 5 Pro, 25 Basic), which is tracked in MongoDB.
  • โœจ Polished UX: Includes all the "delight" features a real product needs: a "Copy to Clipboard" button, "Example Prompts" to demo the app, and smart, friendly error messages ("Quota exceeded!").

๐Ÿ’ป Tech Stack

  • Framework: NEXT.js 14+ (App Router)
  • Backend: NEXT.js API Routes
  • Database: MongoDB (with Mongoose)
  • Authentication: next-auth (Credentials Provider, JWT, bcrypt hashing)
  • Global State: React Context (for real-time quota-sync between components)
  • AI (Pro): Gemini API
  • AI (Basic): OpenRouter API (routing to meta-llama/llama-3.2-3b-instruct:free)
  • Styling: Tailwind CSS

๐Ÿš€ How to Run Locally

  1. Clone the repository:

    git clone [https://github.com/AegisX-dev/PromptCraft.git](https://github.com/AegisX-dev/PromptCraft.git)
    cd PromptCraft
  2. Install dependencies:

    npm install
  3. Set up your Environment Variables: Create a file named .env.local in the root and add the following:

    # Get from MongoDB Atlas
    MONGODB_URI=...
    
    # Get from Google AI Studio
    GEMINI_API_KEY=...
    
    # Get from OpenRouter.ai
    OPENROUTER_API_KEY=...
    NEXT_PUBLIC_OPENROUTER_BASE_URL=[https://openrouter.ai/api/v1](https://openrouter.ai/api/v1)
    
    # Generate a secret (e.g., `openssl rand -base64 32`)
    NEXTAUTH_SECRET=...
  4. Run the development server:

    npm run dev

    Open http://localhost:3000 to see the app.

โญ Like this project?

If this project helped you, or if you just think the architecture is cool, please give it a star!

About

๐Ÿš€ An AI co-founder that turns your vague MERN/NEXT.js ideas into expert-level meta-prompts for your coding AI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •