platform/docs/getting_started.md
2024-11-12 01:00:05 -07:00

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:

  1. Architecture & Implementation

  2. Package Documentation

  3. Development Setup

[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

  1. Documentation

  2. Development Setup

  3. Resources

[Rest of the file remains the same]