Contributing
Thank you for your interest in contributing to Answer Overflow! We welcome contributions of all kinds, from bug fixes to new features.If you need any help, please reach out in our Discord community!
Before you start
Set up your development environment
Follow the Development setup guide to get Answer Overflow running locally.
Find something to work on
- Check the GitHub Issues for open tasks
- Look for issues labeled
good first issuefor beginner-friendly tasks - Join our Discord to discuss ideas for new features
Development workflow
VSCode workspace
VSCode users should open theansweroverflow.code-workspace file:
- Configures all recommended settings
- Hides unnecessary files (like
node_modules) - Sets up the proper TypeScript configuration
Code quality
We use Biome for linting and formatting:Husky pre-commit hooks will automatically format your code before committing.
Type checking
Ensure your changes pass type checking:Testing
Running tests
Writing tests
We use Vitest for testing. Here’s a basic example:Add tests for any new features or bug fixes. Tests should be placed in the same directory as the code they test.
Pull request process
Commit your changes
Write clear, descriptive commit messages:Commit message prefixes:
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Create a pull request
- Go to the Answer Overflow repository
- Click “New Pull Request”
- Select your branch
- Fill out the PR template with:
- Description of changes
- Related issue numbers
- Screenshots (if applicable)
- Testing steps
Code style guidelines
TypeScript
- Use TypeScript strict mode
- Prefer
constoverlet - Use meaningful variable names
- Add type annotations for function parameters and return types
- Use Effect for functional programming patterns where appropriate
React
- Use functional components
- Prefer hooks over class components
- Keep components small and focused
- Use proper TypeScript types for props
Effect usage
When working with the Discord bot or database packages, follow Effect patterns:Package-specific guidelines
Database package
When modifying the database schema:- Update the schema in
packages/database/convex/schema.ts - Run
bun codegento regenerate types - Create a migration if needed
- Test thoroughly before committing
Discord bot
When adding new bot commands:- Create a new file in
apps/discord-bot/src/commands/ - Follow the existing command structure
- Register the command in the bot initialization
- Add tests for the command logic
Main site
When adding new pages:- Use the Next.js App Router structure
- Implement proper SEO metadata
- Ensure responsive design
- Test with Convex real-time updates
Building
Build the entire monorepo:- Build all packages in dependency order
- Generate type definitions
- Compile TypeScript
- Build Next.js for production
The build uses Turbo’s caching to avoid rebuilding unchanged packages.
Getting help
Discord Community
Ask questions and get help from the community
GitHub Issues
Report bugs or request features
Architecture Guide
Learn about the system design
Development Setup
Set up your development environment
License
By contributing to Answer Overflow, you agree that your contributions will be licensed under the MIT License.Thank you for contributing to Answer Overflow! Every contribution helps make Discord knowledge more discoverable.