/foundation

Primary LanguageTypeScript

@findhow/foundation (Work in progress)

@findhow/foundation is a foundational library that extends from our @findhow/container dependency injection service container package.

By implementing an additional layer on top of the @findhow/container, we are able to build out the foundation for a simple framework - thus this package is called @findhow/foundation (inspired by laravel architecture and naming conventions).

File Descriptions for @findhow/foundation

Exported Description
Application This file defines the core Application class, which serves as the main entry point for the framework. It manages the service container, handles application lifecycle events, and provides methods for resolving dependencies.
bootstrap/** This directory contains various bootstrapper classes responsible for initializing different aspects of the application. Each bootstrapper is designed to set up specific functionalities, such as loading configurations or registering service providers.
BootProviders This file contains the BootProviders class, which is responsible for registering service providers with the application. Service providers are essential for binding services into the container, allowing for dependency injection throughout the application.
Bootstrapper This file defines the Bootstrapper interface, which all bootstrapper classes must implement. It ensures a consistent structure for bootstrapping processes across the application.
LoadConfiguration This file contains the LoadConfiguration class, which is responsible for loading configuration files from the specified directory and binding them to the application container. This allows for dynamic configuration management.
LoadEnvironmentVariables This file defines the LoadEnvironmentVariables class, which injects environment variables into the application's configuration. It ensures that sensitive information and environment-specific settings are easily accessible.
LoadExceptionHandler This file contains the LoadExceptionHandler class, which is responsible for loading and registering the exception handler for the application. It allows for custom error handling strategies.
config/** This directory holds configuration files for the application, allowing for easy management of settings related to various aspects of the framework.
app This file contains application-specific configurations, such as the application name and environment settings.
exceptions This file defines configurations related to exception handling, allowing developers to specify custom exception handlers.
index This file serves as an entry point for loading all configuration files, providing a unified interface for accessing application settings.
middleware This file contains configurations for middleware, allowing developers to define and manage middleware components that can be applied to application requests.
deno.json This file is the configuration file for Deno, specifying project settings, dependencies, and runtime options.
deno.lock This file is automatically generated by Deno to lock the versions of dependencies used in the project, ensuring consistent builds.
exceptions/** This directory contains custom exception handling classes, allowing for flexible error management strategies within the application.
ExceptionHandler This file defines the ExceptionHandler interface, which outlines the structure for custom exception handlers. Implementing classes must provide logic for reporting and rendering errors.
RunTimeExceptionHandler This file contains the RunTimeExceptionHandler class, which is a default implementation of the ExceptionHandler interface. It provides basic error reporting and rendering functionality.
interfaces/** This directory contains TypeScript interfaces that define the structure and contracts for various components within the application.
Application This file defines the Application interface, which outlines the methods and properties that any application class must implement.
Exceptions This file contains interfaces related to exception handling, ensuring that custom exception handlers adhere to a consistent structure.
IApplication This file defines the IApplication interface, which provides a contract for application instances, ensuring they implement necessary methods for dependency resolution and lifecycle management.
Middleware This file defines the Middleware interface, which outlines the structure for middleware components, ensuring they implement the required methods for processing requests.
ServiceProvider This file defines the ServiceProvider interface, which outlines the structure for service providers that register services within the application.
middleware/** This directory contains middleware components that can be applied to application requests, allowing for additional processing and handling of requests.
mod This file serves as the main module entry point for the @findhow/foundation package, exporting key components and functionalities for use in other parts of the application.
providers/** This directory contains service provider implementations that register various services and functionalities within the application.
ServiceProvider This file defines the ServiceProvider class, which is responsible for registering services with the application container, allowing for dependency injection and service management.