First off, thank you for considering contributing to PacificOceanAI! It's people like you that make PacificOceanAI such a great tool.
- Code of Conduct
- Getting Started
- How Can I Contribute?
- Development Setup
- Coding Guidelines
- Commit Messages
- Pull Request Process
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.
- Be respectful: Treat everyone with respect and kindness
- Be collaborative: Work together and help each other
- Be inclusive: Welcome newcomers and diverse perspectives
- Be constructive: Provide helpful feedback and suggestions
- Node.js 18+ and npm
- Chrome or Edge browser
- Basic knowledge of TypeScript and React
- Familiarity with browser extensions
-
Fork and clone the repository
git clone https://github.com/BigCatNotFat/PacificOceanAI.git cd pacific-ocean-ai -
Install dependencies
npm install
-
Start development mode
npm run dev
-
Load the extension in your browser
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
distfolder
- Open
-
Make your changes
- The extension will auto-reload on file changes
- Check the browser console for errors
Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples (code snippets, screenshots)
- Describe the behavior you observed and what you expected
- Include your environment details (OS, browser version, extension version)
Bug Report Template:
**Describe the bug**
A clear description of what the bug is.
**To Reproduce**
Steps to reproduce:
1. Go to '...'
2. Click on '...'
3. See error
**Expected behavior**
What you expected to happen.
**Screenshots**
If applicable, add screenshots.
**Environment:**
- OS: [e.g., Windows 11]
- Browser: [e.g., Chrome 120]
- Extension Version: [e.g., 2.0.3]
**Additional context**
Any other relevant information.Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Explain why this enhancement would be useful
- List any alternatives you've considered
Unsure where to begin? Look for issues labeled:
good first issue- Good for newcomershelp wanted- Extra attention neededdocumentation- Documentation improvements
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the coding guidelines
- Add tests if applicable
- Update documentation
-
Test your changes
npm run build # Load the extension and test manually -
Commit your changes
git commit -m "feat: add amazing feature" -
Push to your fork
git push origin feature/your-feature-name
-
Open a Pull Request
- Fill in the PR template
- Link any related issues
- Request review from maintainers
- Use TypeScript for all new code
- Enable strict mode
- Avoid
anytypes when possible - Use interfaces for object shapes
- Document complex types
// Good
interface UserConfig {
apiKey: string;
modelId: string;
temperature?: number;
}
// Avoid
const config: any = { ... };- Use functional components with hooks
- Keep components small and focused
- Use meaningful component names
- Extract reusable logic into custom hooks
// Good
export const ChatMessage: React.FC<ChatMessageProps> = ({ message }) => {
const [isExpanded, setIsExpanded] = useState(false);
// ...
};- One component per file
- Group related files in folders
- Use index.ts for public exports
- Keep file names consistent with exports
src/
├── services/
│ ├── llm/
│ │ ├── LLMService.ts
│ │ ├── adapters/
│ │ │ ├── OpenAIProvider.ts
│ │ │ └── index.ts
│ │ └── index.ts
- Files: PascalCase for components, camelCase for utilities
- Components: PascalCase (e.g.,
ChatMessage) - Functions: camelCase (e.g.,
formatMessage) - Constants: UPPER_SNAKE_CASE (e.g.,
MAX_RETRIES) - Interfaces: PascalCase with
Iprefix for services (e.g.,ILLMService)
- Write self-documenting code
- Add comments for complex logic
- Keep functions small and focused
- Avoid deep nesting
- Handle errors gracefully
// Good: Clear and focused
async function fetchUserData(userId: string): Promise<User> {
try {
const response = await api.get(`/users/${userId}`);
return response.data;
} catch (error) {
logger.error('Failed to fetch user data', { userId, error });
throw new Error('User data unavailable');
}
}- Write tests for new features
- Test edge cases and error conditions
- Keep tests simple and readable
- Mock external dependencies
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 tasks
feat(llm): add support for Gemini 2.0 Flash
Implement GeminiProvider with streaming support and function calling.
Closes #123
---
fix(editor): resolve text selection issue in Safari
The text selection was not working correctly in Safari due to
browser-specific behavior. Added Safari-specific handling.
Fixes #456
---
docs: update installation instructions
Add troubleshooting section for common installation issues.-
Ensure your PR:
- Follows the coding guidelines
- Includes tests if applicable
- Updates documentation
- Has a clear description
-
PR Template:
## Description Brief description of changes ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Documentation update ## Testing How has this been tested? ## Checklist - [ ] Code follows style guidelines - [ ] Self-review completed - [ ] Comments added for complex code - [ ] Documentation updated - [ ] No new warnings generated
-
Review Process:
- Maintainers will review your PR
- Address any feedback or requested changes
- Once approved, your PR will be merged
-
After Merge:
- Your contribution will be included in the next release
- You'll be added to the contributors list
- Use Chrome DevTools for debugging
- Check the extension's background page console
- Use
console.logstatements (remove before committing) - Test in both Chrome and Edge
- Avoid unnecessary re-renders
- Use React.memo for expensive components
- Debounce user input handlers
- Lazy load heavy components
- Use semantic HTML
- Add ARIA labels where needed
- Ensure keyboard navigation works
- Test with screen readers
Feel free to:
- Open an issue for questions
- Join our discussions
- Reach out to maintainers
Contributors will be recognized in:
- README.md contributors section
- Release notes
- Project documentation
Thank you for contributing to PacificOceanAI! 🎉