# What is Base

The **Base Class** is a lightweight PHP utility library providing common functionality used across PHP applications.

It includes helpers and core components for:

* **Environment Management**: Load and access `.env` variables.
* **Request Handling**: A unified interface for HTTP requests, including input retrieval, validation, and sanitization.
* **Routing**: A simple and fast router with middleware support.
* **Controllers**: A base controller to extend for application logic.
* **Response Rendering**: Helpers for sending JSON and CSV responses.
* **Authentication**: Multi-provider OAuth2 support (e.g., Google) and middleware for protecting routes.
* **Logging**: PSR-3 compliant file-based logging with JSON format.
* **Helper Utilities**: Static methods for common tasks like string manipulation.

Base is designed to be used directly or as the foundation for [BaseApp](https://github.com/Stilmark/BaseApp).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stilmark-dev.gitbook.io/base/introduction/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
