PHPackages                             codesaur/raptor - 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. codesaur/raptor

ActiveProject[Framework](/categories/framework)

codesaur/raptor
===============

Цэвэр архитектуртай объект хандалттай веб хөгжүүлэлтийн фреймворк

v2.2.0(2mo ago)023↓50%MITPHPCI passing

Since Feb 25Pushed 2mo agoCompare

[ Source](https://github.com/codesaur-php/Raptor)[ Packagist](https://packagist.org/packages/codesaur/raptor)[ Docs](https://codesaur.net)[ RSS](/packages/codesaur-raptor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (31)Versions (21)Used By (0)

🦖 codesaur/raptor
=================

[](#-codesaurraptor)

[![PHP Version](https://camo.githubusercontent.com/1015683ef28e870620edc19b6e22b456c0dc170c260fa4645905e93438f607a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322e312d3737374242342e7376673f6c6f676f3d706870)](https://www.php.net/)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

Цэвэр архитектуртай объект хандалттай веб хөгжүүлэлтийн фреймворк
Clean architecture object-oriented web development framework

---

Агуулга / Table of Contents
---------------------------

[](#агуулга--table-of-contents)

1. [Монгол](#1-%D0%BC%D0%BE%D0%BD%D0%B3%D0%BE%D0%BB-%D1%82%D0%B0%D0%B9%D0%BB%D0%B1%D0%B0%D1%80) | 2. [English](#2-english-description) | 3. [Getting Started](#3-getting-started)

---

1. Монгол тайлбар
-----------------

[](#1-монгол-тайлбар)

`codesaur/raptor` нь PSR стандартууд (PSR-3, PSR-7, PSR-15) дээр суурилсан, **олон давхаргат архитектуртай**, **бүрэн CMS боломжтой** PHP веб фреймворк юм.

Фреймворк нь **Web** (нийтийн вебсайт) болон **Dashboard** (админ панель) гэсэн хоёр давхаргад хуваагдан ажилладаг бөгөөд codesaur экосистемийн бусад packages-тэй хамтран ажиллана.

### Гол боломжууд

[](#гол-боломжууд)

- PSR-7/PSR-15 middleware суурьтай архитектур
- JWT + Session нэвтрэлт баталгаажуулалт
- RBAC (Role-Based Access Control) эрхийн удирдлага
- Олон хэл дэмжлэг (Localization)
- CMS модулиуд: Мэдээ, Хуудас, Файл, Лавлах, Тохиргоо
- Дэлгүүр модуль: Бүтээгдэхүүн, Захиалга, Үнэлгээ (e-commerce)
- MySQL, PostgreSQL алийг нь ч дэмжинэ
- SQL файл суурьтай өгөгдлийн сангийн migration систем
- Twig template engine
- OpenAI интеграци (moedit editor)
- Зураг optimize хийх (GD)
- PSR-3 лог систем
- Brevo API и-мэйл, Discord webhook мэдэгдэл
- SEO: Хайлт, Sitemap, XML Sitemap, RSS feed
- Спам хамгаалалт (honeypot, HMAC token, rate limiting, Cloudflare Turnstile)

### Дэлгэрэнгүй мэдээлэл

[](#дэлгэрэнгүй-мэдээлэл)

- [Бүрэн танилцуулга](docs/mn/README.md) - Суулгах, тохируулах, архитектур, хэрэглээ
- [API тайлбар](docs/mn/api.md) - Бүх модуль, класс, методуудын дэлгэрэнгүй

---

2. English Description
----------------------

[](#2-english-description)

`codesaur/raptor` is a **multi-layered**, **full-featured CMS** PHP web framework built on PSR standards (PSR-3, PSR-7, PSR-15).

The framework operates in two layers - **Web** (public website) and **Dashboard** (admin panel) - and works together with other packages in the codesaur ecosystem.

### Key Features

[](#key-features)

- PSR-7/PSR-15 middleware-based architecture
- JWT + Session authentication
- RBAC (Role-Based Access Control)
- Multi-language support (Localization)
- CMS modules: News, Pages, Files, References, Settings
- Shop module: Products, Orders, Reviews (e-commerce)
- MySQL or PostgreSQL supported
- SQL file-based database migration system
- Twig template engine
- OpenAI integration (moedit editor)
- Image optimization (GD)
- PSR-3 logging system
- Brevo API email, Discord webhook notifications
- SEO: Search, Sitemap, XML Sitemap, RSS feed
- Spam protection (honeypot, HMAC token, rate limiting, Cloudflare Turnstile)

### Documentation

[](#documentation)

- [Full Documentation](docs/en/README.md) - Installation, configuration, architecture, usage
- [API Reference](docs/en/api.md) - All modules, classes, and methods

---

3. Getting Started
------------------

[](#3-getting-started)

### Requirements

[](#requirements)

- PHP **8.2.1+**
- Composer
- MySQL or PostgreSQL
- PHP extensions: `ext-gd`, `ext-intl`

### Installation

[](#installation)

```
composer create-project codesaur/raptor my-project
```

### Configuration

[](#configuration)

`composer create-project` ашигласан бол `.env` файл автоматаар үүсэх бөгөөд `RAPTOR_JWT_SECRET` мөн автоматаар generate хийгдэнэ. Хэрэв `.env` үүсээгүй бол гараар хуулна:

If you used `composer create-project`, the `.env` file is auto-created and `RAPTOR_JWT_SECRET` is auto-generated. If `.env` was not created, copy it manually:

```
cp docs/conf.example/.env.example .env
```

Server configuration examples / Серверийн тохиргооны жишээ: [`docs/conf.example/`](docs/conf.example/)

Гол тохиргоонууд / Key configuration:

```
# Environment (development / production)
CODESAUR_APP_ENV=development

# Database
RAPTOR_DB_HOST=localhost
RAPTOR_DB_NAME=raptor
RAPTOR_DB_USERNAME=root
RAPTOR_DB_PASSWORD=

# JWT (secret is auto-generated)
RAPTOR_JWT_ALGORITHM=HS256
RAPTOR_JWT_LIFETIME=2592000
```

### Quick Architecture

[](#quick-architecture)

```
public_html/index.php
 |-- /dashboard/* -> Dashboard\Application (Admin Panel)
 |    |-- Middleware stack (Session, JWT, RBAC, Localization, Settings)
 |    |-- Routers (Login, Users, Organization, RBAC, Content, Logs, Shop, Development, Migration)
 |    \-- Controllers -> Twig Templates
 |
 \-- /* -> Web\Application (Public Website)
      |-- Middleware stack (Session, Localization, Settings)
      |-- WebRouter (/, /page/{id}, /news/{id}, /contact, /language/{code})
      \-- TemplateController -> Twig Templates

```

**Request Flow:** index.php -&gt; Application -&gt; Middleware chain -&gt; Router match -&gt; Controller -&gt; Response

### Directory Structure

[](#directory-structure)

```
raptor/
|-- application/
|   |-- raptor/              # Core framework (Controllers, Models, Middleware)
|   |   |-- authentication/  # Login, JWT, Session
|   |   |-- content/         # CMS (files, messages, news, pages, references, settings)
|   |   |-- localization/    # Languages & translations
|   |   |-- organization/    # Organization management
|   |   |-- rbac/            # Roles & permissions
|   |   |-- user/            # User management
|   |   |-- template/        # Dashboard UI
|   |   |-- exception/       # Exception handler
|   |   |-- log/             # Logging
|   |   |-- mail/            # Email
|   |   |-- notification/    # Discord webhook notifications
|   |   |-- development/     # Dev request tracking
|   |   \-- migration/       # Database migration system
|   |-- dashboard/           # Dashboard application
|   |   |-- home/            # Dashboard home
|   |   |-- shop/            # Shop module (Products, Orders, Reviews)
|   |   \-- manual/          # Manual pages
|   \-- web/                 # Public website application
|       |-- WebRouter.php    # Web routes
|       |-- content/         # Pages, News
|       |-- shop/            # Products, Orders, Reviews
|       |-- service/         # Search, Sitemap, RSS, Contact
|       \-- template/        # Web layout, exception handler
|-- public_html/             # Document root
|   |-- index.php            # Entry point
|   |-- .htaccess            # Apache URL rewrite
|   |-- robots.txt           # Search engine bot rules
|   \-- assets/              # CSS, JS (dashboard, moedit, motable etc)
|-- database/
|   \-- migrations/          # SQL migration files
|-- tests/                   # PHPUnit tests (unit, integration)
|-- docs/
|   |-- conf.example/        # Server config examples
|   |-- en/                  # English documentation
|   \-- mn/                  # Mongolian documentation
|-- .github/
|   \-- workflows/
|       |-- ci.yml           # CI code quality checks (push, PR)
|       \-- deploy.yml       # Auto deploy (cPanel FTP / Windows Server self-hosted runner)
|-- logs/                    # Error logs
|-- private/                 # Protected files
|-- .env.testing             # Test environment variables
|-- composer.json            # Dependencies
|-- phpunit.xml              # PHPUnit configuration
\-- LICENSE                  # MIT License

```

### Testing / Тестчилгээ

[](#testing--тестчилгээ)

PHPUnit 11 суурьтай unit болон integration тестүүдтэй. Includes PHPUnit 11 test suite with unit and integration tests.

```
composer test              # Бүх тест / All tests
composer test:unit         # Unit тест / Unit tests only
composer test:integration  # Integration тест / Integration tests only
```

Integration тест `.env.testing` файлын тохиргоог ашиглан тусдаа test database дээр ажиллана. Тест бүр transaction дотор ажиллаж, дуусахад rollback хийнэ.

Integration tests use `.env.testing` config with a separate test database. Each test runs in a transaction and rolls back on teardown.

---

History
-------

[](#history)

> **Note:** This package is the successor of `codesaur/indodaptor` (500+ installs), which has been removed from Packagist. A new package `codesaur/raptor` was created with a full code refactor, as the name "Indoraptor" is a trademark of Universal Pictures.

---

Did You Know?
-------------

[](#did-you-know)

**Velociraptor** (/vɪˈlɒsɪræptər/ - Латинаар "swift seizer" буюу "хурдан баригч") нь Cretaceous галавын сүүл үе буюу ойролцоогоор 75-71 сая жилийн өмнө амьдарч байсан dromaeosaurid theropod үлэг гүрвэлийн төрөл юм. Одоогоор хоёр зүйлийг хүлээн зөвшөөрсөн бөгөөд *V. mongoliensis* энэ зүйлийн олдворуудыг **Монгол** улсаас олсон байдаг. Хоёр дахь зүйл *V. osmolskae*-г 2008 онд Өвөр Монголоос олдсон гавлын материалаар нэрлэсэн.

Acknowledgements
----------------

[](#acknowledgements)

Энэ фреймворкийг хөгжүүлэхэд [**Gerege Systems LLC**](https://gerege.com/) ивээн тэтгэж, компанийн үүсгэн байгуулагч **Ц.Эрдэнэбат** багш удирдан зааварлаж чиглүүлсэн билээ.

This framework was developed with the sponsorship of [**Gerege Systems LLC**](https://gerege.com/) and under the guidance of **Erdenebat Ts**, founder of Gerege Systems.

---

Changelog
---------

[](#changelog)

- [CHANGELOG.md](CHANGELOG.md) - Version history

Community
---------

[](#community)

- [Discussions](https://github.com/orgs/codesaur-php/discussions) - Ask questions, share ideas, get help

Contributing &amp; Security
---------------------------

[](#contributing--security)

- [Contributing Guide](.github/CONTRIBUTING.md)
- [Security Policy](.github/SECURITY.md)

License
-------

[](#license)

This project is licensed under the MIT License.

Author
------

[](#author)

**Narankhuu**
Email:
Phone: [+976 99000287](https://wa.me/97699000287)
Web:

**codesaur ecosystem:**

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance88

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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 ~1 days

Total

20

Last Release

60d ago

Major Versions

v1.9.1 → v2.0.02026-03-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/2281c1b7b23007da57ad0526923a5f822dea64629ab1cb70749188d2b869e55c?d=identicon)[codesaur](/maintainers/codesaur)

---

Top Contributors

[![codesaur](https://avatars.githubusercontent.com/u/4127594?v=4)](https://github.com/codesaur "codesaur (44 commits)")

---

Tags

psr-7psr-3frameworkrouterpsr-15rbacloggerapplicationrole-based-access-controlcodesaurmongolmongolianarankhuucodenкодзаврнаранхүүкоденhttp applicationserver request handlerraptorфреймворкхэрэглэгчийн эрхийн зохицуулалтпротокол

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codesaur-raptor/health.svg)

```
[![Health](https://phpackages.com/badges/codesaur-raptor/health.svg)](https://phpackages.com/packages/codesaur-raptor)
```

###  Alternatives

[chubbyphp/chubbyphp-framework

A minimal, highly performant middleware PSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.

13544.4k4](/packages/chubbyphp-chubbyphp-framework)[yiisoft/log

Yii Logging Library

42917.2k26](/packages/yiisoft-log)[yiisoft/error-handler

Yii Error Handling Library

21363.6k15](/packages/yiisoft-error-handler)[phalcon/phalcon

Phalcon Framework

2421.5k1](/packages/phalcon-phalcon)[igniphp/framework

Swoole, PSR-7, PSR-15 modular micro anti-framework.

2651.0k1](/packages/igniphp-framework)[antidot-fw/framework

Anti.Framework library

183.2k5](/packages/antidot-fw-framework)

PHPackages © 2026

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