PHPackages                             kimihub/nemesis-framework - 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. kimihub/nemesis-framework

AbandonedArchivedLibrary[Framework](/categories/framework)

kimihub/nemesis-framework
=========================

Small PHP5 Framework

0.7.6(11y ago)065GPL-3.0PHPPHP &gt;=5.3.0

Since Apr 10Pushed 11y ago1 watchersCompare

[ Source](https://github.com/kimihub/nemesis-framework)[ Packagist](https://packagist.org/packages/kimihub/nemesis-framework)[ Docs](https://github.com/kimihub/nemesis-framework)[ RSS](/packages/kimihub-nemesis-framework/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Nemesis Framework
=================

[](#nemesis-framework)

Nemesis is a small PHP Framework that I've started to sustain when I realized I needed a **lightweight**, **native**, **minimalistic** and **flexible** tool to quickly develop MVC web app or REST api for testing and specific requests which require to work on a basic shared web hosting with few hardware resources.

Features
--------

[](#features)

The architecture is built on well known patterns (Model Controller or Model View Controller) with a basic bootstraper / class autoloader and some procedural functions, so, what PHP can do properly without any extra-dependencies.

Core components
---------------

[](#core-components)

The core is customizable according to the components needed and their dependencies

### Classes

[](#classes)

**Loader** : autoloader

**Hook** : trigger a hook, depends to Loader

**Session** : manage a secure session, depends to Loader

**Plugin** : DEPRECATED

**URL** : get headers received, hash and output URLs, depends to Loader

**Router** : create routes, depends to Loader, URL

**Api** : manage a simple JSON Web Api with a class controller, depends to Loader, URL, Router

**MVC** : add all components to build a MVC app like a view builder, depends to Loader, Hook, URL, Routes

**App** : manage a web app built on a MVC pattern with a class controller, depends to Loader, Hook, URL, Routes, MVC

**HTMLhelpers** : helpers to build html forms, no dependencies

**CSSmin** : minify CSS, depends to Loader, Hook, MVC

### Functions

[](#functions)

**String parser** : strip\_accents, strip\_specialchars, beautify, minimize, excerpt, is\_email, is\_phone\_fr, is\_date, datetime, sanitize\_output

**File manager / Shorcuts** : getperms, filename, extension, upload, download

**CURL** : url\_get\_contents

**key** : Key\_Generator

Required PHP version and modules
--------------------------------

[](#required-php-version-and-modules)

- PHP v5.3 or higher installed on your server or web hosting
- htaccess (for Apache) and url\_rewriting PHP modules

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

[](#installation)

### Composer

[](#composer)

Nemesis-Framework is now on packagist, so it can be required as a dependency with Composer :

### URL Rewriting Configuration

[](#url-rewriting-configuration)

For Apache Servers the content of the .htaccess file located to the server root directory is :

```

	#Symlinks maybe needed for URL rewriting
	Options +FollowSymLinks
	RewriteEngine On
	#if you want to exclude some directories from url rewriting
	#RewriteCond %{REQUEST_URI} !^/(site2|site3/.*)$
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

```

And for Lighttpd Servers the content of Lighttpd.conf :

```
$HTTP["host"]  =~ "www\.mydomain\.com"{
	server.document-root = "/PathToServerRoot/"
	accesslog.filename   = "/PathToLogs/access.log"
 	url.rewrite = (
		"^/(.+)/?$" => "/index.php/$1"
	)
}

```

### *index.php* instructions

[](#indexphp-instructions)

Require bootstraper

```
require_once 'nemesis.php';

```

To log php errors

```
get_errors(); // to view errors.log : http://mydomain.com/errors.log

```

To display php errors

```
display_errors();

```

If the core functions are required

```
core_functions();

```

If the autoloader is required

```
core_autoloader();

```

Router initialization

```
$loader = Loader::getInstance();
$loader->initClass('Router');

```

Example of a web app initialization

```
$blogApp = App::getInstance('blog', '1.0'); // the version is not required
$blogApp->run();
echo $blogApp;

```

### More examples

[](#more-examples)

For more examples, check the others repositories prefixed with "nemesis-"

- REST Newsletter Api :
- MVC Blog App :

Changelog
---------

[](#changelog)

### 0.7

[](#07)

- Add Api::RESTMethods()
- Implements HTMLhelpers old plugin to class.HTMLhelpers.php core
- Implements CSSmin old plugin to class.CSSmin.php core
- Cleans App and MVC to implement NEMESIS\_PROCESS\_PATH

### 0.6

[](#06)

- Move the bootstraper core/bootstrap.php to ./nemesis.php for more simplicity with Composer
- Move core/errors.log to ./errors.log
- Add ./nemesis.dev.php to write logs in the errors file when included
- Add NEMESIS\_PROCESS\_PATH to ./nemesis.php and core/class.App.php
- Change behaviour of App system, an app can now be in the root server directory
- Deprecated App::setAsDefault() and App::$url
- Deprecated class.Plugin.php
- Defines composer.json

### 0.5

[](#05)

- New function in functions.php : key\_generator($length=8)
- Removed hash/token generator and new secure ($\_SESSION\[$sessionName\] = $expirationDate)
- Add Cross-Origin Resource Sharing (CORS) headers in class.Api.php with Api::CORS()

### 0.4

[](#04)

- New class : class.Api.php to manage a JSON Web Api
- New class : class.Session.php to manage a secure session

### 0.3

[](#03)

- Simplification, re-organization of classes dependencies
- init.php replaced with bootstrap.php, it is now clean and
- new way to instance plugins and apps independently from Loader Class
- Routes configuration has now its own class with URL Class dependence
- Loader class can initialize a class with a initClass method
- errors.log changes its path to /core/errors.log
- core\_functions() and core\_loader() appears in bootstrap to include the required libraries

### 0.2

[](#02)

- Test on Lighttpd / Fixed url rewriting

### 0.1

[](#01)

- Initial Release

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4057d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e722ee8af8a8e8599466ca9305f01e928f955a0d62a7aa1a38dce18268454ccc?d=identicon)[kimihub](/maintainers/kimihub)

---

Top Contributors

[![achabacha2](https://avatars.githubusercontent.com/u/24983569?v=4)](https://github.com/achabacha2 "achabacha2 (6 commits)")[![kimihub](https://avatars.githubusercontent.com/u/112393511?v=4)](https://github.com/kimihub "kimihub (1 commits)")

---

Tags

frameworkrestmvc

### Embed Badge

![Health badge](/badges/kimihub-nemesis-framework/health.svg)

```
[![Health](https://phpackages.com/badges/kimihub-nemesis-framework/health.svg)](https://phpackages.com/packages/kimihub-nemesis-framework)
```

###  Alternatives

[phprest/phprest

PHP Rest Framework.

3049.3k](/packages/phprest-phprest)[psx/psx

PHP REST API Framework

17112.6k3](/packages/psx-psx)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
