Prompt Booster is a React-based web application specifically designed to optimize and improve AI prompts. This tool allows users to input original prompts, enhance them using AI models, and supports iterative improvement, quality assessment, and comparative testing of the processed prompts.
- Prompt Enhancement: Optimize original prompts using AI models
- Prompt Evaluation: Analyze and score prompt quality
- Iterative Optimization: Further optimize prompts based on specific directions
- Comparative Testing: Compare the effectiveness of original prompts and enhanced prompts
- Version History: Record and manage multiple optimization versions of prompts
- Multi-model Support: Integrate various AI models and custom API interfaces
- Frontend Framework: React 19.1 + TypeScript
- Build Tool: Vite 6.2
- CSS Framework: Tailwind CSS 4.1
- State Management: Zustand 5.0
- UI Components:
- Custom UI component library (@prompt-booster/ui)
- Framer Motion (animations)
- Vaul (drawer components)
- Lucide React (icons)
- Code Quality: ESLint + TypeScript ESLint
The project adopts a streamlined Monorepo architecture, mainly consisting of the following modules:
- apps/web: Web client application (includes core business logic and UI components)
src/core/: Core business logic (prompt management, model configuration, state management)src/components/ui/: Reusable UI componentssrc/hooks/: Application-level React Hooks
- packages/api: API client and connection logic
Prompt Booster is the main functionality of the application, located in PromptBooster.tsx:
- Input original prompts
- Select system prompt templates
- Choose AI models
- Execute prompt enhancement processing
- Edit enhanced prompts
- Save edits as new versions
- Analyze prompt quality
- Continue iterative optimization
- Streaming Responses: Support for AI model streaming output, displaying enhancement results in real-time
- Version Management: Support for multi-version recording, allowing switching between different versions
- Quality Analysis: Provides both local analysis and AI-driven in-depth analysis
- User Editing: Allows users to manually edit enhanced prompts and save as new versions
The comparative testing feature allows users to compare the performance of original prompts and enhanced prompts, located in TestResult.tsx:
- Input test content (user prompts)
- Select AI model for testing
- Run parallel tests of original prompts and enhanced prompts
- Compare output results
- Support Markdown rendering toggle
- Maximize/minimize control for result areas
- Parallel Testing: Simultaneously send original prompts and enhanced prompts to the model
- Streaming Responses: Display model responses in real-time
- Response Optimization: Use RequestAnimationFrame to optimize UI updates
- Flexible Layout: Support different view modes for convenient comparison analysis
The history feature provides management of past prompt optimization records, located in PromptHistory.tsx:
- Display all prompt optimization groups
- Sort by update time
- Expand/collapse detailed information
- View optimization content of different versions
- Load history records into the editor
- Delete individual records or clear all history
- Version Comparison: Compare optimization effects of different versions within the same group
- Model Information: Display AI model used for each version
- Quick Loading: One-click loading of historical versions into the editor for continued optimization
The model settings feature allows users to configure and manage AI model connections, located in ModelSettings.tsx:
- Manage built-in model configurations
- Add and edit custom API interfaces
- Test model connections
- Enable/disable models
- Delete custom interfaces
- API Key Management: Securely store and display API keys
- Model List Retrieval: Automatically retrieve available models from the API
- Connection Testing: Verify the validity of API configurations
- Custom Interfaces: Support for adding interfaces from non-standard AI providers
- Provides top navigation bar and title display
- Supports theme switching functionality
- Integrates mobile menu control
- Provides keyboard shortcut control
- Provides navigation menu on mobile devices
- Optimized click-outside-to-close logic
- Animated transition effects
- Used for setting prompt iteration direction
- Select iteration prompt templates
- Input optimization direction description
- Used for editing model configuration information
- Supports API key show/hide control
- Automatic model list retrieval functionality
- Built-in validation logic
- Detects page refresh events
- Resets application state on refresh
- Uses sessionStorage for reliable detection
- Manages model connection test status
- Provides testing connection methods
- Handles test feedback and error reporting
- Handles saving operations for model configurations
- Supports updates for standard models and custom interfaces
- Provides success/failure feedback for saving
- Retrieves and processes all model data
- Provides model enable/disable functionality
- Manages model deletion operations
- Manages model editing form state
- Handles secure display of API keys
- Automatically generates interface names
- Manages operations for prompt groups
- Handles version switching
- Executes prompt enhancement and iteration
- Manages history record interactions
- Controls group expand/collapse states
- Handles version selection and loading
- Configures alias resolution
- Optimizes build process
- Handles dependency packaging
- Configures development server
- TypeScript support
- React Hooks rules
- React Refresh rules
- Custom animations
- Theme extensions
- Dark mode support
- tsx/ts file support
- Strict type checking
- Module resolution optimization
- Input the original prompt in the "Prompt Booster" tab
- Select system prompt template and AI model
- Click the "Start Enhancement" button
- Wait for enhancement results to generate
- Optional: Manually edit enhancement results and save as a new version
- Optional: Analyze prompt quality score
- Optional: Click "Continue Iteration" for further optimization
- Switch to the "Test Result" tab
- Input test content (user prompts)
- Select model for testing
- Click the "Run Test" button
- View and compare response results on both sides
- Optional: Turn on/off Markdown rendering
- Optional: Maximize one side of the response view
- Switch to the "History" tab
- Browse historical prompt groups
- Click "Expand" to view detailed information
- Switch versions to view different optimization results
- Click "Load This Version" to load it into the editor
- Optional: Delete unwanted records
- Switch to the "Model Settings" tab
- Edit API configuration of existing models
- Click "Add" to create custom API interfaces
- Fill in API key, base URL, and model information
- Test connection to confirm correct configuration
- Enable/disable required models
- First use local analysis to evaluate prompt quality, then decide if iteration is needed
- Provide clear optimization direction for each iteration
- Regularly perform comparative tests to validate optimization effects
- Maintain version records to allow reverting to previous versions
- Use auto-scrolling and throttling techniques to handle streaming responses
- Prioritize local analysis, only use AI analysis when in-depth analysis is needed
- Make reasonable use of maximize/minimize controls for view layout
- Reduce unnecessary model API calls
- Batch testing functionality
- Prompt template library expansion
- More AI model integrations
- Team collaboration features
- Export/import prompt functionality
- Mobile application development
© Hexart Studio 2026