5.6 KiB
5.6 KiB
Contributing to Framework Documentation
Overview
This guide explains how to contribute to our framework documentation. We maintain comprehensive documentation covering package specifications, gap analyses, integration guides, and architectural documentation.
Documentation Structure
Core Documentation
- Getting Started Guide - Framework introduction and setup
- Laravel Compatibility Roadmap - Implementation timeline
- Foundation Integration Guide - Integration patterns
- Testing Guide - Testing approaches
- Package Integration Map - Package relationships
Core Architecture
- Core Architecture - System design and patterns
- Core Package Specification - Core implementation
Package Documentation
Each package has:
- Package Specification - Implementation details
- Gap Analysis - Laravel compatibility gaps
- Integration Guide - Package integration patterns
- Development Guidelines - Implementation standards
Contribution Guidelines
1. Documentation Standards
File Naming
- Use lowercase with underscores
- End with .md extension
- Be descriptive and specific
- Examples:
- package_specification.md
- gap_analysis.md
- integration_guide.md
File Structure
- Start with # Title
- Include Overview section
- Add Related Documentation links
- Use clear section headers
- Include code examples
- End with development guidelines
Content Requirements
- No placeholders or truncation
- Complete code examples
- Clear cross-references
- Proper markdown formatting
- Comprehensive coverage
2. Writing Style
Technical Writing
- Be clear and concise
- Use active voice
- Write in present tense
- Focus on technical accuracy
- Include practical examples
Code Examples
// Include complete, working examples
class Example {
final String name;
Example(this.name);
void demonstrate() {
print('Demonstrating: $name');
}
}
// Show usage
var example = Example('feature');
example.demonstrate();
Cross-References
- Use relative links
- Link to related docs
- Reference specific sections
- Example:
See [Container Integration](container_package_specification.md#integration) for details.
3. Documentation Types
Package Specification
- Implementation details
- API documentation
- Integration examples
- Testing guidelines
- Development workflow
Gap Analysis
- Current implementation
- Laravel features
- Missing functionality
- Implementation plan
- Priority order
Integration Guide
- Integration points
- Package dependencies
- Code examples
- Best practices
- Common patterns
4. Review Process
Before Submitting
- Check content completeness
- Verify code examples
- Test all links
- Run markdown linter
- Review formatting
Pull Request
- Clear description
- Reference related issues
- List documentation changes
- Include review checklist
- Add relevant labels
Review Checklist
- No placeholders or truncation
- Complete code examples
- Working cross-references
- Proper formatting
- Technical accuracy
5. Development Workflow
Creating Documentation
- Create feature branch
- Write documentation
- Add code examples
- Include cross-references
- Submit pull request
Updating Documentation
- Review existing content
- Make necessary changes
- Update related docs
- Verify all links
- Submit pull request
Review Process
- Technical review
- Style review
- Code example review
- Cross-reference check
- Final approval
Style Guide
1. Markdown
Headers
# Main Title
## Section Title
### Subsection Title
#### Minor Section
Lists
1. Ordered Item
2. Ordered Item
- Unordered Sub-item
- Unordered Sub-item
- Unordered Item
- Unordered Item
1. Ordered Sub-item
2. Ordered Sub-item
Code Blocks
/// Code with syntax highlighting
```dart
class Example {
void method() {
// Implementation
}
}
/// Inline code
Use var
for variable declaration.
#### Links
```markdown
[Link Text](relative/path/to/file.md)
[Link Text](relative/path/to/file.md#section)
2. Content Organization
Package Documentation
- Overview
- Core Features
- Integration Examples
- Testing
- Development Guidelines
Gap Analysis
- Overview
- Missing Features
- Implementation Gaps
- Priority Order
- Next Steps
Integration Guide
- Overview
- Integration Points
- Code Examples
- Best Practices
- Development Guidelines
3. Code Examples
Complete Examples
// Include all necessary imports
import 'package:framework/core.dart';
// Show complete implementation
class ServiceProvider {
final Container container;
ServiceProvider(this.container);
void register() {
container.singleton<Service>((c) =>
ServiceImplementation()
);
}
}
// Demonstrate usage
void main() {
var container = Container();
var provider = ServiceProvider(container);
provider.register();
}
Integration Examples
// Show real integration scenarios
class UserService {
final EventDispatcher events;
final Database db;
UserService(this.events, this.db);
Future<void> createUser(User user) async {
await events.dispatch(UserCreating(user));
await db.users.insert(user);
await events.dispatch(UserCreated(user));
}
}
Questions?
For questions or clarification:
- Review existing documentation
- Check style guide
- Ask in pull request
- Update guidelines as needed