Microservices Examples
Microservices Architecture
This example demonstrates how to document a microservices architecture with cross-service references and performance optimization for large codebases.Project Structure
opendocs.json Configuration
Cross-Service References
The billing service demonstrates how to document dependencies on other services:Performance Optimization Examples
Large Codebase with Streaming
For enterprise platforms with tens of thousands of documented items, use streaming and chunked processing:Chunked Processing
Configure projects for efficient memory usage with parallel processing:Key Features
- Service Independence: Each microservice maintains its own documentation
- Cross-References: Services can reference APIs from other services
- External Dependencies: Document integration with third-party APIs
- Performance Optimization: Streaming and chunked processing for large codebases
- Logical Grouping: Organize services by their role in the architecture
Best Practices
- Document Service Boundaries: Clearly indicate which APIs are public vs internal
- Track Dependencies: Maintain explicit references between services
- Version Carefully: Use semantic versioning and track breaking changes
- Optimize for Scale: Use JSONL and streaming for services with large APIs
- Group by Function: Organize navigation by service purpose, not technology
Performance Considerations
For large microservices architectures:- Use JSONL format for all services with 100+ documented items
- Enable streaming processing when total items exceed 10,000
- Configure chunk size based on available memory (1000 items = ~10MB)
- Use parallel processing for faster documentation generation
- Set memory limits to prevent out-of-memory errors
See Also
- Monorepo Examples - Multi-language monorepo patterns
- Performance Guide - Optimization strategies
- Examples Overview - Back to all examples
This example is part of the OpenDocs Specification RFC. Provide feedback to help improve it.

