PHPackages                             hwai/slim-skeleton - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. hwai/slim-skeleton

ActiveProject[HTTP &amp; Networking](/categories/http)

hwai/slim-skeleton
==================

A Slim Framework skeleton application for rapid development

v1.0.9(8mo ago)127MITPHPPHP ^8.2CI failing

Since Aug 13Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/Eng-Ahmet/slim-skeleton)[ Packagist](https://packagist.org/packages/hwai/slim-skeleton)[ Docs](https://github.com/ahmed741321/slim-skeleton)[ RSS](/packages/hwai-slim-skeleton/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (26)Versions (11)Used By (0)

slim-skeleton Project
=====================

[](#slim-skeleton-project)

Introduction
------------

[](#introduction)

Welcome to the Slim HWAI Project! This project provides a boilerplate setup using the Slim Framework, a PHP micro-framework designed for creating simple yet powerful web applications. This setup is intended to streamline the process of starting a new PHP project with Slim by providing a ready-to-use skeleton.

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

[](#installation)

To install the Slim HWAI project, you will need Composer, a dependency management tool for PHP. Follow these steps to create a new project:

1. Ensure Composer is Installed: Make sure you have Composer installed on your system. You can download it from [getcomposer.org](https://getcomposer.org).
2. Create a New Project: Run the following command in your terminal to create a new project based on the Slim HWAI boilerplate:

    ```
    composer create-project hwai/slim-skeleton
    ```

    This command will create a new directory with the Slim HWAI project structure and install all necessary dependencies.

Project Structure
-----------------

[](#project-structure)

After installation, you will have a project with the following structure:

- `src/`: Contains the source code for your application. This is where you'll place your routes, controllers, and any other business logic.
- `public/`: This is the web root directory. It contains publicly accessible files like HTML, CSS, JavaScript, and the entry point for your application (`index.php`).
- `config/`: Contains configuration files for your application. This might include settings for database connections, middleware, and other configuration parameters.
- `vendor/`: Contains Composer-managed libraries and dependencies. You generally won't need to modify anything here.
- `tests/`: (Optional) If you include testing in your project, this directory will hold your test cases and test-related configuration.

Running the Application
-----------------------

[](#running-the-application)

To start the application and view it in your web browser, you can use the built-in PHP web server. Navigate to the root directory of your project and run:

```
rr.exe serve
```

This will start a local server at . Open this URL in your browser to view your application.

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

[](#configuration)

Configuration files are located in the `config/` directory. Here, you can adjust settings specific to your environment, such as database credentials, environment variables, and other configuration parameters.

Development and Contribution
----------------------------

[](#development-and-contribution)

If you wish to contribute to the development of this project, follow these steps:

1. Fork the Repository: Click on the "Fork" button at the top-right of the repository page on GitHub.
2. Create a Feature Branch: Create a new branch for your feature or bug fix:

    ```
    git checkout -b feature/YourFeature
    ```
3. Make Changes: Implement your changes and test them locally.
4. Submit a Pull Request: Push your changes to your forked repository and open a Pull Request (PR) on the original repository, providing a clear description of the changes you made.

Issues and Support
------------------

[](#issues-and-support)

If you encounter any issues or have questions about the project, please:

1. Open an Issue on GitHub with a detailed description of the problem or question.
2. Contact us via email at  for additional support.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

luma-new-back
=============

[](#luma-new-back)

Routing
=======

[](#routing)

Register
--------

[](#register)

📍 Endpoint
----------

[](#-endpoint)

`POST /register`

📝 Description
-------------

[](#-description)

تُستخدم هذه النقطة لتسجيل مستخدم جديد في النظام. يجب إرسال جميع البيانات المطلوبة في جسم الطلب بصيغة JSON.

---

📤 Request Headers
-----------------

[](#-request-headers)

HeaderValueContent-Type`application/json`Accept`application/json`---

📦 Request Body (JSON)
---------------------

[](#-request-body-json)

```
{
    "first_name": "Ahmed",
    "last_name": "Al-Mutairi",
    "email": "ahmed@example.com",
    "phone": "+966501234567",
    "age": 25,
    "gender": "Male",
    "privacy_policy": 1,
    "country_code": "SA",
    "country_name": "Saudi Arabia",
    "password": "StrongPassword123",
    "password_confirmation": "StrongPassword123",
    "user_type": "Student"
}
```

> 🔒 **ملاحظات:**
>
> - `privacy_policy` يجب أن تكون `1` لتأكيد الموافقة على الشروط.
> - يجب أن تطابق `password_confirmation` كلمة المرور.
> - `user_type` يمكن أن تكون `Student`, `Teacher`, أو نوع آخر حسب النظام.

---

✅ Successful Response (201 Created)
-----------------------------------

[](#-successful-response-201-created)

```
{
    "status": 201,
    "message": "OK",
    "data": {
        "message": "Registration successful. Please check your email to activate your account."
    },
    "error": null,
    "timestamp": "2025-06-15T23:51:57+00:00",
    "version": "1.0.0",
    "path": "/register",
    "user_agent": "PostmanRuntime/7.44.0",
    "ip": "127.0.0.1",
    "request_method": "POST",
    "referer": "",
    "content_type": "application/json",
    "accept_language": "",
    "host": "localhost",
    "protocol": "http",
    "original_url": "http://localhost:8000/register",
    "query_string": "",
    "trace_id": "c8e210a40bedc432",
    "signature": "bb8bb838ac9aa1d36415858cf512c5e92906cf8fe9a536a39bec5cb871b66ec8"
}
```

---

❌ Error Response Example
------------------------

[](#-error-response-example)

```
{
    "status": 500,
    "message": "Database settings array is missing or incomplete.",
    "data": null,
    "error": "Database settings array is missing or incomplete.",
    "timestamp": "2025-06-15T23:55:22+00:00",
    "version": "1.0.0",
    "path": "/register",
    "user_agent": "PostmanRuntime/7.44.0",
    "ip": "127.0.0.1",
    "request_method": "POST",
    "referer": "",
    "content_type": "application/json",
    "accept_language": "",
    "host": "localhost",
    "protocol": "http",
    "original_url": "http://localhost:8000/register",
    "query_string": "",
    "trace_id": "c583102a5254c78a",
    "signature": "bb8bb838ac9aa1d36415858cf512c5e92906cf8fe9a536a39bec5cb871b66ec8"
}
```

---

📌 Notes
-------

[](#-notes)

- يُرسل الرابط إلى البريد الإلكتروني لتفعيل الحساب بعد التسجيل.
- يجب أن يكون البريد الإلكتروني صالحًا ونشطًا لتلقّي رسالة التفعيل.
- يتم حفظ عنوان الـ IP والمعلومات الخاصة بالطلب لأغراض التتبع والأمان.

---

🧪 Example using cURL
--------------------

[](#-example-using-curl)

```
curl -X POST http://localhost:8000/register \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Ahmed",
    "last_name": "Al-Mutairi",
    "email": "ahmed@example.com",
    "phone": "+966501234567",
    "age": 25,
    "gender": "Male",
    "privacy_policy": 1,
    "country_code": "SA",
    "country_name": "Saudi Arabia",
    "password": "StrongPassword123",
    "password_confirmation": "StrongPassword123",
    "user_type": "Student"
  }'
```

Login
-----

[](#login)

📍 Endpoint
----------

[](#-endpoint-1)

`POST /login`

الوصف
-----

[](#الوصف)

نقطة النهاية `/login` تُستخدم لتسجيل دخول المستخدمين عبر إرسال بيانات البريد الإلكتروني وكلمة المرور.
تقوم الخدمة بالتحقق من صحة البيانات، التحقق من حالة المستخدم، تسجيل المحاولات، وإنشاء توكن JWT في حالة النجاح.

---

طلب تسجيل الدخول (Request)
--------------------------

[](#طلب-تسجيل-الدخول-request)

- **الطريقة:** POST
- **الرابط:** `/login`
- **نوع المحتوى:** `application/json`

### جسم الطلب (Body)

[](#جسم-الطلب-body)

```
{
    "email": "user@example.com",
    "password": "yourPassword123"
}
```

- **email**: البريد الإلكتروني للمستخدم (يجب أن يكون بصيغة صحيحة).
- **password**: كلمة المرور (بين 8 و 20 حرفًا).

---

استجابة ناجحة (Success Response)
--------------------------------

[](#استجابة-ناجحة-success-response)

- **الحالة:** 200 OK
- **نوع المحتوى:** `application/json`

### مثال على الاستجابة

[](#مثال-على-الاستجابة)

```
{
    "status": 200,
    "message": "OK",
    "data": {
        "message": "Login successful.",
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
        "expires_in": 600
    },
    "error": null,
    "timestamp": "2025-06-17T13:41:52+00:00",
    "version": "1.0.0",
    "path": "/login",
    "user_agent": "PostmanRuntime/7.44.0",
    "ip": "127.0.0.1",
    "request_method": "POST",
    "referer": "",
    "content_type": "application/json",
    "accept_language": "",
    "host": "localhost",
    "protocol": "http",
    "original_url": "http://localhost:8000/login",
    "query_string": "",
    "trace_id": "8b3b9c91f90df5d7",
    "signature": "2db4f2843cacec2ee01ae425e0d129683446443290b7face4d5a8a51bd0b493f"
}
```

- **token**: رمز JWT الذي يتم استخدامه للمصادقة في الطلبات المستقبلية.
- **expires\_in**: مدة صلاحية التوكن بالثواني (600 ثانية = 10 دقائق).

---

استجابة في حالة الخطأ (Error Response)
--------------------------------------

[](#استجابة-في-حالة-الخطأ-error-response)

### مثال على استجابة خطأ في حالة بيانات غير صحيحة أو فشل تسجيل الدخول

[](#مثال-على-استجابة-خطأ-في-حالة-بيانات-غير-صحيحة-أو-فشل-تسجيل-الدخول)

- **الحالة:** 401 Unauthorized
- **نوع المحتوى:** `application/json`

```
{
    "status": 401,
    "message": "Invalid email or password.",
    "data": null,
    "error": "Invalid email or password.",
    "timestamp": "2025-06-17T13:42:54+00:00",
    "version": "1.0.0",
    "path": "/login",
    "user_agent": "PostmanRuntime/7.44.0",
    "ip": "127.0.0.1",
    "request_method": "POST",
    "referer": "",
    "content_type": "application/json",
    "accept_language": "",
    "host": "localhost",
    "protocol": "http",
    "original_url": "http://localhost:8000/login",
    "query_string": ""
}
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance60

Regular maintenance activity

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.8% 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 ~42 days

Recently: every ~47 days

Total

10

Last Release

257d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d3561f0e6af4b9848f415a45088e46ce023205ea57d0599abee2f68dc2a07e0?d=identicon)[ahmed741321](/maintainers/ahmed741321)

---

Top Contributors

[![ahahmetes-cmd](https://avatars.githubusercontent.com/u/249970875?v=4)](https://github.com/ahahmetes-cmd "ahahmetes-cmd (36 commits)")[![Eng-Ahmet](https://avatars.githubusercontent.com/u/88238215?v=4)](https://github.com/Eng-Ahmet "Eng-Ahmet (5 commits)")

---

Tags

restrouterpsr7microframework

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hwai-slim-skeleton/health.svg)

```
[![Health](https://phpackages.com/badges/hwai-slim-skeleton/health.svg)](https://phpackages.com/packages/hwai-slim-skeleton)
```

PHPackages © 2026

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