Thank you for your interest in contributing to Open Brewery DB! This guide will help you get started with contributing to our brewery dataset and codebase.
We welcome contributions in several forms:
- Data Contributions: Adding new breweries or updating existing information
- Code Contributions: Improving the website, API, or tooling
- Bug Reports: Reporting issues with data or functionality
- Feature Requests: Suggesting new features or improvements
- Documentation: Improving documentation and guides
Go to the OBDB Dataset repo to add or update breweries.
-
Fork the repository
# Fork on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/openbrewerydb-sveltekit.git cd openbrewerydb-sveltekit
-
Install dependencies
npm install
-
Start development
npm run dev
-
Create a feature branch
git checkout -b feature/your-feature-name
We use the following tools and standards:
- TypeScript: All code should be typed
- Svelte 5 Runes: Use
$state,$props,$derived,$effectinstead of legacy reactivity - TailwindCSS 4: Use utility classes for styling (no custom CSS)
- ESLint + Prettier: Code is automatically formatted
- Playwright: E2E tests for critical functionality
<!-- ✅ Correct: Use runes -->
<script lang="ts">
let count = $state(0);
let doubled = $derived(() => count * 2);
function increment() {
count++;
}
</script>
<!-- ❌ Incorrect: Legacy reactivity -->
<script lang="ts">
import { writable } from 'svelte/store';
export let count = 0;
$: doubled = count * 2;
</script><!-- ✅ Correct: Use Tailwind classes -->
<div class="bg-amber-50 p-4 rounded-lg shadow-md">
<h2 class="text-xl font-bold text-gray-900">Brewery Name</h2>
</div>
<!-- ❌ Incorrect: Custom CSS -->
<style>
.brewery-card {
background-color: #fffbeb;
padding: 1rem;
border-radius: 0.5rem;
}
</style>- E2E Tests: Use Playwright for user flow testing
- Type Checking: Run
npm run checkbefore committing - Linting: Run
npm run lintto check code quality
# Run all checks
npm run check
npm run lint
npm run test:e2e- Keep changes focused on a single feature or bug fix
- Follow existing code patterns and conventions
- Add tests for new functionality
- Update documentation if needed
- Ensure all checks pass before submitting
-
Update your fork with the latest changes
git remote add upstream https://github.com/openbrewery/openbrewerydb-sveltekit.git git pull upstream main
-
Create a pull request
- Use a descriptive title
- Describe what you changed and why
- Link to any related issues
- Include screenshots for UI changes
-
Address feedback
- Respond to reviewer comments promptly
- Make requested changes
- Keep the PR updated
When reporting bugs, please include:
- Clear description of the issue
- Steps to reproduce the problem
- Expected vs actual behavior
- Environment details (browser, OS, etc.)
- Screenshots if applicable
- API calls or URLs involved
## Description
Brief description of the issue
## Steps to Reproduce
1. Go to...
2. Click on...
3. See error
## Expected Behavior
What should happen
## Actual Behavior
What actually happens
## Environment
- OS: [e.g., macOS 14.0]
- Browser: [e.g., Chrome 120]
- URL: [if applicable]
## Additional Context
Any other relevant informationWe welcome feature requests! Please:
- Check existing issues first to avoid duplicates
- Describe the problem you're trying to solve
- Explain the proposed solution
- Consider alternatives you've thought of
- Provide use cases and examples
Help us improve documentation by:
- Fixing typos and grammatical errors
- Adding examples to API documentation
- Improving guides and tutorials
- Translating content to other languages
- Adding screenshots and diagrams
src/
├── lib/
│ ├── components/ # Reusable Svelte components
│ ├── data/ # Static data and generated content
│ ├── types.ts # TypeScript type definitions
│ └── utils/ # Utility functions
├── routes/ # SvelteKit pages and API routes
│ ├── breweries/ # Brewery-related pages
│ ├── documentation/ # API documentation
│ └── api/ # API endpoints
├── layouts/ # Page layouts
└── styles/ # Global styles and TailwindCSS
The project includes several build scripts:
npm run authors:build- Updates GitHub author data from markdown frontmatternpm run changelogs:build- Builds changelog data from GitHub releasesnpm run build- Production buildnpm run check- TypeScript type checkingnpm run lint- Code lintingnpm run format- Code formatting
Create a .env file for local development:
# Sentry (optional, for error tracking)
SENTRY_AUTH_TOKEN=your_sentry_token
# GitHub (for build scripts)
GITHUB_TOKEN=your_github_token- Use browser dev tools for frontend debugging
- Check Network tab for API calls
- Use console.log for temporary debugging (remove before committing)
- Svelte DevTools browser extension for component debugging
All contributions go through code review:
- Automated checks must pass (linting, type checking, tests)
- Manual review by maintainers
- Feedback and iteration as needed
- Approval and merge by maintainers
We're currently focusing on:
- Data accuracy and completeness
- API performance and reliability
- Mobile responsiveness and accessibility
- Search functionality improvements
- Documentation and developer experience
- GitHub Issues: For bugs and feature requests
- Discussions: For questions and general discussion
- Documentation: Check existing docs first
- Existing Issues: Look for similar issues before creating new ones
Contributors are recognized in several ways:
- GitHub Contributors list
- Release notes mention significant contributions
- Special thanks in documentation
- Community recognition in project communications
By contributing, you agree that your contributions will be licensed under the same MIT License as the project.
Thank you for contributing to Open Brewery DB! Your help makes this project better for everyone. 🍺