4.5 KiB
4.5 KiB
Getting Started Guide
Overview
This guide helps developers get started with implementing and contributing to the framework's foundation packages. It provides step-by-step instructions for setting up the development environment, understanding the codebase, and making contributions.
Key Documentation
Before starting, familiarize yourself with our core documentation:
-
Architecture & Implementation
- Laravel Compatibility Roadmap - Overall implementation status and plans
- Foundation Integration Guide - How packages work together
- Testing Guide - Testing approaches and standards
-
Package Documentation
- Container Package - Dependency injection system
- Container Gap Analysis - Implementation status and plans
- More package docs coming soon...
-
Development Setup
- Melos Configuration - Build and development tools
[Previous content remains the same until Project Structure section, then update with:]
Project Structure
1. Package Organization
platform/
├── packages/
│ ├── container/ # Dependency injection
│ │ ├── container/ # Core container
│ │ └── container_generator/ # Code generation
│ ├── core/ # Framework core
│ ├── events/ # Event system
│ ├── model/ # Model system
│ ├── pipeline/ # Pipeline pattern
│ ├── process/ # Process management
│ ├── queue/ # Queue system
│ ├── route/ # Routing system
│ ├── support/ # Utilities
│ └── testing/ # Testing utilities
├── apps/ # Example applications
├── config/ # Configuration files
├── docs/ # Documentation
├── examples/ # Usage examples
├── resources/ # Additional resources
├── scripts/ # Development scripts
├── templates/ # Project templates
└── tests/ # Integration tests
2. Package Structure
package/
├── lib/
│ ├── src/
│ │ ├── core/ # Core implementation
│ │ ├── contracts/ # Package interfaces
│ │ └── support/ # Package utilities
│ └── package.dart # Public API
├── test/
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── performance/ # Performance tests
├── example/ # Usage examples
└── README.md # Package documentation
[Previous content remains the same until Implementation Guidelines section, then update with:]
Implementation Guidelines
1. Laravel Compatibility
// Follow Laravel patterns where possible
class ServiceProvider {
void register() {
// Register services like Laravel
container.singleton<Service>((c) => ServiceImpl());
// Use contextual binding
container.when(PhotoController)
.needs<Storage>()
.give(LocalStorage());
// Use tagged bindings
container.tag([
EmailNotifier,
SmsNotifier
], 'notifications');
}
}
2. Testing Approach
// Follow Laravel testing patterns
void main() {
group('Feature Tests', () {
late TestCase test;
setUp(() {
test = await TestCase.make();
});
test('user can register', () async {
await test
.post('/register', {
'name': 'John Doe',
'email': 'john@example.com',
'password': 'password'
})
.assertStatus(302)
.assertRedirect('/home');
});
});
}
[Previous content remains the same until Getting Help section, then update with:]
Getting Help
-
Documentation
- Start with Laravel Compatibility Roadmap
- Review Foundation Integration Guide
- Check Testing Guide
- Read package-specific documentation
-
Development Setup
- Follow Melos Configuration
- Setup development environment
- Run example applications
-
Resources
[Rest of the file remains the same]