Chrome extension for working with AI prompts. This extension allows users to save, organize, and share prompts for AI tools like ChatGPT and Claude.
The project consists of two main parts:
- Frontend: Chrome extension built with React, TypeScript, and Vite
- Backend: API server built with FastAPI and PostgreSQL
- Node.js (v16+)
- Python (v3.9+)
- PostgreSQL (v14+)
- Google Cloud project with OAuth 2.0 credentials
- Create a PostgreSQL database:
createdb prompt_mixer
- Install dependencies:
cd backend
pip install -r requirements.txt
- Configure environment variables:
cp .env.example .env
# Edit .env file with your database credentials and Google OAuth client ID
For local development, you can use SQLite instead of PostgreSQL:
# Database
DATABASE_URL="sqlite:///./prompt_mixer.db"
# PostgreSQL (for production)
# DATABASE_URL="postgresql://prompt_mixer_user:password@host:5432/prompt_mixer"
- Run the server:
cd backend
python run.py
The API will be available at http://localhost:8000.
- Install dependencies:
cd frontend
npm install
- Build the extension:
cd frontend
npm run build
- Load the extension in Chrome:
- Open Chrome and go to
chrome://extensions/
- Enable "Developer mode"
- Click "Load unpacked" and select the
frontend/dist
directory
- Open Chrome and go to
Run the development server with auto-reload:
cd backend
python run.py
Run the development server:
cd frontend
npm run dev
- Create a project in Google Cloud Console
- Enable the Google People API
- Create OAuth 2.0 credentials for Chrome Extension
- Add the client ID to:
frontend/public/manifest.json
in theoauth2.client_id
fieldbackend/.env
in theGOOGLE_CLIENT_ID
field
- Google authentication using chrome.identity API and JWT tokens
- Save and organize prompts
- Share prompts with other users
- Inject prompts into ChatGPT and Claude
- User clicks "Sign in with Google" in the extension
- Chrome extension API (chrome.identity) is used to get a Google OAuth token
- The token is sent to the backend API
- Backend verifies the token with Google
- If valid, backend creates or updates the user in the database
- Backend generates a JWT token and sends it back to the extension
- Extension stores the JWT token and user info in chrome.storage
- JWT token is used for all subsequent API requests