Contributing

Thank you for your interest in contributing to Azu! This guide will help you get started with development, understand our code standards, and contribute effectively.

Overview

Contributing to Azu involves:

  • Setting up the development environment

  • Understanding the codebase architecture

  • Following coding standards and conventions

  • Writing tests for new features

  • Submitting pull requests and reviews

Development Setup

Prerequisites

  • Crystal Language (1.2.x or later)

  • Git for version control

  • PostgreSQL for database testing

  • Redis for session and cache testing

Quick Setup

  1. Clone the Repository

  2. Install Dependencies

  3. Setup Database

  4. Run Tests

  5. Start Development Server

Learn more about Development Setup →

Project Architecture

Key Components

1. Core Framework (src/azu/)

  • Main framework modules and classes

  • HTTP request/response handling

  • Routing and middleware system

  • Configuration management

2. Handlers (src/azu/handler/)

  • HTTP middleware handlers

  • Authentication and authorization

  • Logging and error handling

  • Static file serving

3. Templates (src/azu/templates/)

  • Template engine integration

  • Markup DSL implementation

  • Hot reloading system

  • Error page templates

4. Playground (playground/)

  • Example applications

  • Endpoint demonstrations

  • WebSocket examples

  • Template examples

Code Standards

1. Crystal Language Standards

Naming Conventions

Type Safety

Error Handling

2. Framework-Specific Standards

Endpoint Structure

Request Contracts

Response Objects

Learn more about Code Standards →

Development Workflow

1. Feature Development

Create Feature Branch

Write Tests

Update Documentation

2. Pull Request Process

Create Pull Request

  1. Fork the repository

  2. Create feature branch

  3. Make changes with tests

  4. Update documentation

  5. Submit pull request

Pull Request Template

3. Code Review Process

Review Checklist

Review Comments

Testing Guidelines

1. Test Organization

Directory Structure

Test Naming

2. Test Coverage

Required Coverage

  • Unit tests for all public APIs

  • Integration tests for endpoint flows

  • WebSocket tests for real-time features

  • Error handling tests for edge cases

Coverage Goals

  • Line coverage: 90%+

  • Branch coverage: 85%+

  • Function coverage: 95%+

3. Test Data Management

Factories

Test Helpers

Documentation Standards

1. Documentation Structure

File Organization

Content Standards

  • Clear headings with logical hierarchy

  • Code examples for all features

  • Mermaid diagrams for complex concepts

  • Cross-references between related topics

2. Code Examples

Crystal Code Blocks

Interactive Examples

Release Process

1. Version Management

Semantic Versioning

  • Major (X.0.0): Breaking changes

  • Minor (0.X.0): New features, backward compatible

  • Patch (0.0.X): Bug fixes, backward compatible

Release Checklist

2. Release Steps

Prepare Release

Create Release

Community Guidelines

1. Communication

Code of Conduct

  • Be respectful and inclusive

  • Provide constructive feedback

  • Help others learn and grow

  • Follow project guidelines

Communication Channels

  • GitHub Issues: Bug reports and feature requests

  • GitHub Discussions: Questions and general discussion

  • Discord: Real-time chat and support

2. Getting Help

Before Asking

  • Search existing issues and discussions

  • Read documentation thoroughly

  • Try to reproduce the issue

  • Prepare minimal reproduction case

Asking Questions

Next Steps

Examples

Check out the playground examples for complete working examples of:

  • Endpoint implementations

  • WebSocket channels

  • Template usage

  • Testing patterns


Ready to contribute? Start with Development Setup to get your environment ready, then explore Code Standards to understand our conventions.

Last updated

Was this helpful?