Project Structure
This document provides detailed information about each directory in the OpenZeppelin Relayer project.
Source Code Organization
src/
Directory
The main source code directory contains the core implementation files organized into several modules:
-
api/
: Route and controllers logic-
Manages HTTP routing and delegates incoming requests to controllers
-
-
bootstrap/
: Service initialization-
Bootstraps and initializes application services
-
-
config/
: Configuration management-
Handles system configuration and environment settings
-
-
constants/
: Global constants-
Provides static values used across the application
-
-
domain/
: Business domain logic-
Encapsulates core business rules and domain-specific functionality
-
-
jobs/
: Asynchronous job processing-
Manages background task queueing and execution
-
-
logging/
: Logging and file rotation-
Implements logging functionalities and log file management
-
-
metrics/
: Metrics collection-
Collects and reports application performance and usage metrics
-
-
models/
: Core data models and types-
Defines data structures and type definitions for the system
-
-
repositories/
: Configuration storage-
Provides interfaces for storing and retrieving configuration data
-
-
services/
: Business service logic-
Implements core business functionalities and service operations
-
-
utils/
: Utility functions-
Offers helper functions and common utilities for the application
-
Documentation
Examples
examples/
Directory
Provides practical examples and sample configurations to help users get started:
-
Demonstrates typical service configurations for various environments
-
Acts as a quick-start guide for customizing and deploying the relayer
-
Serves as a reference for best practices in configuration and deployment
Docker Support
The project includes Docker configurations for different environments:
-
Dockerfile.development
: Development container setup -
Dockerfile.production
: Production-ready container
For detailed information about running the relayers in containers, see the Docker deployment section in the main documentation. |