Skip to content

Examples ​

Explore the comprehensive collection of Iris examples in the Official Examples Repository. These examples demonstrate best practices, common patterns, and advanced features of the framework.

Example Categories ​

1. Basic Web Development ​

  • Routing and Middleware
  • Request/Response Handling
  • Static File Serving
  • Error Management
  • Configuration
  • Template Rendering

2. MVC Architecture ​

  • Controller Implementation
  • Dependency Injection
  • View Integration
  • Model Binding
  • Form Processing
  • File Upload Handling

3. Database Integration ​

  • SQL Database Connections
  • NoSQL Database Usage
  • ORM Implementation
  • Migration Management
  • Transaction Handling
  • Connection Pooling

4. Authentication & Security ​

  • Basic Authentication
  • JWT Implementation
  • OAuth2 Integration
  • Session Management
  • User Authentication
  • Role-Based Access Control

5. API Development ​

  • RESTful API Design
  • GraphQL Implementation
  • WebSocket Integration
  • Server-Sent Events
  • gRPC Services
  • API Documentation

6. Testing & Quality ​

  • Unit Testing
  • Integration Testing
  • Performance Testing
  • Mock Implementation
  • Test Coverage
  • Benchmarking

7. Advanced Features ​

  • Caching Strategies
  • Rate Limiting
  • File Operations
  • Data Compression
  • Internationalization
  • Custom Middleware

8. Production Applications ​

  • Content Management
  • URL Shortener
  • Real-time Chat
  • File Management
  • Task Scheduling
  • Admin Dashboard

Getting Started ​

  1. Clone the repository:
bash
git clone https://github.com/kataras/iris.git
cd iris/_examples
  1. Select an example:
bash
cd basic/hello-world
  1. Run the example:
bash
go run main.go

Contributing Guidelines ​

1. Code Standards ​

  • Follow Go best practices
  • Maintain consistent style
  • Include proper documentation
  • Implement error handling
  • Write comprehensive tests

2. Submission Process ​

  • Fork the repository
  • Create feature branch
  • Add your example
  • Document functionality
  • Submit pull request

3. Example Requirements ​

  • Clear purpose and scope
  • Complete documentation
  • Error handling implementation
  • Test coverage
  • Performance considerations

4. Documentation Structure ​

  • Overview and purpose
  • Installation steps
  • Usage instructions
  • Configuration options
  • Example output

Built with excellence by Hellenic Development, delivering enterprise-grade solutions.