Thank you for considering contributing to Everato! This document provides guidelines and instructions to help you contribute effectively to this project.
- Development Environment Setup
- Code Style and Standards
- Branch Naming Conventions
- Commit Message Guidelines
- Pull Request Process
- Reporting Bugs
- Feature Requests
- Testing
- Project Structure
- Communication
💡 Tip: Keep a lookout for the project tab of the repository so that you can see the latest updates and and todos to be done and issues to be resolved about the project. Also feel free to add your own issues and todos to the project tab so that you can keep track of your work and others can see what you are working on.
Follow these steps to set up your development environment for Everato:
- Fork the repository: Create a personal copy of the Everato repository on GitHub.
- Clone your fork: Clone the repository to your local machine.
- Set up environment variables: Copy the
.env.examplefile to.envand configure it with your settings. - Install development tools: Use
make installto install necessary dependencies and tools. - Start the database: Use
make dbto start the PostgreSQL database. - Run migrations: Apply database migrations using
make migrate-up. - Run the application: Start the Everato application in development mode with
make dev. - Access the application: Open your web browser and navigate to
http://localhost:8080to see the running application.
- Go 1.24+
- PostgreSQL 15+
- Docker and Docker Compose (for development environment)
- Make (for running development commands)
- Node.js and npm/pnpm (for TailwindCSS compilation)
-
Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/everato.git cd everato -
Add the original repository as upstream:
git remote add upstream https://github.com/dtg-lucifer/everato.git
-
Set up environment variables:
cp .env.example .env # Edit .env file with your configuration -
Install development tools:
make install
-
Start the database:
make db
-
Run migrations:
make migrate-up
-
Run the application in development mode:
make dev
Everato follows strict code style guidelines to maintain code quality and consistency:
- Follow the Go Code Review Comments
- Format your code using
gofmtorgo fmt - Run
golangci-lintbefore submitting code - Document all exported functions, types, and methods
- Organize imports alphabetically with standard library imports first
- Use 4 spaces for indentation in HTML and CSS
- Format HTML templates with appropriate indentation
- Follow BEM naming conventions for CSS classes
- Use uppercase for SQL keywords
- Format queries with appropriate indentation and line breaks
- Add comments for complex queries
- Write clear, descriptive comments for complex logic
- Keep functions focused on a single responsibility
- Avoid deep nesting of control structures
- Prefer explicit error handling over implicit one
- Include appropriate logging at different severity levels
Follow these naming conventions for branches:
feature/short-description- For new featuresbugfix/issue-number-short-description- For bug fixesrefactor/component-name- For code refactoringdocs/what-changed- For documentation updatestest/what-tested- For adding or updating tests
Write clear, meaningful commit messages:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests after the first line
- Consider using the following format:
type(scope): Short description
Longer description if needed, explaining the context and motivation.
Fixes #123
Where type can be:
- feat: (new feature)
- fix: (bug fix)
- docs: (documentation changes)
- style: (formatting, missing semi-colons, etc; no code change)
- refactor: (refactoring production code)
- test: (adding missing tests, refactoring tests)
- chore: (updating build tasks, package manager configs, etc)
- Ensure your branch is up to date with the main branch
- Run all tests and ensure they pass
- Format your code according to the style guidelines
- Create a pull request with a clear title and description
- Reference any relevant issues
- Wait for code review and address any feedback
When creating a pull request, include:
- A description of the changes
- The motivation behind the changes
- Any breaking changes
- Screenshots (if applicable)
- Steps to test the changes
When reporting bugs, include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment information (OS, browser, Go version, etc.)
- Any relevant logs or screenshots
When requesting features, include:
- A clear, descriptive title
- A detailed description of the proposed feature
- The motivation behind the feature
- Any alternatives you've considered
- Example use cases
- Write tests for all new features and bug fixes
- Ensure all tests pass before submitting a pull request
- Include unit tests, integration tests, and end-to-end tests as appropriate
- Run
make testto execute the test suite
- Use table-driven tests where appropriate
- Mock external dependencies in unit tests
- Write clear test descriptions
- Test edge cases and error conditions
Everato follows a well-organized directory structure:
everato/
├── assets/ # Project assets like architecture diagrams
├── components/ # UI components for templ rendering
├── config/ # Configuration management
├── docker/ # Docker-related files for development
├── internal/ # Private application code
│ ├── db/ # Database-related code
│ ├── handlers/ # HTTP request handlers
│ ├── middlewares/ # HTTP middleware components
│ ├── services/ # Business logic
│ └── utils/ # Utility functions
├── pages/ # Page templates (templ)
├── pkg/ # Shared public libraries
├── public/ # Static assets (served directly)
├── scripts/ # Utility scripts
├── styles/ # Source CSS files (TailwindCSS)
└── templates/ # HTML templates
Follow this structure when adding new code to the project.
- Use GitHub Issues for bug reports and feature requests
- Use Pull Requests for code contributions and reviews
- Follow a respectful and inclusive communication style
- Be patient with responses and feedback
By participating in this project, you agree to abide by the following principles:
- Be respectful and inclusive
- Exercise empathy and kindness
- Be open to constructive feedback
- Focus on what's best for the community
- Show courtesy and respect in all interactions
By contributing to Everato, you agree that your contributions will be licensed under the project's license.
Thank you for contributing to Everato! Your efforts help make this project better for everyone.