A modern React application for managing AI prompts with PostgreSQL database, built with Next.js, TypeScript, and Tailwind CSS.
- 📝 Create & Manage Prompts: Add, edit, and delete prompts with ease
- 🔍 Search & Filter: Search by title, content, or tags, filter by category
- 🏷️ Tags & Categories: Organize prompts with tags and categories
- 📋 Copy to Clipboard: Quick copy functionality for prompt content
- 💾 PostgreSQL Database: Persistent storage with Prisma ORM
- 🎨 Modern UI: Beautiful interface built with Tailwind CSS
- 📱 Responsive Design: Works on desktop and mobile devices
- Node.js 18+ installed
- PostgreSQL database running
- npm or yarn package manager
- Docker and Docker Compose installed
- Or Dokploy for cloud deployment
- 
Clone the repository git clone <repository-url> cd prompt-manager 
- 
Install dependencies npm install 
- 
Configure PostgreSQL Database Update the DATABASE_URLin your.envfile:DATABASE_URL="postgresql://username:password@localhost:5432/prompt_manager?schema=public"Replace username,password, and database details with your PostgreSQL configuration.
- 
Run database migrations npx prisma db push This will create the necessary tables in your PostgreSQL database. 
- 
Generate Prisma client npx prisma generate 
- 
Start the development server npm run dev 
- 
Open your browser Navigate to http://localhost:3000 
# Run the deployment script
./scripts/deploy.shOr manually:
# Build and start all services
docker-compose up --build -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Upload template: Import template.ymlin Dokploy
- Configure variables: Set environment variables
- Deploy: Click deploy and wait for completion
For detailed deployment instructions, see DEPLOYMENT.md
The application uses a single Prompt model with the following fields:
- id- Unique identifier (CUID)
- title- Prompt title (required)
- content- Prompt content (required)
- description- Optional description
- tags- Array of tags
- category- Optional category
- createdAt- Creation timestamp
- updatedAt- Last update timestamp
The application provides the following REST API endpoints:
- GET /api/prompts- Get all prompts
- POST /api/prompts- Create a new prompt
- GET /api/prompts/[id]- Get a specific prompt
- PUT /api/prompts/[id]- Update a prompt
- DELETE /api/prompts/[id]- Delete a prompt
- Click the "New Prompt" button
- Fill in the title and content (required)
- Optionally add description, tags, and category
- Click "Create" to save
- Edit: Click the pencil icon on any prompt card
- Delete: Click the trash icon (confirmation required)
- Copy: Click the clipboard icon to copy content
- Search: Use the search bar to find prompts
- Filter: Select a category from the dropdown
- Type tags and press Enter or comma to add them
- Click the × button on any tag to remove it
- Tags are searchable
- Frontend: React 18, Next.js 14, TypeScript
- Styling: Tailwind CSS
- Database: PostgreSQL
- ORM: Prisma
- Icons: Heroicons
To contribute to this project:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Useful Prisma commands:
# View your data in Prisma Studio
npx prisma studio
# Reset the database
npx prisma db push --force-reset
# Generate Prisma client after schema changes
npx prisma generate- Ensure PostgreSQL is running
- Check your DATABASE_URLin.env
- Verify database credentials
- Clear node_modules and reinstall: rm -rf node_modules && npm install
- Clear Next.js cache: rm -rf .next
This project is open source and available under the MIT License.