ไธญๆๆๆกฃ Online experience
A comprehensive monorepo project for optimizing and enhancing prompts for large language models (LLMs) across multiple platforms.
Prompt Booster is a specialized tool designed to help users optimize prompts for large language models. It leverages multiple AI providers to enable prompt optimization, version control, A/B testing, and template management across different platforms.
The project follows a monorepo architecture using Turborepo and PNPM workspaces, organized into packages for shared code and platform-specific applications.
overview.mp4
prompt-booster/
โโโ packages/ # Shared cross-platform code
โ โโโ core/ # Core business logic and state management
โ โโโ api/ # API client implementations for LLM providers
โ โโโ ui/ # Shared UI components
โโโ apps/ # Platform-specific implementations
โ โโโ web/ # Web application
โ โโโ desktop/ # Electron desktop application
โโโ backend/ # FastAPI backend service (planned)
โโโ docs/ # Project documentation
โโโ docker/ # Docker configuration files
โ โโโ frontend.Dockerfile # Frontend container build file
โ โโโ nginx.conf # Nginx configuration
โโโ docker-compose.yml # Docker compose configuration
The core package serves as the foundation, providing:
- Model configuration management
- Prompt management with version control
- Template system for prompt optimization
- State management with Zustand
- Storage utilities
View Core Package Documentation
A flexible client library for interacting with various LLM services:
- Unified interface for multiple LLM providers
- Support for OpenAI, Gemini, DeepSeek, Hunyuan, Siliconflow, and Ollama
- Streaming response handling
- Error management
- Authentication strategies
View API Package Documentation
A comprehensive UI component library:
- Specialized prompt editing components
- Theme system with light/dark modes
- Dialog and modal components
- Markdown rendering with syntax highlighting
- Auto-scrolling components for streaming content
Browser-based application for prompt optimization:
- Prompt enhancement and iteration
- Quality analysis
- A/B testing
- Version history management
- Model configuration
View Web Application Documentation
Native desktop experience using Electron:
- Cross-platform support (Windows, macOS, Linux)
- Native OS menus and keyboard shortcuts
- Offline-capable functionality
- Consistent UI with web version
Important Note: The desktop application is intentionally managed as a completely independent package outside the main project structure. Unlike other packages in this monorepo which use pnpm, the desktop package exclusively uses npm for dependency management due to compatibility issues between pnpm and Electron Builder. The desktop client consumes the compiled web application but maintains its own build process and dependency tree. For detailed compilation and development instructions, please refer to the Desktop Application Documentation.
View Desktop Application Documentation
- Node.js 18.17.0 or higher
- PNPM 10.9.0 or higher
-
Install Node.js:
- Download and install Node.js 18.17.0 or higher from the official Node.js website
- Verify the installation by running
node -v
andnpm -v
in your terminal
-
Install pnpm:
# Using npm npm install -g pnpm # Or using the recommended standalone script curl -fsSL https://get.pnpm.io/install.sh | sh - # Verify installation pnpm --version
-
Clone the repository:
git clone https://github.com/hexart/prompt-booster.git cd prompt-booster
-
Install dependencies:
pnpm install
Start the development server for the web application:
# Build packages and start web app in development mode
pnpm dev
Run the desktop application in development mode:
# Start desktop app in development mode
cd apps/desktop
npm install
npm run dev
Build all packages and applications:
# Build all packages and applications
pnpm build
Clean the project:
# Clean build artifacts
pnpm clean
# Deep clean (including node_modules)
pnpm clean:all
Build desktop application packages for different platforms:
cd apps/desktop
# Package for all platforms
npm run build
# Package for macOS
npm run build:mac
Use the following command to pull the latest image and run Prompt Booster in a container. This command will automatically update to the latest version whenever it's run:
docker pull ghcr.io/hexart/prompt-booster:latest \
&& docker rm -f prompt-booster 2>/dev/null || true \
&& docker run -d \
--name prompt-booster \
--restart always \
-p 8080:80 \
ghcr.io/hexart/prompt-booster:latest
This command:
- Pulls the latest image from GitHub Container Registry
- Removes any existing container named "prompt-booster"
- Creates a new container with automatic restart policy
- Maps port 8080 on your host to port 80 in the container
The project also includes Docker Compose configurations for more advanced deployment:
-
Build and start the containers:
docker-compose up -d
This will:
- Build the frontend container using
docker/frontend.Dockerfile
- Configure Nginx using
docker/nginx.conf
- Start the services defined in
docker-compose.yml
- Build the frontend container using
-
Access the application at
http://localhost:8080
For manual deployment of the web application:
-
Build the project:
pnpm build
-
The built files will be available in
apps/web/dist
-
Deploy these files to any static web server
The project is currently in active development. According to the development roadmap:
- Phase 1 (Foundation) and Phase 2 (Advanced Features and Desktop) are completed
- Phase 3 (Enhanced Functionality) is currently in progress
- Phases 4-7 (Backend & Sync, Mobile, WeChat Mini-Program, Refinement and Launch) are planned for future development
Additional documentation is available:
- Languages: TypeScript, Python (backend)
- Frontend: React 19.1, TailwindCSS 4.1
- State Management: Zustand 5.0
- Build Tools: Vite, Turborepo, PNPM
- Desktop: Electron 36
- Backend (planned): FastAPI, PostgreSQL
- Containerization: Docker
Contributions are welcome! Please refer to our Contributing Guide for detailed instructions on how to contribute to this project.
- ๐ Contributing Guide - How to fork, develop, and submit pull requests
- ๐ Report Issues - Report bugs or request features
Please follow the existing code style and development guidelines outlined in the contributing guide.
This project was inspired by and builds upon prompt-optimizer by linshenkx. We would like to express our sincere gratitude for their pioneering work in the field of prompt engineering and optimization. Their open-source contribution under the MIT license has been instrumental in the development of Prompt Booster. We highly recommend checking out their original project.
This project is licensed under the terms of both the MIT license and the Apache License 2.0, at your option.
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)