π€ AI-Powered Prompt Manager with VSCode Dark Theme
A professional Next.js webapp for managing AI prompts with intelligent AI enhancement, memory pattern integration, and developer-focused VSCode dark theme.
- Multi-Model Support - Configure your AI models
- Memory Pattern Integration - Learn from your experience
- Before/After Comparison - See exactly what AI changed
- Smart Context - Uses relevant patterns as enhancement context
- Professional Results - Better prompts, clearer instructions
- Full CRUD Operations - Create, read, update, delete prompts
- Search & Filter - Real-time search by title and content
- Category System - 6 default + unlimited custom categories
- Tag System - Auto-create tags with full management
- Color Coding - 30-color palette for visual organization
- Copy to Clipboard - Quick copy with toast notifications
- List/Card Views - Toggle between layouts with persistence
- VSCode Dark Theme - Developer-friendly interface throughout
- Responsive Design - Works on all screen sizes
- Loading States - Visual feedback for all operations
- Toast Notifications - Success/error feedback
- Keyboard Shortcuts - Power user features
- Hover States - Professional interactions
- Empty States - Helpful guidance
- Framework: Next.js 15.5.6 (App Router)
- Language: TypeScript
- Database: SQLite + Prisma ORM
- Styling: Tailwind CSS
- State: Zustand
- Forms: React Hook Form + Zod validation
- Icons: Lucide React
- Notifications: React Hot Toast
- AI Integration: OpenAI SDK (multiple providers)
- Memory Patterns: JSON-based knowledge base
- Node.js 18+ (you have v3.14.0)
- AI Configuration: Create your AI models config file at
~/.factory/config.json - Memory Patterns: Optional - Create memory directory for pattern learning
cd prompt-manager
# Install dependencies
npm install
# Setup database
npx prisma db push
npx prisma db seed
# Start development
npm run dev # http://localhost:4443prompt-manager/
βββ src/
β βββ app/ # Next.js App Router
β β βββ page.tsx # Main interface
β β βββ layout.tsx # Root layout
β β βββ globals.css # VSCode theme
β β βββ api/ # API routes
β β βββ prompts/
β β β βββ route.ts # GET, POST
β β β βββ enhance/
β β β β route.ts # POST
β β β βββ [id]/
β β β β βββ route.ts # GET, PUT, DELETE
β β βββ categories/
β β β βββ route.ts # GET, POST
β β β βββ [id]/
β β β β βββ route.ts # PUT, DELETE
β β βββ tags/
β β β βββ route.ts # GET, POST
β β β βββ [id]/
β β β β βββ route.ts # GET, PUT, DELETE
β βββ components/ # React components
β β βββ ui/ # shadcn/ui components (12 files)
β β βββ prompts/ # Prompt-related components (9 files)
β β β βββ layout/ # Layout components (2 files)
β β βββ ai/ # AI-related components (2 files)
β β β βββ categories/ # Category management (2 files)
β β β βββ tags/ # Tag management (2 files)
β βββ lib/ # Utilities and libraries
β β βββ db.ts # Prisma client
β β βββ utils.ts # Utility functions
β β βββ colors.ts # VSCode color palette
β β βββ validations/ # Zod schemas (3 files)
β β βββ ai/ # AI integration (4 files)
β β β βββ config-loader.ts
β β β βββ client.ts
β β β βββ enhance-prompt.ts
β β βββ memory/ # Memory system (4 files)
β β β βββ loader.ts
β β β βββ matcher.ts
β β β βββ types.ts
β β βββ hooks/ # Custom hooks (4 files)
β β βββ store/ # State management (1 file)
β β βββ types/ # TypeScript types (4 files)
β βββ prisma/ # Database files (2 files)
β β βββ schema.prisma
β β βββ seed.ts
β βββ docs/ # Documentation (4 files)
β β βββ frontend/26-10-2025/
β β βββ prompt-manager-nextjs/
β β βββ plan-updated.md
β β βββ research.md
β β βββ implementation-status.md
β β βββ current-status.md
β β βββ final-status.md
β β βββ additional-features.md
β βββ public/ # Static assets
β βββ tests/ # Test files (empty)
β βββ package.json # Package configuration
β βββ tsconfig.json # TypeScript config
β βββ next.config.js # Next.js config
β βββ postcss.config.mjs # PostCSS config
β βββ .env # Environment variables
βββ prisma/ # Database files (2 files)
β βββ schema.prisma
β βββ seed.ts
βββ docs/ # Documentation (4 files)
β βββ frontend/26-10-2025/
β βββ prompt-manager-nextjs/
β β βββ plan-updated.md
β β βββ research.md
β β βββ implementation-status.md
β β βββ current-status.md
β β βββ additional-features.md
β β βββ final-status.md
βββ public/ # Static assets
βββ tests/ # Test files (empty directory)
βββ package.json # Package configuration
βββ tsconfig.json # TypeScript config
βββ next.config.js # Next.js config
βββ postcss.config.mjs # PostCSS config
βββ .env # Environment variables
βββ prisma/ # Database files (2 files)
β βββ schema.prisma
β βββ seed.ts
βββ README.md # This file
- Node.js 18+ (tested with v3.14.0)
- npm (tested with v10.2.4)
- VSCode (optional, for theme reference)
git clone https://github.com/yourusername/prompt-manager.git
cd prompt-manager
npm install
npx prisma db push
npx prisma db seed
npm run dev# Clone the repository
git clone https://github.com/yourusername/prompt-manager.git
cd prompt-manager
# Install dependencies
npm install
# Setup database
npx prisma generate
npx prisma db push
# Seed default data
npx prisma db seed
# Start development
npm run devThe application uses SQLite by default for simplicity, but can easily be migrated to PostgreSQL for production:
# Update .env for PostgreSQL
DATABASE_URL="postgresql://user:password@localhost:5432/prompt_manager"
# Update schema
# prisma/schema.prisma
# Update package.json scripts
# npm run build && npm run startnpx prisma migrate deploy
## π― **Environment Variables**
Create `.env.local` (not tracked):
```env
DATABASE_URL="file:./dev.db"
NODE_ENV="development"
Create .env.example:
DATABASE_URL="file:./dev.db"
NODE_ENV="development"Create ~/.factory/config.json with your AI models:
{
"custom_models": [
{
"model_display_name": "Claude.Code",
"model": "claude-sonnet-4-5-20250929",
"base_url": "https://api.anthropic.com",
"api_key": "your-api-key-here",
"provider": "anthropic"
},
{
"model_display_name": "GPT-4",
"model": "gpt-4",
"base_url": "https://api.openai.com/v1",
"api_key": "your-openai-key-here",
"provider": "openai"
}
]
}# Development
npm run dev # http://localhost:4443
# Production
npm run build # Optimized bundle
npm start # Production server (http://localhost:4443)
# Build verification
npm run build
npm start- Open http://localhost:4443
- Click "New Prompt"
- Fill in:
- Title: "React Hook Cleanup"
- Content: "Use cleanup function with AbortController in useEffect"
- Category: "Frontend"
- Tags: ["react", "hooks", "cleanup"]
- Choose a color
- Save
- Click "Enhance with AI" in the form
- View matched memory patterns
- Select patterns to include
- Choose AI model
- Review before/after comparison
- Accept enhanced version
- Go to "Categories" tab
- Click "Add Category"
- Add:
- Name: "Database"
- Color: "#4EC9B0" (teal)
- Icon: "Database"
- Save
- Go to "Tags" tab
- Click "Add Tag"
- Add: "database", "sql", "api"
- Tags are auto-created when used in prompts
// List all prompts
const response = await fetch('/api/prompts')
// Create a prompt
const response = await fetch('/api/prompts', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
title: 'New Prompt',
content: 'Write your prompt here...',
categoryId: 'category-id',
tags: ['tag1', 'tag2']
})
})
// Enhance a prompt
const response = await fetch('/api/prompts/enhance', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
originalPrompt: 'Simple prompt',
promptTitle: 'Testing',
includeMemory: true,
modelId: 0 // Use first model
})
})// List available models
const response = await fetch('/api/ai/models')
const models = await response.json()
// Search memory patterns
const response = await fetch('/api/memory/search', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
promptTitle: 'React component',
promptContent: 'Use hooks for state management'
})
})| Shortcut | Function |
|---|---|
| Cmd/Ctrl + N | New Prompt |
| Cmd/Ctrl + K | Focus Search |
| Cmd/Ctrl + V | Toggle View |
| Escape | Close Dialog |
The system finds patterns based on:
- Technology Keywords: React, Node.js, TypeScript, Next.js
- Content Analysis: React hooks, useEffect, state management
- Best Practices: Clean architecture, error handling
- Faster Development - AI learns from your proven patterns
- Better Prompts - AI uses your experience as context
- Consistent Quality - AI maintains your coding standards
- Team Knowledge - Share patterns across team members
Your prompt manager is now a sophistic tool that:
- Learns from your development experience
- Enhances your prompts with relevant context
- Adapts to your coding style
- Improves with AI assistance
Start creating prompts and watch as the AI learns from your memory patterns to provide increasingly helpful enhancements! πβ¨