# 🤝 Contributing to Czech Clubs Logos API Thank you for considering contributing to this project! This document provides guidelines and instructions for contributing. ## 📋 Table of Contents - [Code of Conduct](#code-of-conduct) - [Getting Started](#getting-started) - [Development Workflow](#development-workflow) - [Coding Standards](#coding-standards) - [Commit Guidelines](#commit-guidelines) - [Pull Request Process](#pull-request-process) ## 📜 Code of Conduct - Be respectful and inclusive - Welcome newcomers and help them learn - Focus on constructive feedback - Maintain professional communication ## 🚀 Getting Started ### 1. Fork the Repository Click the "Fork" button on GitHub to create your own copy. ### 2. Clone Your Fork ```bash git clone https://github.com/YOUR_USERNAME/ClubLogos.git cd ClubLogos ``` ### 3. Add Upstream Remote ```bash git remote add upstream https://github.com/ORIGINAL_OWNER/ClubLogos.git ``` ### 4. Install Dependencies ```bash # Backend cd backend go mod download # Frontend cd ../frontend npm install ``` ### 5. Create a Branch ```bash git checkout -b feature/your-feature-name # or git checkout -b fix/your-fix-name ``` ## 💻 Development Workflow ### Running Locally ```bash # Option 1: Docker Compose (recommended) docker-compose up # Option 2: Manual # Terminal 1 - Backend cd backend go run . # Terminal 2 - Frontend cd frontend npm run dev ``` ### Making Changes 1. **Backend changes:** Edit files in `backend/` 2. **Frontend changes:** Edit files in `frontend/` 3. **Documentation:** Edit `.md` files ### Testing Your Changes ```bash # Backend tests cd backend go test ./... # Frontend build test cd frontend npm run build ``` ## 📏 Coding Standards ### Go (Backend) - Follow [Effective Go](https://golang.org/doc/effective_go) - Use `gofmt` for formatting - Use meaningful variable names - Add comments for exported functions - Handle errors properly **Example:** ```go // GetClub retrieves a club by its UUID from the FAČR API func (c *FACRClient) GetClub(id string) (*Club, error) { if id == "" { return nil, fmt.Errorf("club ID is required") } // Implementation... } ``` ### JavaScript (Frontend) - Use ES6+ features - Use `const` by default, `let` when reassignment needed - Use async/await for asynchronous operations - Add JSDoc comments for functions - Keep functions small and focused **Example:** ```javascript /** * Search for clubs by name * @param {string} query - Search query * @returns {Promise} Array of club objects */ async function searchClubs(query) { const response = await fetch(`${API_BASE_URL}/clubs/search?q=${query}`) return await response.json() } ``` ### CSS - Use Tailwind utility classes - Add custom CSS only when necessary - Follow BEM naming for custom classes - Keep styles modular and reusable ### General - Write self-documenting code - Add comments for complex logic - Keep functions under 50 lines - Use descriptive names - Avoid magic numbers ## 📝 Commit Guidelines ### Commit Message Format ``` ():