An AI co-founder that turns your vague MERN/NEXT.js ideas into expert-level meta-prompts for your coding AI.
- Try the Live App: https://prompt-craft-beryl.vercel.app/
- ๐ Read the Full Case Study: How I Built This on a $0 Budget
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.
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.
-
๐ง 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!").
- Framework: NEXT.js 14+ (App Router)
- Backend: NEXT.js API Routes
- Database: MongoDB (with Mongoose)
- Authentication:
next-auth(Credentials Provider, JWT,bcrypthashing) - 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
-
Clone the repository:
git clone [https://github.com/AegisX-dev/PromptCraft.git](https://github.com/AegisX-dev/PromptCraft.git) cd PromptCraft -
Install dependencies:
npm install
-
Set up your Environment Variables: Create a file named
.env.localin 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=...
-
Run the development server:
npm run dev
Open http://localhost:3000 to see the app.
If this project helped you, or if you just think the architecture is cool, please give it a star!
