A web application that helps users create structured prompts for Large Language Models (LLMs) using the CO-STAR framework.
The CO-STAR Prompt Builder guides users through creating well-structured prompts by breaking them down into six key components:
- Context: Background information on the task
- Objective: The specific task you want the LLM to perform
- Style: The writing style for the response
- Tone: The attitude of the response
- Audience: Who the response is intended for
- Response: The desired output format
- Step-by-step prompt building interface
- Save and reuse templates for each component
- Save complete prompts for future use
- Dark mode support
- Keyboard shortcuts (Cmd/Ctrl + Enter to advance)
- Copy to clipboard functionality
- XML-formatted output
- Responsive design
- Next.js 15
- React 18
- TypeScript
- Tailwind CSS
- Framer Motion
- Radix UI Toast
- Geist Font
- Node.js 18.17 or later
- npm, yarn, or pnpm package manager
- Clone the repository:
git clone https://github.com/yourusername/costar.git
cd costar
- Install dependencies:
npm install
# or
yarn install
# or
pnpm install
- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
- Open http://localhost:3000 in your browser
- Create a production build:
npm run build
# or
yarn build
# or
pnpm build
- Start the production server:
npm start
# or
yarn start
# or
pnpm start
The easiest way to deploy as a static site is using Replit:
- Go to Replit and log in or create an account.
- Click on the "Create" button and select "Import from GitHub."
- Enter the URL of your GitHub repository and click "Import."
- Once the project is imported, ensure that your
package.json
file includes the necessary scripts:"build": "next build && next export"
- Set the environment variable
PORT
to3000
in the Replit settings. - In the Replit settings, enable the "Static Site" option.
- Click the "Run" button to start your application.
- Your app will be accessible via the URL provided by Replit.
The application uses browser local storage to persist:
- Saved templates for each component
- Complete saved prompts
- No server-side storage is required
MIT
Contributions are welcome! Please feel free to submit a Pull Request.