diff --git a/packages/core/README.md b/packages/core/README.md
index 9d1ab8b..56ea484 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -1,86 +1,32 @@
-# Protevus Framework
+# Protevus Platform Core
-[![Protevus Framework](../../angel3_logo.png)](https://github.com/dart-backend/angel)
+
-![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_framework?include_prereleases)
+[![Pub Version (including pre-releases)](https://img.shields.io/pub/v/protevus_core?include_prereleases)](https://pub.dev/packages/protevus_core)
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
-[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
-[![License](https://img.shields.io/github/license/dart-backend/angel)](https://github.com/dart-backend/angel/tree/master/packages/framework/LICENSE)
-[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos)
+[![License](https://img.shields.io/github/license/protevus/platform)](https://github.com/protevus/platform/blob/main/packages/core/LICENSE)
-Protevus framework is a high-powered HTTP server with support for dependency injection, sophisticated routing, authentication, ORM, graphql etc. It is designed to keep the core minimal but extensible through a series of plugin packages. It won't dictate which features, databases or web templating engine to use. This flexibility enable Protevus framework to grow with your application as new features can be added to handle the new use cases.
+Protevus Platform Core is a high-powered HTTP server framework for Dart, designed to be minimal yet extensible. It provides a robust foundation for building scalable and flexible web applications.
-This package is the core package of [Protevus](https://github.com/dart-backend/angel). For more information, visit us at [Protevus Website](https://angel3-framework.web.app).
+## Features
-## Installation and Setup
+- Dependency injection
+- Sophisticated routing
+- Authentication support
+- ORM integration
+- GraphQL support
+- Extensible plugin architecture
+- HTTP/2 support
+- WebSocket capabilities
+- File handling and MIME type detection
+- Environment configuration management
+- Performance optimization with caching mechanisms
-### (Option 1) Create a new project by cloning from boilerplate templates
+## Installation
-1. Download and install [Dart](https://dart.dev/get-dart)
+Add `protevus_core` to your `pubspec.yaml`:
-2. Clone one of the following starter projects:
- * [Protevus Basic Template](https://github.com/dukefirehawk/boilerplates/tree/v7/angel3-basic)
- * [Protevus ORM Template](https://github.com/dukefirehawk/boilerplates/tree/v7/angel3-orm)
- * [Protevus ORM MySQL Template](https://github.com/dukefirehawk/boilerplates/tree/v7/angel3-orm-mysql)
- * [Protevus Graphql Template](https://github.com/dukefirehawk/boilerplates/tree/v7/angel3-graphql)
-
-3. Run the project in development mode (*hot-reloaded* is enabled on file changes).
-
- ```bash
- dart --observe bin/dev.dart
- ```
-
-4. Run the project in production mode (*hot-reloaded* is disabled).
-
- ```bash
- dart bin/prod.dart
- ```
-
-5. Run as docker. Edit and build the image with the provided `Dockerfile` file.
-
-### (Option 2) Create a new project with Protevus CLI
-
-1. Download and install [Dart](https://dart.dev/get-dart)
-
-2. Install the [Protevus CLI](https://pub.dev/packages/angel3_cli):
-
- ```bash
- dart pub global activate angel3_cli
- ```
-
-3. On terminal, create a new project:
-
- ```bash
- angel3 init hello
- ```
-
-4. Run the project in development mode (*hot-reloaded* is enabled on file changes).
-
- ```bash
- dart --observe bin/dev.dart
- ```
-
-5. Run the project in production mode (*hot-reloaded* is disabled).
-
- ```bash
- dart bin/prod.dart
- ```
-
-6. Run as docker. Edit and build the image with the provided `Dockerfile` file.
-
-## Performance Benchmark
-
-The performance benchmark can be found at
-
-[TechEmpower Framework Benchmarks Round 21](https://www.techempower.com/benchmarks/#section=data-r21&test=composite)
-
-### Migrating from Angel to Protevus
-
-Check out [Migrating to Protevus](https://angel3-docs.dukefirehawk.com/migration/angel-2.x.x-to-angel3/migration-guide-3)
-
-## Donation & Support
-
-If you like this project and interested in supporting its development, you can make a donation using the following services:
-
-* [![GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/dukefirehawk)
-* [paypal](https://paypal.me/dukefirehawk?country.x=MY&locale.x=en_US) service
+```yaml
+dependencies:
+ protevus_core: ^latest_version
+```
\ No newline at end of file
diff --git a/packages/core/lib/providers.dart b/packages/core/lib/providers.dart
new file mode 100644
index 0000000..20f5669
--- /dev/null
+++ b/packages/core/lib/providers.dart
@@ -0,0 +1,3 @@
+export 'src/provider/platform_with_providers.dart';
+export 'src/provider/service_provider.dart';
+export 'src/provider/service_provider_config.dart';
diff --git a/packages/core/lib/src/provider/platform_with_providers.dart b/packages/core/lib/src/provider/platform_with_providers.dart
new file mode 100644
index 0000000..0de8957
--- /dev/null
+++ b/packages/core/lib/src/provider/platform_with_providers.dart
@@ -0,0 +1,93 @@
+import 'package:platform_core/core.dart';
+import 'package:platform_container/container.dart';
+import 'package:platform_container/mirrors.dart';
+import 'package:logging/logging.dart';
+import 'service_provider.dart';
+import 'service_provider_manager.dart';
+import 'service_provider_config.dart';
+import 'provider_discovery.dart';
+
+class PlatformWithProviders {
+ final Application app;
+ late ServiceProviderManager _serviceProviderManager;
+ late ProviderDiscovery _discovery;
+ late Container container;
+
+ PlatformWithProviders(this.app,
+ {ServiceProviderManager? serviceProviderManager}) {
+ container = Container(MirrorsReflector());
+ app.configure(configureContainer);
+
+ _serviceProviderManager =
+ serviceProviderManager ?? ServiceProviderManager(app, _discovery);
+ }
+
+ Future configureContainer(Application app) async {
+ // Register the container itself
+ container.registerSingleton((c) => container);
+
+ // Configure the container here
+ // For example, you might want to register some services:
+ // container.registerSingleton((c) => SomeService());
+
+ // You might need to set up dependency injection for routes here
+ // app.use((req, res) => container.make().handleRequest(req, res));
+ }
+
+ Future registerProvidersFromConfig(ServiceProviderConfig config) async {
+ for (var providerType in config.providers) {
+ var provider = _discovery.createInstance(providerType);
+ if (provider != null) {
+ if (config.deferredProviders.containsKey(providerType)) {
+ provider.setDeferred(config.deferredProviders[providerType]!);
+ }
+ if (config.providerConfigs.containsKey(providerType)) {
+ provider.configure(config.providerConfigs[providerType]!);
+ }
+ await _serviceProviderManager.register(provider);
+ }
+ }
+ }
+
+ Future registerServiceProvider(ServiceProvider provider) async {
+ await _serviceProviderManager.register(provider);
+ }
+
+ void unregisterServiceProvider(Type providerType) {
+ _serviceProviderManager.unregister(providerType);
+ }
+
+ T? getServiceProvider() {
+ return _serviceProviderManager.getProvider();
+ }
+
+ Future bootServiceProviders() async {
+ await _serviceProviderManager.bootAll();
+ }
+
+ Future bootDeferredServiceProvider(Type providerType) async {
+ await _serviceProviderManager.bootDeferredProvider(providerType);
+ }
+
+ void setServiceProviderLogLevel(Level level) {
+ _serviceProviderManager.setLogLevel(level);
+ }
+
+ Future discoverServiceProviders() async {
+ await _serviceProviderManager.discoverProviders();
+ }
+
+ void registerProviderType(Type type, ServiceProvider Function() factory) {
+ if (_discovery is ManualProviderDiscovery) {
+ (_discovery as ManualProviderDiscovery)
+ .registerProviderType(type, factory);
+ } else {
+ throw UnsupportedError(
+ 'Provider type registration is only supported with ManualProviderDiscovery');
+ }
+ }
+
+ T? getService() {
+ return app.container.make();
+ }
+}
diff --git a/packages/core/lib/src/provider/provider_discovery.dart b/packages/core/lib/src/provider/provider_discovery.dart
new file mode 100644
index 0000000..41eb41e
--- /dev/null
+++ b/packages/core/lib/src/provider/provider_discovery.dart
@@ -0,0 +1,54 @@
+import 'dart:mirrors' as mirrors;
+import 'service_provider.dart';
+
+abstract class ProviderDiscovery {
+ List discoverProviders();
+ ServiceProvider? createInstance(Type type);
+}
+
+class MirrorProviderDiscovery implements ProviderDiscovery {
+ @override
+ List discoverProviders() {
+ var providers = [];
+ mirrors.currentMirrorSystem().libraries.values.forEach((lib) {
+ for (var declaration in lib.declarations.values) {
+ if (declaration is mirrors.ClassMirror &&
+ declaration.isSubclassOf(mirrors.reflectClass(ServiceProvider)) &&
+ !declaration.isAbstract) {
+ providers.add(declaration.reflectedType);
+ }
+ }
+ });
+ return providers;
+ }
+
+ @override
+ ServiceProvider? createInstance(Type type) {
+ var classMirror = mirrors.reflectClass(type);
+ if (classMirror.declarations.containsKey(const Symbol(''))) {
+ var ctor =
+ classMirror.declarations[const Symbol('')] as mirrors.MethodMirror?;
+ if (ctor != null && ctor.isConstructor && ctor.parameters.isEmpty) {
+ return classMirror.newInstance(const Symbol(''), []).reflectee
+ as ServiceProvider;
+ }
+ }
+ return null;
+ }
+}
+
+class ManualProviderDiscovery implements ProviderDiscovery {
+ final List _registeredTypes = [];
+ final Map _factories = {};
+
+ void registerProviderType(Type type, ServiceProvider Function() factory) {
+ _registeredTypes.add(type);
+ _factories[type] = factory;
+ }
+
+ @override
+ List discoverProviders() => List.unmodifiable(_registeredTypes);
+
+ @override
+ ServiceProvider? createInstance(Type type) => _factories[type]?.call();
+}
diff --git a/packages/core/lib/src/provider/service_provider.dart b/packages/core/lib/src/provider/service_provider.dart
new file mode 100644
index 0000000..de1d884
--- /dev/null
+++ b/packages/core/lib/src/provider/service_provider.dart
@@ -0,0 +1,39 @@
+import 'package:platform_core/core.dart';
+import 'package:platform_container/container.dart';
+
+abstract class ServiceProvider {
+ late Application app;
+ late Container container;
+ late final Map _config;
+ bool _isEnabled = true;
+ bool _isDeferred = false;
+
+ ServiceProvider([Map? config]) : _config = config ?? {};
+
+ Map get config => _config;
+ bool get isEnabled => _isEnabled;
+ bool get isDeferred => _isDeferred;
+
+ void configure(Map options) {
+ _config.addAll(options);
+ }
+
+ void setEnabled(bool enabled) {
+ _isEnabled = enabled;
+ }
+
+ void setDeferred(bool deferred) {
+ _isDeferred = deferred;
+ }
+
+ void registerWithContainer(Container container) {
+ this.container = container;
+ }
+
+ Future register();
+ Future beforeBoot() async {}
+ Future boot();
+ Future afterBoot() async {}
+
+ List get dependencies => [];
+}
diff --git a/packages/core/lib/src/provider/service_provider_config.dart b/packages/core/lib/src/provider/service_provider_config.dart
new file mode 100644
index 0000000..ebceda6
--- /dev/null
+++ b/packages/core/lib/src/provider/service_provider_config.dart
@@ -0,0 +1,82 @@
+import 'package:platform_core/core.dart';
+import 'package:platform_core/src/provider/service_provider.dart';
+
+class ServiceProviderConfig {
+ final List providers;
+ final Map deferredProviders;
+ final Map> providerConfigs;
+
+ ServiceProviderConfig({
+ required this.providers,
+ this.deferredProviders = const {},
+ this.providerConfigs = const {},
+ });
+
+ factory ServiceProviderConfig.fromMap(Map map) {
+ final providersList =
+ (map['providers'] as List).cast