Thank you for considering contributing to CodeBrewery! Whether it's reporting a bug, proposing new features, or submitting code changes, your input is highly valuable and appreciated.
This document provides guidelines on how to contribute effectively to the project.
- Code of Conduct
- Getting Started
- Setting Up the Project
- Contribution Workflow
- Commit and PR Guidelines
- Code Review Process
By participating in this project, you agree to adhere to the Code of Conduct to maintain a positive and inclusive environment for all contributors.
CodeBrewery follows a microservices architecture. Here's the high-level directory structure:
codebrewery/
frontend/ # Frontend React app (TypeScript, Vite)
backend/
api-gateway/ # Central entry point for services
user-service/ # User-related operations
code-execution-service/ # Code execution engine
k8s/ # Kubernetes manifests
docker/ # Docker configuration files
Ensure you have the following tools installed:
- Node.js (v18+) and npm
- Go (v1.21+)
- Docker and Docker Compose
- Kubernetes (Minikube or any cluster provider)
- Git
Install dependencies for the frontend/backend as specified in their respective
package.json
orgo.mod
files.
-
Clone the repository:
git clone https://github.com/your-username/codebrewery.git cd codebrewery
-
Setup Frontend:
cd frontend npm install npm run dev
-
Setup Backend Services: Each service has its own
go.mod
file andDockerfile
. Start the services using Docker Compose:cd backend docker-compose up --build
-
Verify setup: Access the frontend at
http://localhost:5173
and confirm all backend APIs are running.
- Check if the issue already exists in the GitHub Issues.
- If not, open a new issue with:
- Clear title
- Steps to reproduce
- Expected behavior
- Screenshots/logs if applicable
- Propose a feature by opening an issue under the "Feature Request" template.
- Clearly describe the use case, benefits, and possible implementation approach.
- Backend: Follow standard Go best practices.
- Frontend: Follow the Prettier and ESLint rules configured in the project.
Run formatters before submitting changes:
# For Go code
go fmt ./...
# For frontend
npm run lint --fix
- Write unit tests for new features or fixes.
- Run tests locally:
# Frontend npm run test # Backend (Go tests) go test ./...
-
Commit Messages:
-
Use concise, descriptive commits.
-
Follow conventional commit format:
<type>: <subject>
feat:
for new featuresfix:
for bug fixesdocs:
for documentation changeschore:
for refactors, cleanups, etc.
Example:
feat: add user authentication in user-service
-
-
Pull Requests:
- Fork the repository and work on a new branch.
git checkout -b feature/your-feature-name
- Ensure the code is tested and linted.
- Provide a clear PR description:
- What: Describe the changes.
- Why: Reason for the change.
- How: Implementation details.
- Link related issues.
- Fork the repository and work on a new branch.
-
Small, Focused Changes:
- PRs should be focused on solving one problem at a time.
- Once you submit a PR, the maintainers will review it.
- Address feedback promptly.
- Be respectful during code reviews — they are here to ensure quality and growth.
Feel free to join the discussion on GitHub Issues or contact maintainers.
Let's build CodeBrewery together! 🚀