A modern demo application for discovering and managing AI prompts locally. Built with React, TypeScript, and Vite.
- Browse Prompts - Explore prompts by category, type, and tags with advanced filtering
- Prompt Details - View comprehensive prompt information with copy-to-clipboard functionality
- Search & Filter - Real-time search with category, type, and sorting options
- Dark/Light Mode - Full theme support with system preference detection
- Responsive Design - Optimized for all device sizes
- Mock Authentication - Simulated login with user/admin roles (no real backend)
- Admin Dashboard - Create, read, update, delete operations for prompt management
- Role-based Access - Admin vs user permissions
- Demo Accounts - Pre-configured admin and user accounts for testing
- No External APIs - Fully functional with mock data and services
- Local Storage - Persistent data across sessions
- Type Safety - Comprehensive TypeScript definitions
- Modern Stack - React 19, Vite, Tailwind CSS, React Router 7
This is a demo application with the following limitations:
- No real backend β Authentication and data storage are simulated using localStorage
- Single-user experience β Data is stored locally and not shared across devices/users
- No real AI integration β The "AI enhancement" feature is a mock simulation
- No user registration β Only preβconfigured demo accounts are available
If you need a productionβready platform with real user authentication, cloud database, and AI API integration, consider extending this project with a backend (e.g., Supabase, Firebase) and integrating a real LLM provider.
- Node.js 18+ and npm/yarn/pnpm
-
Clone and install dependencies:
git clone <repository-url> cd promptlib-v2 npm install
-
Start the development server:
npm run dev
Open http://localhost:3000 in your browser.
-
Build for production:
npm run build
-
Preview the production build:
npm run preview
The application includes pre-configured demo accounts for testing:
| Password | Role | Access | |
|---|---|---|---|
admin@promptlib.com |
(none required) | Admin | Full admin dashboard access |
wizard@promptlib.com |
(none required) | User | Standard user permissions |
Note: This is a mock authentication system. Simply enter the email address to log in.
promptlib-v2/
βββ components/ # Reusable UI components
β βββ CreatePromptModal.tsx
β βββ Footer.tsx
β βββ Header.tsx
β βββ PromptCard.tsx
β βββ PromptOfTheDay.tsx
βββ pages/ # Page components
β βββ AdminDashboard.tsx
β βββ CategoriesPage.tsx
β βββ LoginPage.tsx
β βββ NotFoundPage.tsx
β βββ PromptBrowsePage.tsx
β βββ PromptDetailPage.tsx
β βββ TagsPage.tsx
βββ services/ # Mock services
β βββ geminiService.ts # Mock AI service (simulated, no external APIs)
β βββ mockDb.ts # Local storage database
βββ context/ # React context providers
β βββ AuthContext.tsx # Authentication context
βββ types/ # TypeScript type definitions
βββ constants/ # Constants and configuration
βββ public/ # Static assets
βββ root files # Configuration files
- PromptBrowsePage - Main landing page with filtering and search
- PromptDetailPage - Detailed view with copy functionality
- PromptCard - Card component for displaying prompts in grid
- CreatePromptModal - Form for creating new prompts
- AdminDashboard - Full administrative interface
- Prompt Management - Create, read, update, delete operations
- Feature Toggle - Mark prompts as featured
- Statistics - View usage metrics
- Header - Navigation with theme toggle and user menu
- Footer - Site footer with links
- PromptOfTheDay - Hero section showcasing featured prompts
The application uses Tailwind CSS with a custom design system:
- Color Palette: Primary blue (#2563eb) with semantic colors
- Typography: Inter font family with responsive scales
- Dark Mode: Full support with localStorage persistence
- Components: Custom-styled components with consistent spacing
- Animations: Smooth transitions and hover effects
The application uses a simulated database with localStorage persistence:
- In-memory storage with localStorage backup
- CRUD operations for prompts, categories, and users
- Search and filtering with multiple criteria
- Statistics tracking (view counts, copy counts)
interface Prompt {
id: number;
title: string;
description: string;
prompt_type: 'Text' | 'Image' | 'Code' | 'Hybrid';
category_id: number;
tags: string[];
view_count: number;
copy_count: number;
is_featured: boolean;
is_published: boolean;
// ... additional fields
}This is a static Single Page Application (SPA) that can be deployed to any static hosting service:
- Push your code to GitHub/GitLab/Bitbucket
- Import the repository to Vercel
- Vercel will automatically detect the Vite project and deploy it
- Drag and drop the
distfolder to Netlify - Or connect your Git repository and set build command to
npm run build
- Update
vite.config.tsbase path if needed - Run
npm run build - Deploy the
distfolder to GitHub Pages
- The built files are in the
distdirectory - Upload the entire
distfolder to any web server (Apache, Nginx, etc.)
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm run preview- Preview production build locally
No API keys or environment variables are required. The application is fully self-contained with mock data.
- Add TypeScript definitions in
types.ts - Create components in
components/or pages inpages/ - Update mock services in
services/if needed - Add routing in
App.tsx
The application includes comprehensive mock data for testing:
- Sample Prompts: Business, coding, creative, and AI agent prompts
- Categories: Academic, Business, Coding, Creative, Data Analysis, Marketing, AI Agents
- Tags: Various tags for filtering and discovery
| Technology | Purpose | Version |
|---|---|---|
| React | UI Library | ^19.2.3 |
| TypeScript | Type Safety | ~5.8.2 |
| Vite | Build Tool & Dev Server | ^7.3.0 |
| React Router | Client-side Routing | ^7.10.1 |
| Tailwind CSS | Styling | CDN 3.4.0 |
| Lucide React | Icons | ^0.561.0 |
| LocalStorage | Data Persistence | Native |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with modern web technologies
- Inspired by the need for better AI prompt organization
- Thanks to the open-source community for amazing tools and libraries
PromptLibrary - Making AI prompt discovery simple and accessible
