Contribution Guidelines¶
Welcome! This guide provides all the details you need to contribute effectively to the project. Thank you for helping us make codinit.dev a better tool for developers worldwide. ๐ก
๐ Table of Contents¶
- Code of Conduct
- How Can I Contribute?
- Pull Request Guidelines
- Coding Standards
- Development Setup
- Testing
- Deployment
- Docker Deployment
- VS Code Dev Containers Integration
๐ก๏ธ Code of Conduct¶
This project is governed by our Code of Conduct. By participating, you agree to uphold this code. Report unacceptable behavior to the project maintainers.
๐ ๏ธ How Can I Contribute?¶
1๏ธโฃ Reporting Bugs or Feature Requests¶
- Check the issue tracker to avoid duplicates.
- Use issue templates (if available).
- Provide detailed, relevant information and steps to reproduce bugs.
2๏ธโฃ Code Contributions¶
- Fork the repository.
- Create a feature or fix branch.
- Write and test your code.
- Submit a pull request (PR).
3๏ธโฃ Join as a Core Contributor¶
Interested in maintaining and growing the project? Fill out our Contributor Application Form.
โ Pull Request Guidelines¶
PR Checklist¶
- Branch from the main branch.
- Update documentation, if needed.
- Test all functionality manually.
- Focus on one feature/bug per PR.
Review Process¶
- Manual testing by reviewers.
- At least one maintainer review required.
- Address review comments.
- Maintain a clean commit history.
๐ Coding Standards¶
General Guidelines¶
- Follow existing code style.
- Comment complex logic.
- Keep functions small and focused.
- Use meaningful variable names.
๐ฅ๏ธ Development Setup¶
1๏ธโฃ Initial Setup¶
- Clone the repository:
- Install dependencies:
- Set up environment variables:
- Rename
.env.exampleto.env.local. - Add your API keys for providers you want to use:
- For Docker users: Run the setup script or manually copy
.env.localto.env: Docker Compose requires.envfor variable substitution. - Optionally set:
- Debug level:
VITE_LOG_LEVEL=debug - Context size:
DEFAULT_NUM_CTX=32768 - Local provider base URLs (Ollama, LM Studio): Use
127.0.0.1instead oflocalhost
- Debug level:
Note: Never commit your .env.local or .env files to version control. They're already in .gitignore.
2๏ธโฃ Run Development Server¶
Tip: Use Google Chrome Canary for local testing.
๐งช Testing¶
Run the test suite with:
๐ Deployment¶
Deploy to Cloudflare Pages¶
Ensure you have required permissions and that Wrangler is configured.
๐ณ Docker Deployment¶
This section outlines the methods for deploying the application using Docker. The processes for Development and Production are provided separately for clarity.
๐งโ๐ป Development Environment¶
Build Options¶
Option 1: Helper Scripts
Option 2: Direct Docker Build Command
Option 3: Docker Compose Profile
Running the Development Container¶
๐ญ Production Environment¶
Build Options¶
Option 1: Helper Scripts
Option 2: Direct Docker Build Command
Option 3: Docker Compose Profile
Running the Production Container¶
Coolify Deployment¶
For an easy deployment process, use Coolify:
- Import your Git repository into Coolify.
- Choose Docker Compose as the build pack.
- Configure environment variables (e.g., API keys).
- Set the start command:
๐ ๏ธ VS Code Dev Containers Integration¶
The docker-compose.yaml configuration is compatible with VS Code Dev Containers, making it easy to set up a development environment directly in Visual Studio Code.
Steps to Use Dev Containers¶
- Open the command palette in VS Code (
Ctrl+Shift+PorCmd+Shift+Pon macOS). - Select Dev Containers: Reopen in Container.
- Choose the development profile when prompted.
- VS Code will rebuild the container and open it with the pre-configured environment.
๐ Environment Variables¶
Ensure .env.local is configured correctly with:
- API keys.
- Context-specific configurations.
Example for the DEFAULT_NUM_CTX variable: