companyos / core
CompanyOS Core Bundle - Eine modulare Plattform basierend auf DDD, CQRS und Event-Driven Architecture (Alpha Version)
Installs: 81
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Type:symfony-bundle
pkg:composer/companyos/core
Requires
- php: >=8.2
- doctrine/dbal: ^3.0
- doctrine/doctrine-bundle: ^2.15
- doctrine/orm: ^3.0
- league/oauth2-server-bundle: ^1.0
- nelmio/api-doc-bundle: ^5.3
- nyholm/psr7: ^1.8
- psr/http-factory: ^1.0
- psr/http-message: ^2.0
- psr/log: ^3.0
- symfony/config: ^7.3
- symfony/console: ^7.3
- symfony/dependency-injection: ^7.3
- symfony/framework-bundle: ^7.3
- symfony/http-foundation: ^7.3
- symfony/http-kernel: ^7.3
- symfony/mailer: ^7.3
- symfony/messenger: ^7.3
- symfony/routing: ^7.3
- symfony/security-bundle: ^7.3
- symfony/serializer: ^7.3
- symfony/twig-bundle: ^7.3
- symfony/uid: ^7.3
- symfony/validator: ^7.3
- symfony/yaml: ^7.3
Requires (Dev)
- doctrine/doctrine-fixtures-bundle: ^4.0
- phpunit/phpunit: ^10.0
- symfony/maker-bundle: ^1.63
- symfony/test-pack: ^1.0
- dev-main
- 0.1.152-alpha
- 0.1.151-alpha
- 0.1.150-alpha
- 0.1.149-alpha
- 0.1.148-alpha
- 0.1.147-alpha
- 0.1.144-alpha
- 0.1.143-alpha
- 0.1.142-alpha
- 0.1.141-alpha
- 0.1.140-alpha
- 0.1.139-alpha
- 0.1.138-alpha
- 0.1.137-alpha
- 0.1.136-alpha
- 0.1.135-alpha
- 0.1.134-alpha
- 0.1.133-alpha
- 0.1.132-alpha
- 0.1.131-alpha
- 0.1.130-alpha
- 0.1.129-alpha
- 0.1.128-alpha
- 0.1.127-alpha
- 0.1.126-alpha
- 0.1.125-alpha
- 0.1.124-alpha
- 0.1.123-alpha
- 0.1.122-alpha
- 0.1.121-alpha
- 0.1.120-alpha
- 0.1.119-alpha
- 0.1.118-alpha
- 0.1.117-alpha
- 0.1.116-alpha
- 0.1.115-alpha
- 0.1.114-alpha
- 0.1.113-alpha
- 0.1.112-alpha
- 0.1.111-alpha
- 0.1.110-alpha
- 0.1.109-alpha
- 0.1.108-alpha
- 0.1.107-alpha
- 0.1.106-alpha
- 0.1.105-alpha
- 0.1.104-alpha
- 0.1.103-alpha
- 0.1.102-alpha
- 0.1.101-alpha
- 0.1.100-alpha
- 0.1.99-alpha
- 0.1.98-alpha
- 0.1.97-alpha
- 0.1.96-alpha
- 0.1.95-alpha
- 0.1.94-alpha
- 0.1.93-alpha
- 0.1.92-alpha
- 0.1.91-alpha
- 0.1.90-alpha
- 0.1.89-alpha
- 0.1.88-alpha
- 0.1.87-alpha
- 0.1.86-alpha
- 0.1.85-alpha
- 0.1.84-alpha
- 0.1.83-alpha
- 0.1.82-alpha
- 0.1.81-alpha
- 0.1.80-alpha
- 0.1.79-alpha
- 0.1.78-alpha
- 0.1.77-alpha
- 0.1.76-alpha
- 0.1.75-alpha
- 0.1.74-alpha
- 0.1.73-alpha
- 0.1.72-alpha
- 0.1.71-alpha
- 0.1.70-alpha
- 0.1.69-alpha
- 0.1.68-alpha
- 0.1.67-alpha
- 0.1.66-alpha
- 0.1.65-alpha
- 0.1.64-alpha
- 0.1.63-alpha
- 0.1.62-alpha
- 0.1.61-alpha
- 0.1.60-alpha
- 0.1.59-alpha
- 0.1.58-alpha
- 0.1.57-alpha
- 0.1.56-alpha
- 0.1.55-alpha
- 0.1.54-alpha
- 0.1.53-alpha
- 0.1.52-alpha
- 0.1.51-alpha
- 0.1.50-alpha
- 0.1.49-alpha
- 0.1.48-alpha
- 0.1.47-alpha
- 0.1.46-alpha
- 0.1.45-alpha
- 0.1.44-alpha
- 0.1.43-alpha
- 0.1.42-alpha
- 0.1.41-alpha
- 0.1.40-alpha
- 0.1.39-alpha
- 0.1.38-alpha
- 0.1.37-alpha
- 0.1.36-alpha
- 0.1.34-alpha
- 0.1.33-alpha
- 0.1.32-alpha
- 0.1.31-alpha
- 0.1.30-alpha
- 0.1.29-alpha
- 0.1.28-alpha
- 0.1.27-alpha
- 0.1.26-alpha
- 0.1.25-alpha
- 0.1.24-alpha
- 0.1.23-alpha
- 0.1.22-alpha
- 0.1.21-alpha
- 0.1.20-alpha
- 0.1.19-alpha
- 0.1.18-alpha
- 0.1.17-alpha
- 0.1.16-alpha
- 0.1.15-alpha
- 0.1.14-alpha
- 0.1.13-alpha
- 0.1.12-alpha
- 0.1.11-alpha
- 0.1.10-alpha
- 0.1.9-alpha
- 0.1.8-alpha
- 0.1.7-alpha
- 0.1.6-alpha
- 0.1.5-alpha
- 0.1.4-alpha
- 0.1.3-alpha
- 0.1.2-alpha
- 0.1.0-alpha
This package is auto-updated.
Last update: 2025-09-30 18:24:08 UTC
README
Ein vollständiges Symfony-Bundle für das CompanyOS-System mit Plugin-Architektur, Authentifizierung, Benutzerverwaltung und API-First-Design.
⚠️ Alpha Version
**Dies ist eine Alpha-Version (0.1.152-alpha
Was funktioniert:
- ✅ Grundlegende Bundle-Struktur (DDD-Layer)
- ✅ Service-Konfiguration
- ✅ Doctrine-Mappings
- ✅ Routing-Grundstruktur
- ✅ Plugin-System-Architektur
- ✅ API-First-Design
Was noch fehlt:
- ❌ Vollständige Controller-Implementierung
- ❌ Unit/Integration Tests
- ❌ Datenbank-Migrationen
- ❌ Vollständige Dokumentation
- ❌ Code Coverage
Architektur
Das CoreBundle folgt einer API-First-Architektur:
- Reine API: Keine UI, keine Assets, keine Templates
- Business-Logik: Domain-Logik, Application-Layer, Infrastructure
- Plugin-Framework: Event- und Service-Extension für Core und API
- Modular: Kann unabhängig vom BackendBundle verwendet werden
Features
- Plugin-System: Dynamisches Laden und Verwalten von Plugins
- OAuth2-Authentifizierung: Vollständige OAuth2-Implementierung mit Password Grant
- Benutzerverwaltung: CRUD-Operationen für Benutzer
- Rollen- und Berechtigungssystem: Flexible Zugriffskontrolle
- Webhook-System: Event-basierte Webhook-Integration
- Event-Driven Architecture: Domain Events und Event Store
- API-First: Alle Funktionen über REST-API verfügbar
Installation
⚠️ Nur für Entwickler und Tester
composer require companyos/core:^0.1.152-alpha
Bundle registrieren
// config/bundles.php return [ // ... andere Bundles CompanyOS\CompanyOSCoreBundle::class => ['all' => true], ];
Konfiguration
# config/packages/companyos_core.yaml companyos_core: plugin: directories: 'custom/plugins,custom/static-plugins' auth: oauth2: enabled: true client_id: 'your-client-id' client_secret: 'your-client-secret'
Plugin-System
Das Plugin-System funktioniert vollständig über Services und erfordert keine Kernel-Erweiterung:
- Automatisches Plugin-Loading: Plugins werden beim Bundle-Boot geladen
- Service-basierte Architektur: Alle Plugin-Funktionen über Services
- Dynamische Routen: Plugin-Routen werden automatisch registriert
- Service-Discovery: Plugin-Services werden automatisch geladen
Plugin erstellen
<?php namespace MyPlugin; use CompanyOS\Bundle\CoreBundle\Domain\Plugin\Domain\AbstractPlugin; class MyPlugin extends AbstractPlugin { public function getPluginName(): string { return 'my-plugin'; } public function getVersion(): string { return '0.1.152-alpha } public function getAuthor(): string { return 'Your Name'; } public function getRoutes(): array { return [ 'my_plugin_route' => '/my-route' ]; } }
Plugin-Konfiguration
{ "name": "my/plugin", "type": "companyos-plugin", "autoload": { "psr-4": { "MyPlugin\\": "src/" } }, "extra": { "companyos-plugin": { "plugin-class": "MyPlugin\\MyPlugin" } } }
API-Endpunkte
Authentifizierung
POST /api/auth/login
- Benutzer-LoginPOST /api/auth/refresh
- Token erneuernPOST /api/auth/logout
- LogoutGET /api/auth/profile
- Benutzer-Profil
Benutzerverwaltung
GET /api/users
- Benutzer auflistenPOST /api/users
- Benutzer erstellenGET /api/users/{id}
- Benutzer abrufenPUT /api/users/{id}
- Benutzer aktualisierenDELETE /api/users/{id}
- Benutzer löschen
Plugin-Verwaltung
GET /api/plugins
- Plugins auflistenPOST /api/plugins/{name}/install
- Plugin installierenPOST /api/plugins/{id}/activate
- Plugin aktivierenPOST /api/plugins/{id}/deactivate
- Plugin deaktivierenDELETE /api/plugins/{id}
- Plugin löschen
Konfiguration
Plugin-Verzeichnisse
parameters: companyos.plugin.directories: 'custom/plugins,custom/static-plugins'
OAuth2-Konfiguration
companyos_core: auth: oauth2: enabled: true access_token_ttl: 3600 refresh_token_ttl: 1209600
Webhook-Konfiguration
companyos_core: webhook: enabled: true max_retries: 3 timeout: 30
Entwicklung
Bundle-Struktur
CompanyOSCoreBundle/
├── Domain/ # Domain-Logik (Entities, Value Objects, Events)
│ ├── Auth/Domain/
│ ├── User/Domain/
│ ├── Role/Domain/
│ ├── Plugin/Domain/
│ ├── Webhook/Domain/
│ ├── Settings/Domain/
│ └── Shared/Domain/
├── Application/ # Use Cases, Commands, Queries, DTOs
│ ├── Auth/
│ ├── User/
│ ├── Role/
│ ├── Plugin/
│ ├── Webhook/
│ ├── Settings/
│ └── Shared/
├── Infrastructure/ # Persistence, Eventing, Services
│ ├── Auth/
│ ├── User/
│ ├── Role/
│ ├── Plugin/
│ ├── Webhook/
│ ├── Settings/
│ └── Shared/
├── DependencyInjection/
├── Resources/
└── ...
Tests
# Unit Tests (noch nicht implementiert) vendor/bin/phpunit # Frontend Tests (noch nicht implementiert) npm test
Kernel-Integration
Das Bundle erweitert nicht den Symfony-Kernel. Die Plugin-Funktionalität wird vollständig über Services bereitgestellt. Siehe KERNEL_INTEGRATION.md für Details.
Roadmap
Version 0.1.152-alpha
- Vollständige Controller-Implementierung
- Basis-Tests (Unit/Integration)
- Datenbank-Migrationen
- Verbesserte Dokumentation
Version 0.1.152-alpha
- Vollständige API-Implementierung
- Frontend-Assets
- Code Coverage > 80%
- CI/CD Pipeline
Version 0.1.152-alpha
- Production-ready
- Vollständige Tests
- Vollständige Dokumentation
- Performance-Optimierungen
Third-Party-Lizenzen
Dieses Bundle verwendet verschiedene Open-Source-Bibliotheken und Frameworks. Hier sind die wichtigsten Dependencies und deren Lizenzen:
Backend Dependencies
- Symfony Framework (MIT) - PHP Web Framework
- Doctrine ORM (MIT) - Object-Relational Mapping
- League OAuth2 Server (MIT) - OAuth2 Server Implementation
- Nelmio API Doc Bundle (MIT) - API Documentation Generator
- PHPUnit (BSD-3-Clause) - Testing Framework
Frontend Dependencies
- Vue.js (MIT) - Progressive JavaScript Framework
- CoreUI (MIT) - Bootstrap-based Admin Template
- Bootstrap (MIT) - CSS Framework
- Webpack Encore (MIT) - Asset Management
Vollständige Dependency-Liste
Für eine vollständige Liste aller verwendeten Pakete und deren Lizenzen siehe:
composer.json
für PHP-Dependenciespackage.json
für JavaScript-Dependencies
Alle verwendeten Pakete sind Open-Source und unter permissiven Lizenzen (hauptsächlich MIT) verfügbar.
Lizenz
MIT License - siehe LICENSE Datei.
Support
Bei Fragen oder Problemen erstellen Sie ein Issue im Repository oder kontaktieren Sie das Entwicklungsteam.
Contributing
- Fork das Repository
- Erstelle einen Feature-Branch (
git checkout -b feature/amazing-feature
) - Committe deine Änderungen (
git commit -m 'Add some amazing feature'
) - Push zum Branch (
git push origin feature/amazing-feature
) - Öffne einen Pull Request
Doctrine-Integration
Das Bundle stellt automatisch alle Core-Entities für Doctrine bereit. Um die Entities in die Datenbank zu schreiben:
1. Doctrine-Konfiguration im Hauptprojekt
Füge folgende Konfiguration in dein config/packages/doctrine.yaml
hinzu:
doctrine: dbal: types: uuid: CompanyOS\Bundle\CoreBundle\Infrastructure\Persistence\Doctrine\UuidType email: CompanyOS\Bundle\CoreBundle\Infrastructure\Persistence\Doctrine\EmailType orm: mappings: CompanyOSCore: type: attribute is_bundle: false dir: '%kernel.project_dir%/vendor/companyos/core/src/Domain' prefix: 'CompanyOS\Bundle\CoreBundle\Domain' alias: CompanyOS CompanyOSUser: type: attribute is_bundle: false dir: '%kernel.project_dir%/vendor/companyos/core/src/Domain/User/Domain/Entity' prefix: 'CompanyOS\Bundle\CoreBundle\Domain\User\Domain\Entity' alias: CompanyOSUser CompanyOSAuth: type: attribute is_bundle: false dir: '%kernel.project_dir%/vendor/companyos/core/src/Domain/Auth/Domain/Entity' prefix: 'CompanyOS\Bundle\CoreBundle\Domain\Auth\Domain\Entity' alias: CompanyOSAuth CompanyOSRole: type: attribute is_bundle: false dir: '%kernel.project_dir%/vendor/companyos/core/src/Domain/Role/Domain/Entity' prefix: 'CompanyOS\Bundle\CoreBundle\Domain\Role\Domain\Entity' alias: CompanyOSRole CompanyOSPlugin: type: attribute is_bundle: false dir: '%kernel.project_dir%/vendor/companyos/core/src/Domain/Plugin/Domain/Entity' prefix: 'CompanyOS\Bundle\CoreBundle\Domain\Plugin\Domain\Entity' alias: CompanyOSPlugin CompanyOSWebhook: type: attribute is_bundle: false dir: '%kernel.project_dir%/vendor/companyos/core/src/Domain/Webhook/Domain/Entity' prefix: 'CompanyOS\Bundle\CoreBundle\Domain\Webhook\Domain\Entity' alias: CompanyOSWebhook CompanyOSSettings: type: attribute is_bundle: false dir: '%kernel.project_dir%/vendor/companyos/core/src/Domain/Settings/Domain/Entity' prefix: 'CompanyOS\Bundle\CoreBundle\Domain\Settings\Domain\Entity' alias: CompanyOSSettings CompanyOSEvent: type: attribute is_bundle: false dir: '%kernel.project_dir%/vendor/companyos/core/src/Domain/Event' prefix: 'CompanyOS\Bundle\CoreBundle\Domain\Event' alias: CompanyOSEvent
2. Datenbank-Schema erstellen
# Schema erstellen bin/console doctrine:schema:create # Oder Schema aktualisieren bin/console doctrine:schema:update --force # Oder Migrationen generieren bin/console doctrine:migrations:diff bin/console doctrine:migrations:migrate
Verfügbare Entities
Das Bundle stellt folgende Entities bereit:
- User: Benutzer-Verwaltung (
users
Tabelle) - Role: Rollen-Verwaltung (
roles
Tabelle) - UserRole: Benutzer-Rollen-Zuordnung (
user_roles
Tabelle) - Client: OAuth2-Clients (
oauth_clients
Tabelle) - AccessToken: OAuth2-Access-Tokens (
oauth_access_tokens
Tabelle) - RefreshToken: OAuth2-Refresh-Tokens (
oauth_refresh_tokens
Tabelle) - Plugin: Plugin-Verwaltung (
plugins
Tabelle) - Webhook: Webhook-Verwaltung (
webhooks
Tabelle) - CompanySettings: Unternehmens-Einstellungen (
company_settings
Tabelle) - StoredEvent: Event Store (
stored_events
Tabelle)