Thank you for your interest in contributing to Duckbase! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Workflow
- Branch Strategy
- Making Changes
- Pull Request Process
- Code Style
- Testing
- Documentation
- Reporting Issues
- Questions
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Node.js 18 or higher
- npm or yarn
- Git
- OpenAI API key (for AI features)
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/Saadain23/duckbase.git cd duckbase -
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.localfile in the root directory:NEXT_PUBLIC_SITE_URL=http://localhost:3000
-
Start the development server:
npm run dev
-
Open http://localhost:3000 to verify the setup
This project uses a simple two-branch strategy:
main: Production-ready codedev: Development branch for all new features and bug fixes
All contributions should be made to the dev branch.
-
Create a feature branch from
dev:git checkout dev git pull origin dev git checkout -b feature/your-feature-name
-
Make your changes:
- Write clean, readable code
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
-
Test your changes:
npm run lint npm run build
-
Commit your changes:
git add . git commit -m "feat: add new feature description"
Use conventional commit messages:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for formatting changesrefactor:for code refactoringtest:for adding testschore:for maintenance tasks
-
Push your branch:
git push origin feature/your-feature-name
-
Create a Pull Request:
- Go to the GitHub repository
- Click "New Pull Request"
- Target the
devbranch (notmain) - Fill out the PR template with:
- Description of changes
- Testing instructions
- Screenshots (if applicable)
- Related issues
-
PR Requirements:
- All tests must pass
- Code must be linted and formatted
- PR must be reviewed and approved
- No merge conflicts
-
After approval:
- Maintainers will merge your PR into
dev - Your feature will be included in the next release to
main
- Maintainers will merge your PR into
- Use TypeScript for all new code
- Follow the existing ESLint configuration
- Use meaningful variable and function names
- Add JSDoc comments for complex functions
- Use functional components with hooks
- Follow the existing component structure in
src/components/ - Use TypeScript interfaces for props
- Keep components focused and reusable
- Place components in appropriate directories under
src/components/ - Use index files for clean imports
- Follow the existing naming conventions
- Use Tailwind CSS for styling
- Follow the existing design patterns
- Keep styles responsive and accessible
Before submitting a PR, please test:
-
Core functionality:
- File upload (CSV/JSON)
- AI assistant queries
- SQL query execution
- Data visualization
-
Browser compatibility:
- Chrome/Chromium
- Firefox
- Safari
- Edge
-
Responsive design:
- Desktop
- Add JSDoc comments for public functions
- Document complex algorithms or business logic
- Keep README.md updated for new features
- Document new API endpoints
- Include request/response examples
- Update environment variable documentation
When reporting bugs, please include:
-
Environment information:
- Operating system
- Browser and version
- Node.js version
-
Steps to reproduce:
- Clear, numbered steps
- Expected vs actual behavior
- Screenshots or error messages
-
Additional context:
- Console errors
- Network tab information
- Sample data (if applicable)
For feature requests, please include:
-
Problem description:
- What problem does this solve?
- Who would benefit from this feature?
-
Proposed solution:
- How should this work?
- Any design considerations?
-
Alternatives considered:
- Other approaches you've thought about
If you have questions about contributing:
- Check existing issues and discussions
- Review the codebase and documentation
- Open a new issue with the "question" label
- Join community discussions (if available)
Contributors will be recognized in:
- CONTRIBUTORS.md file
- Release notes
- Project documentation
Thank you for contributing to Duckbase!