Hey! 👋 Thanks for checking this out.
PromptTriage is still early-stage and I'm the only developer right now, so any help is genuinely appreciated — even if it's just pointing out something that looks off.
🐛 Found a bug? Something feels weird? Open an issue!
Seriously, don't overthink it. A one-liner saying "this button doesn't work" is totally fine. I'd rather know about it than not.
If you want to go further and submit a PR — awesome, I'm happy to review it. Whether it's fixing a typo or adding a whole new feature, it all helps move this project forward.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Documentation
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
Before you begin, ensure you have the following installed:
- Node.js: Version 20+ recommended
- Python: Version 3.9+ (for backend services)
- npm: Version 9.0 or higher
- Git: For version control
- Google Gemini API Key: Required for AI functionality
- Pinecone API Key: Required for RAG functionality
If you're new to open source, welcome! Here are some resources to help you get started:
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/YOUR-USERNAME/PromptTriage.git
cd PromptTriage# Navigate to the application directory
cd promptrefiner-ui
# Install dependencies
npm install# Navigate to the backend directory
cd backend
# Install Python dependencies
pip install -r requirements.txtCreate a .env.local file in the promptrefiner-ui directory and a .env file in backend:
# Required: AI Services
GEMINI_API_KEY=your_gemini_api_key_here
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_INDEX_NAME=prompt-triage
# Optional: Authentication
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000
# Optional: Enhancements
FIRECRAWL_API_KEY=your_firecrawl_api_key
FEEDBACK_WEBHOOK_URL=your_webhook_url_for_error_reportsHow to get API keys:
- Gemini API Key: Visit Google AI Studio
- Pinecone API Key: Visit Pinecone Console
# Run the development server with Turbopack
npm run devThe application will be available at http://localhost:3000.
- Open your browser and navigate to
http://localhost:3000 - Test the analyzer by entering a sample prompt
- Verify that the AI responses are working correctly
- 🐛 Bug Fixes: Fix issues and improve stability
- ✨ New Features: Add new functionality that aligns with project goals
- 📚 Documentation: Improve or add documentation
- 🧪 Tests: Add or improve test coverage
- 🎨 UI/UX Improvements: Enhance the user interface and experience
- ⚡ Performance: Optimize code and improve performance
- 🔒 Security: Identify and fix security vulnerabilities
- Check Existing Issues: Browse open issues to see if someone is already working on it
- Create an Issue: For significant changes, create an issue first to discuss your approach
- Claim an Issue: Comment on an issue to let others know you're working on it
-
Create a Branch: Use a descriptive branch name
git checkout -b feature/your-feature-name # or git checkout -b fix/bug-description -
Make Your Changes: Follow the coding standards and keep commits focused
-
Test Your Changes: Ensure all tests pass and manually verify functionality
-
Commit Your Changes: Use clear, descriptive commit messages
git add . git commit -m "feat: add new feature description"
Before submitting:
- Ensure your code follows the project's coding standards
- Run linting:
npm run lint - Build the project:
npm run build - Test your changes thoroughly
- Update documentation if needed
- Add/update tests if applicable
- Rebase on the latest
mainbranch
-
Push your branch to your fork:
git push origin your-branch-name
-
Go to the PromptTriage repository and click "New Pull Request"
-
Fill out the PR template completely:
- Provide a clear description of your changes
- Reference related issues
- Include screenshots for UI changes
- List any breaking changes
- Be Responsive: Address review comments promptly
- Be Patient: Reviews may take time
- Be Open: Be receptive to feedback and suggestions
- Iterate: Make requested changes and push updates
- Delete your feature branch
- Pull the latest changes from
main - Celebrate! 🎉 You've contributed to PromptTriage!
- Use TypeScript for all new code
- Define proper types and interfaces
- Avoid using
anytype unless absolutely necessary - Use meaningful variable and function names
- Follow the existing code style
- Use ESLint to check your code:
npm run lint - Use 2 spaces for indentation
- Use single quotes for strings
- Add trailing commas in multi-line objects and arrays
PromptTriage/
├── promptrefiner-ui/ # Next.js frontend
│ ├── src/
│ │ ├── app/ # Next.js App Router
│ │ ├── api/ # Integration endpoints
│ │ ├── components/ # React components
│ │ ├── services/ # RAG, Context7, Firecrawl clients
│ │ └── prompts/ # Modality-specific metaprompts
├── backend/ # FastAPI RAG service
│ ├── app/routers/ # RAG & Ingestion endpoints
│ └── scripts/ # Dataset ingestion pipelines
└── datasets/ # Curated prompt datasets
- Files: Use kebab-case for file names (e.g.,
prompt-analyzer.ts) - Components: Use PascalCase for React components (e.g.,
PromptForm.tsx) - Functions: Use camelCase for functions (e.g.,
analyzePrompt()) - Constants: Use UPPER_SNAKE_CASE for constants (e.g.,
API_ENDPOINT)
- Write clear, concise comments for complex logic
- Use JSDoc for function documentation
- Avoid obvious comments that just restate the code
/**
* Analyzes a user prompt and generates follow-up questions
* @param prompt - The initial user prompt to analyze
* @param targetModel - The AI model to optimize for
* @returns Analysis blueprint and follow-up questions
*/
async function analyzePrompt(prompt: string, targetModel: string) {
// Implementation
}All changes should be manually tested:
- Functional Testing: Verify the feature works as expected
- Edge Cases: Test with unusual or extreme inputs
- Cross-Browser: Test on Chrome, Firefox, Safari
- Responsive: Test on different screen sizes
- Error Handling: Test error scenarios
- Code runs without errors
- No console warnings or errors
- UI is responsive and accessible
- Error messages are clear and helpful
- Loading states are handled properly
- Forms validate input correctly
We're planning to add:
- Unit tests with Jest
- Integration tests
- E2E tests with Playwright
Contributions to test infrastructure are welcome!
Good documentation is crucial for a healthy project.
Update documentation when you:
- Add new features
- Change existing behavior
- Fix bugs that affect usage
- Update configuration or setup
- README.md: Project overview and getting started
- Code Comments: Inline documentation
- API Documentation: Document API endpoints
- Examples: Add examples for new features
- Use clear, simple language
- Provide examples and use cases
- Include screenshots for UI features
- Keep it up-to-date with code changes
- GitHub Discussions: Ask questions and share ideas
- GitHub Issues: Report bugs or request features
- Star the Repository: Show your support!
- Watch for Updates: Get notified of new releases
- Follow Contributors: Learn from other contributors
Contributors are recognized in:
- GitHub's contributor graph
- Release notes (for significant contributions)
- Project documentation (for major features)
We follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Maintenance tasksci: CI/CD changes
feat(analyzer): add support for custom model parameters
Added configuration options to allow users to customize
temperature, top_p, and max_tokens for the analyzer.
Closes #123
fix(ui): resolve mobile responsiveness issue in prompt form
The prompt textarea was overflowing on small screens.
Updated the CSS to ensure proper responsive behavior.
Fixes #456
If you discover a security vulnerability, please do NOT open a public issue. Instead, follow our Security Policy to report it responsibly.
By contributing to PromptTriage, you agree that your contributions will be licensed under the same license as the project.
Your contributions make PromptTriage better for everyone. Whether you're fixing a typo, adding a feature, or helping with documentation, every contribution counts!
Questions? Feel free to open a discussion or reach out to the maintainers.
Happy contributing! 🚀