A full-stack web application for managing and organizing AI prompts. Built with Next.js, Prisma, and SQLite.
- ✅ Create, edit, and delete prompts
- ✅ Organize prompts with categories and tags
- ✅ Filter prompts by category, tags, platform, status, and more
- ✅ Full-text search across title, description, and body
- ✅ Usage tracking (usage count and last used date)
- ✅ Copy prompts to clipboard with one click
- ✅ Duplicate prompts
- ✅ Mark prompts as favorites
- ✅ Export/import prompts in JSON format
- ✅ Hierarchical category structure
- ✅ Modern UI with TailwindCSS and shadcn/ui
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: TailwindCSS
- UI Components: shadcn/ui
- Database: SQLite
- ORM: Prisma
- Validation: Zod
- Node.js 20 or higher
- npm, yarn, or pnpm
- Clone the repository:
git clone <repository-url>
cd "Prompt database"- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Set up environment variables:
cp .env.example .envThe default .env file should contain:
DATABASE_URL="file:./dev.db"
- Set up the database:
# Generate Prisma Client
npm run db:generate
# Run migrations
npm run db:migrate
# (Optional) Seed the database with sample data
npm run db:seedStart the development server:
npm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 in your browser.
npm run db:migratenpm run db:pushnpm run db:seedRun tests:
npm testRun tests in watch mode:
npm run test:watchBuild the application:
npm run buildStart the production server:
npm startDe snelste manier om de applicatie te draaien met Docker:
# Build en start de container
docker-compose up -d --build
# Initialiseer de database
docker-compose exec app npx prisma migrate deploy
# (Optioneel) Seed de database
docker-compose exec app npm run db:seedDe applicatie is nu beschikbaar op http://localhost:3300
Voor development met hot-reload:
docker-compose -f docker-compose.dev.yml up --build# Logs bekijken
docker-compose logs -f app
# Container stoppen
docker-compose down
# Container opnieuw opbouwen
docker-compose up -d --build --force-recreateVoor meer gedetailleerde Docker instructies, zie DOCKER.md
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── prompts/ # Prompt pages
│ ├── categories/ # Category pages
│ └── tags/ # Tag pages
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── layout/ # Layout components
│ └── prompt/ # Prompt-related components
├── lib/ # Utility functions
├── prisma/ # Prisma schema and migrations
├── tests/ # Test files
└── public/ # Static assets
GET /api/prompts- List prompts (with filters)POST /api/prompts- Create a promptGET /api/prompts/[id]- Get a promptPUT /api/prompts/[id]- Update a promptDELETE /api/prompts/[id]- Delete a promptPATCH /api/prompts/[id]/usage- Track prompt usage
GET /api/categories- List categoriesPOST /api/categories- Create a categoryPUT /api/categories/[id]- Update a categoryDELETE /api/categories/[id]- Delete a category
GET /api/tags- List tagsPOST /api/tags- Create a tagPUT /api/tags/[id]- Update a tagDELETE /api/tags/[id]- Delete a tag
GET /api/export/prompts- Export all prompts as JSONPOST /api/import/prompts- Import prompts from JSON
- Click "New Prompt" in the top bar
- Fill in the required fields (title, body, use case)
- Optionally add description, category, tags, and other metadata
- Click "Save"
Use the sidebar filters to:
- Filter by category
- Filter by tags (multiple selection)
- Filter by platform
- Filter by status
- Filter by language
- Show only favorites
Use the search bar in the top bar to search across:
- Prompt titles
- Descriptions
- Prompt body content
Export:
- Click "Export" in the top bar
- A JSON file will be downloaded with all prompts, categories, and tags
Import:
- Click "Import" in the top bar
- Select a JSON file exported from this application
- Click "Import"
- The prompts will be imported (categories and tags will be created if they don't exist)
- Open a prompt
- Click "Copy Prompt" button
- The prompt body will be copied to your clipboard
- Usage count and last used date will be automatically updated
MIT