Thank you for your interest in contributing to BioContextAI! We welcome contributions from all backgrounds and experience levels. This document provides guidelines for contributing to the BioContextAI website and infrastructure.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Contribution Workflow
- Code Guidelines
- Testing
- Submitting Changes
- Community Governance
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. We are committed to fostering an inclusive environment where diverse perspectives strengthen our collective impact on biomedical research.
- Search existing issues first to avoid duplicates
- Use the bug report template
- Provide detailed reproduction steps, environment details, and screenshots if applicable
- Include relevant error messages and console output
- Check the roadmap to see if it's already planned
- Open a GitHub issue with a clear description of the feature
- Explain the use case and why it would benefit the community
- Be open to discussion and feedback from maintainers
- Do not report security vulnerabilities through public issues
- Use GitHub's private vulnerability reporting feature
- See our Security Policy for detailed reporting instructions
- Follow the Registry Contributing Guide
- Ensure your MCP server meets metadata and licensing requirements
- MCP servers should be open source and free for academic use
We welcome code contributions including:
- Bug fixes
- Feature implementations
- Performance improvements
- Documentation improvements
- Test additions
- UI/UX enhancements
- Node.js: Use the version specified in
.nvmrc(usenvm useto switch) - npm: Comes with Node.js
- PostgreSQL: A Postgres database for development
- Git: For version control
- Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/website.git
cd website- Install dependencies:
nvm use # Use the correct Node.js version
npm install- Configure environment variables:
cp .env.local.example .env.localEdit .env.local and add your configuration:
- Database connection (
DATABASE_URL,SHADOW_DATABASE_URL) - Authentication providers (GitHub, LinkedIn OAuth credentials)
- API keys (Gemini, GitHub token)
- Other required secrets
- Set up the database:
npx prisma migrate devNote: Prisma migrations should always be created with --create-only and cannot be applied directly in this project.
- Start the development server:
npm run devVisit http://localhost:3000 to see your local instance.
Create a feature branch from main:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-descriptionUse descriptive branch names:
feature/for new featuresfix/for bug fixesdocs/for documentationrefactor/for code refactoringtest/for test additions
- Follow the code guidelines below
- Write clean, maintainable code
- Comment complex logic
- Update documentation if needed
- Add tests for new functionality
# Run linting
npm run lint
# Build the project
npm run build
# Run tests (requires test database)
npm run test
# Run tests in UI mode
npm run test:uiWrite clear, descriptive commit messages:
git add .
git commit -m "feat: add user profile page"
# or
git commit -m "fix: resolve authentication redirect issue"Follow conventional commit format:
feat:new featurefix:bug fixdocs:documentation changesstyle:formatting changesrefactor:code refactoringtest:test additions/changeschore:maintenance tasks
git push origin your-branch-nameThen create a pull request on GitHub using the PR template.
This project uses:
- React with Next.js 15 (App Router)
- TypeScript for type safety
- Prisma for database ORM
- shadcn/ui + Tailwind CSS for styling
- Auth.js (NextAuth.js v5) for authentication
- Playwright for E2E testing
- TypeScript: Use TypeScript for all new code
- ESLint: Follow the project's ESLint configuration
- Prettier: Code is automatically formatted (configured in
.prettierrc.json) - Naming: Use camelCase for variables/functions, PascalCase for components
- Components: Use functional components with hooks
- Clean Code: Focus on maintainable, readable code
- Performance: Consider performance and scalability implications
- Security:
- Never hardcode secrets or API keys
- Use environment variables for sensitive data
- Sanitize user inputs
- Follow security guidelines in SECURITY.md
- Accessibility: Ensure UI components are accessible
- Responsive Design: Test on multiple screen sizes
- Error Handling: Implement proper error handling and user feedback
- Use shadcn/ui components for consistency
- Follow Tailwind CSS design patterns
- Ensure responsive design (mobile-first)
- Maintain consistent spacing and typography
- Use semantic HTML elements
When making database changes:
- Create migrations with
npx prisma migrate dev --create-only --name descriptive_name - Review the generated migration files
- Test migrations on development database
- Include migration files in your PR
- Document breaking changes
- Use Zod for request validation
- Implement proper error handling
- Apply rate limiting where appropriate
- Require authentication for sensitive endpoints
- Return appropriate HTTP status codes
- Follow REST principles
# Run all tests
npm run test
# Run tests with UI
npm run test:ui
# Run tests in headed mode
npm run test:headed
# Debug tests
npm run test:debug- Write Playwright tests for E2E functionality
- Place tests in the
tests/directory - Test critical user flows and API endpoints
- Include both happy path and error scenarios
- Use descriptive test names
Example test structure:
test('should display user profile after login', async ({ page }) => {
// Test implementation
});For larger features, implement Playwright tests once everything works. Focus on:
- Authentication flows
- Critical user actions
- API endpoint behavior
- Error states
- Edge cases
- Fill out the PR template completely
- Link related issues using
Fixes #123orCloses #456 - Provide clear description of what changes and why
- Include screenshots/videos for UI changes
- Check all boxes in the PR checklist
- Ensure tests pass before submitting
- Keep PRs focused - one feature/fix per PR
- Be responsive to review feedback
- A maintainer will review your PR
- Address any feedback or requested changes
- Once approved, a maintainer will merge your PR
- Your contribution will be acknowledged!
- Your changes will be deployed to production
- You'll be added to the contributors list
- Repeat contributors may be invited to join the GitHub organization
BioContextAI has a clear governance structure:
- Maintainers: Maintain infrastructure and review contributions
- Contributors: Anyone who submits code, docs, or helps the community
- Advisory Committee: Provides strategic guidance
Learn more in our Governance Documentation.
- Routine changes: Approved by any maintainer
- Technical decisions: Simple majority among maintainers
- Major changes: May involve Advisory Committee consultation
Repeat contributors with demonstrated commitment may be nominated as maintainers by existing maintainers.
- Questions? Open a GitHub issue or discussion
- Stuck? Check existing documentation in
/docs - Need guidance? Ask in your PR or issue
- General inquiries: Contact us at contact@biocontext.ai
All contributors will be recognized for their contributions. We value every contribution, no matter how small!
By contributing to BioContextAI, you agree that your contributions will be licensed under the Apache License 2.0.
Thank you for contributing to BioContextAI! Together, we're building better tools for biomedical research. 🧬🤖