PHPackages                             hakuryo/slim-api-template - 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. [API Development](/categories/api)
4. /
5. hakuryo/slim-api-template

ActiveProject[API Development](/categories/api)

hakuryo/slim-api-template
=========================

A SLIM API template with firebase php jwt

3.0.1(9mo ago)037MITPHPPHP &gt;=8.4

Since Mar 28Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/CaptainClaquette/composer-slim-api-template)[ Packagist](https://packagist.org/packages/hakuryo/slim-api-template)[ RSS](/packages/hakuryo-slim-api-template/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (11)Used By (0)

SLIM API TEMPLATE
=================

[](#slim-api-template)

This project is a SLIM API template bundled with the following composer package :

- php: &gt;=7.4
- firebase/php-jwt: ^6.3
- hakuryo/database-client: ^1.3
- monolog/monolog: ^3.3.1
- slim/psr7: ^1.5
- slim/slim: ^4.9

Requirement
-----------

[](#requirement)

### Mandatory

[](#mandatory)

- PHP 7.4+
- PHP module :
    - php-json
    - php-pdo
    - php-mysql

### Optional

[](#optional)

- PHP module :
    - oci8 [How to install OCI8](https://github.com/CaptainClaquette/composer-database-client/blob/main/How%20to%20install%20PHP%2C%20Instantclient%20and%20PHP_PDO_OCI.md)
    - pdo\_oci [How to install PDO\_OCI](https://github.com/CaptainClaquette/composer-database-client/blob/main/How%20to%20install%20PHP%2C%20Instantclient%20and%20PHP_PDO_OCI.md#php_pdo_oci)

Install
-------

[](#install)

`composer create-project hakuryo/slim-api-template [local_path_of_your_project]`

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

[](#configuration)

This template is initialized by the Config class. The class load an INI file to configure the application.

> ⚠️
> The default location is `__DIR__ . "/config/config.ini"`. Please take note that's **NOT A GOOD** location for production. You **SHOULD** place the config file outside your web root.
>
> > If you can not place the INI file outside your web root please consider using ACL like htaccess to prevent the reading of the file.

Below a sample config file.

```
# Global APP config sample
[app]
base_path = "/"

# JWT token config sample
[jwt]
key = My_super_private_key; private Key for JWT generation
algorithm = HS256; Algorithm for JWT signature generation
token_duration = 28800
issuer = my-server.example.com

# hakuryo/ldap-client config sample
[ldap]
HOST = "ldap.example.com"
USER = "uid=my_login,dc=example,dc=com"
DN = "dc=example,dc=com"
PWD = "ldap_pwd"

# hakuryo/database-client config sample for mysql
[db]
HOST = "db.example.com";
DB = "my_db";
USER = "my_user";
PWD = "my_user_pwd"
PORT = 3306
DRIVER = "mysql"

# hakuryo/database-client config sample for oracle
[oci]
HOST = "oracle.example.com";
DB = "my_oracle_db";
USER = "my_user";
PWD = "my_owd";
PORT = 12345
DRIVER = "oci"

[logger]
# Define the type of logger could be ErrorLogHandler,StreamHandler or RotatingFileHandler
logger_class = "RotatingFileHandler"
# Programmatic name of the logger
logger_name = "myLogger"
# Logger level could be one of debug,info,notice,warning,error,critical,emergency
logger_level = "debug"
# Define the Line format in the logger
logger_line_format = "%datetime% %level_name% %message%"
# Absolute path of the Log file.only used when logger_class is StreamHandler or RotatingFileHandler
log_file_path = "/var/log/apache2/my_application.log"
# File name format for RotatingFileHandler class
log_file_name_format = "{date}-{filename}"
# Date format used in log_file_name_format for RotatingFileHandler class
log_file_name_date_format = "Y-m-d"
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance57

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~135 days

Recently: every ~151 days

Total

10

Last Release

287d ago

Major Versions

0.0.1 → 1.0.02022-03-28

1.0.1 → 2.0.02023-04-07

2.1.2 → 3.0.02025-07-29

PHP version history (3 changes)0.0.1PHP ^7.4

2.0.0PHP &gt;=7.4

3.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/482cf0225f97ddd58cb99a0123baeae3aba471ccdbf61904de4c49167af19af2?d=identicon)[Hakuryo](/maintainers/Hakuryo)

---

Top Contributors

[![CaptainClaquette](https://avatars.githubusercontent.com/u/10845062?v=4)](https://github.com/CaptainClaquette "CaptainClaquette (14 commits)")

### Embed Badge

![Health badge](/badges/hakuryo-slim-api-template/health.svg)

```
[![Health](https://phpackages.com/badges/hakuryo-slim-api-template/health.svg)](https://phpackages.com/packages/hakuryo-slim-api-template)
```

###  Alternatives

[showdoc/showdoc

ShowDoc is a tool greatly applicable for an IT team to share documents online

12.8k7.0k](/packages/showdoc-showdoc)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[vesp/core

Vesp core library to make backend simple

243.8k5](/packages/vesp-core)

PHPackages © 2026

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