PHPackages                             fosa-framework/fosa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. fosa-framework/fosa

ActiveLibrary[Framework](/categories/framework)

fosa-framework/fosa
===================

Fosa is a lightweight and elegant PHP web framework for endemic developers

v0.1.16(4mo ago)112MITPHPPHP &gt;=5.4

Since Dec 30Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/fosa-framework/fosa-php)[ Packagist](https://packagist.org/packages/fosa-framework/fosa)[ RSS](/packages/fosa-framework-fosa/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (0)

[![Fosa](./public/favicon/favicon.ico?raw=true)](./public/favicon/favicon.ico?raw=true)

Fosa Framework
==============

[](#fosa-framework)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

Fosa is a lightweight and elegant PHP web framework designed for endemic developers. It provides a simple yet powerful foundation for building web applications.

**Current Version:** 1.0
**PHP Requirement:** &gt;= 5.4

Installation
------------

[](#installation)

### Method 1: Create a new project with Composer (Recommended)

[](#method-1-create-a-new-project-with-composer-recommended)

```
composer create-project fosa-framework/fosa my-app
cd my-app
```

The installer will automatically:

- Create necessary directories
- Generate a `.env` file from `.env.example`
- Create example files and templates
- Set up `.htaccess` for Apache

### Method 2: Install as a dependency

[](#method-2-install-as-a-dependency)

Add Fosa to your existing Composer project:

```
composer require fosa-framework/fosa
```

Configuration
-------------

[](#configuration)

1. **Copy environment file:**

    ```
    cp .env.example .env
    ```
2. **Edit `.env` with your settings:**

    ```
    APP_NAME=My Fosa App
    APP_ENV=development
    R_HOST=localhost
    R_PORT=8085

    # Database
    DB_DRIVER=mysql
    DB_HOST=localhost
    DB_NAME=fosa_db
    DB_USER=root
    ```

Quick Start
-----------

[](#quick-start)

### Starting the Development Server

[](#starting-the-development-server)

```
php server/run
```

The server will run at `http://localhost:8085` (configurable via `.env`)

### Creating Your First Controller

[](#creating-your-first-controller)

Create a file `app/Controllers/YourController.php`:

```
