4.4 KiB
4.4 KiB
Platform Project Map
Package Structure
Core Packages
packages/
illuminate/ # Laravel-compatible implementations
container/ # ✓ Complete
support/ # In Progress
http/ # Planned
routing/ # Planned
...
contracts/ # ✓ Complete
lib/src/
container/ # Container contracts
events/ # Event dispatcher contracts
http/ # HTTP contracts
pipeline/ # Pipeline contracts
queue/ # Queue contracts
...
core/ # Core functionality
lib/src/
core/ # Core components
http/ # HTTP implementation
http2/ # HTTP/2 support
Infrastructure Packages
packages/
bus/ # Command/Event bus
events/ # Event system
model/ # Data models
pipeline/ # Pipeline processing
process/ # Process management
queue/ # Queue system
route/ # Routing system
support/ # Support utilities
testing/ # Testing utilities
Package Dependencies
graph TD
A[contracts] --> B[container]
A --> C[events]
A --> D[pipeline]
A --> E[queue]
A --> F[http]
B --> G[core]
C --> G
D --> G
E --> G
Implementation Status
Core Framework
-
Container Package ✓
- Basic container
- Service providers
- Auto-wiring
- Contextual binding
- Method injection
-
Contracts Package ✓
- Container contracts
- Event contracts
- HTTP contracts
- Pipeline contracts
- Queue contracts
-
Core Package
- Base application
- HTTP kernel
- Service providers
- Configuration
- Environment handling
Infrastructure
-
Events Package
- Event dispatcher
- Event subscribers
- Event broadcasting
- Queued events
-
Pipeline Package
- Pipeline processing
- Middleware support
- Pipeline stages
- Error handling
-
Queue Package
- Queue manager
- Job dispatching
- Failed jobs
- Job batching
-
Route Package
- Route registration
- Route matching
- Route groups
- Route caching
Laravel API Compatibility
Implemented
-
Container API
// Laravel: app()->bind() container.bind<Service>((c) => ServiceImpl()); // Laravel: app()->singleton() container.singleton<Cache>((c) => RedisCache());
-
Events API
// Laravel: Event::dispatch() events.dispatch(UserCreated(user)); // Laravel: Event::listen() events.listen<UserCreated>((event) => ...);
In Progress
-
Support Package
// Laravel: Str::slug() Str.slug('Laravel Framework'); // Laravel: collect() Collection.collect(['a', 'b']);
-
HTTP Package
// Laravel: Request::input() request.input('name'); // Laravel: Response::json() response.json({'status': 'success'});
Next Steps
-
Support Package
- String helpers
- Array helpers
- Collections
- Fluent interface
-
HTTP Package
- Request handling
- Response building
- Middleware system
- Session management
-
Database Package
- Query builder
- Schema builder
- Migrations
- Model system
Development Workflow
-
Package Development
# Create new package dart create packages/illuminate/[package] # Set up package cd packages/illuminate/[package] dart pub get
-
Testing
# Run tests dart test # Check coverage dart test --coverage
-
Documentation
# Generate docs dart doc . # Serve docs dhttpd --path doc/api